]> the.earth.li Git - temper-clone.git/commitdiff
Remove unused read_temp() function main
authorJonathan McDowell <noodles@earth.li>
Fri, 13 Jul 2018 17:20:25 +0000 (18:20 +0100)
committerJonathan McDowell <noodles@earth.li>
Fri, 13 Jul 2018 17:20:25 +0000 (18:20 +0100)
The temperature is read as part of a state machine in the main loop so
we don't tie thing up for too long, so this is no longer necessary.

main.c

diff --git a/main.c b/main.c
index de54471813640c91a8b5cb4d476ecd4c614e1789..bcc4008fb06047bb719be722feeba1a856712947 100644 (file)
--- a/main.c
+++ b/main.c
@@ -221,36 +221,6 @@ void set_serial(void)
        }
 }
 
        }
 }
 
-uint16_t read_temp(void)
-{
-       uint8_t buf[9];
-
-       cli();
-       if (!w1_reset()) {
-               return 0xFFFF;
-               sei();
-       }
-
-       w1_write(0xCC);         /* SKIP ROM */
-       w1_write(0x44);         /* Convert T */
-
-       do {
-               w1_read(buf, 1);
-       } while (buf[0] != 0xFF);
-
-       if (!w1_reset()) {
-               return 0xFFFF;
-               sei();
-       }
-
-       w1_write(0xCC);         /* SKIP ROM */
-       w1_write(0xBE);         /* Read Scratchpad */
-       w1_read(buf, 9);
-       sei();
-
-       return buf[2] << 8 | buf[1];
-}
-
 usbMsgLen_t usbFunctionDescriptor(usbRequest_t *rq)
 {
        if (rq->wValue.bytes[1] == USBDESCR_STRING &&
 usbMsgLen_t usbFunctionDescriptor(usbRequest_t *rq)
 {
        if (rq->wValue.bytes[1] == USBDESCR_STRING &&