diff options
Diffstat (limited to 'examples/custom-class')
-rw-r--r-- | examples/custom-class/firmware/main.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/examples/custom-class/firmware/main.c b/examples/custom-class/firmware/main.c index 2d93db9..940f62e 100644 --- a/examples/custom-class/firmware/main.c +++ b/examples/custom-class/firmware/main.c @@ -34,7 +34,7 @@ different port or bit, change the macros below: /* ----------------------------- USB interface ----------------------------- */ /* ------------------------------------------------------------------------- */ -uchar usbFunctionSetup(uchar data[8]) +usbMsgLen_t usbFunctionSetup(uchar data[8]) { usbRequest_t *rq = (void *)data; @@ -50,16 +50,16 @@ usbRequest_t *rq = (void *)data; usbMsgPtr = dataBuffer; /* tell the driver which data to return */ return 1; /* tell the driver to send 1 byte */ } - return 0; /* default for not implemented requests: return no data back to host */ + return 0; /* default for not implemented requests: return no data back to host */ } /* ------------------------------------------------------------------------- */ -int main(void) +int main(void) { uchar i; - wdt_enable(WDTO_1S); + wdt_enable(WDTO_1S); /* Even if you don't use the watchdog, turn it off here. On newer devices, * the status of the watchdog (on/off, period) is PRESERVED OVER RESET! */ @@ -68,8 +68,8 @@ uchar i; * That's the way we need D+ and D-. Therefore we don't need any * additional hardware initialization. */ - odDebugInit(); - usbInit(); + odDebugInit(); + usbInit(); usbDeviceDisconnect(); /* enforce re-enumeration, do this while interrupts are disabled! */ i = 0; while(--i){ /* fake USB disconnect for > 250 ms */ @@ -78,14 +78,14 @@ uchar i; } usbDeviceConnect(); LED_PORT_DDR |= _BV(LED_BIT); /* make the LED bit an output */ - sei(); + sei(); DBG1(0x01, 0, 0); /* debug output: main loop starts */ - for(;;){ /* main event loop */ + for(;;){ /* main event loop */ DBG1(0x02, 0, 0); /* debug output: main loop iterates */ - wdt_reset(); - usbPoll(); - } - return 0; + wdt_reset(); + usbPoll(); + } + return 0; } /* ------------------------------------------------------------------------- */ |