return 0;
}
+void hadUsbReset(void)
+{
+ /* Reset our state machine back to having nothing to send */
+ temp_state = 0;
+ have_temp_int = false;
+}
+
int main(void)
{
unsigned char i;
w1_setup();
set_serial();
- usbInit();
usbDeviceDisconnect();
-
i = 0;
while (--i) {
wdt_reset();
_delay_ms(1);
}
-
usbDeviceConnect();
+ usbInit();
+
/* PB1 as output for LED */
DDRB |= 1 << PB1;
w1_write(0x44); /* Convert T */
temp_state = 4;
} else if (temp_state == 4) {
- if (w1_read_byte() == 0xFF)
+ if (w1_read_bit())
temp_state = 5;
} else if (temp_state == 5) {
if (w1_reset()) {