aboutsummaryrefslogtreecommitdiffstats
path: root/examples/hid-mouse/firmware/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hid-mouse/firmware/main.c')
-rw-r--r--examples/hid-mouse/firmware/main.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/examples/hid-mouse/firmware/main.c b/examples/hid-mouse/firmware/main.c
index 0f3fd42..7667fe7 100644
--- a/examples/hid-mouse/firmware/main.c
+++ b/examples/hid-mouse/firmware/main.c
@@ -97,7 +97,7 @@ char d;
/* ------------------------------------------------------------------------- */
-uchar usbFunctionSetup(uchar data[8])
+usbMsgLen_t usbFunctionSetup(uchar data[8])
{
usbRequest_t *rq = (void *)data;
@@ -119,16 +119,16 @@ usbRequest_t *rq = (void *)data;
}else{
/* no vendor specific requests implemented */
}
- 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!
*/
@@ -137,8 +137,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 */
@@ -146,20 +146,20 @@ uchar i;
_delay_ms(1);
}
usbDeviceConnect();
- 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();
+ wdt_reset();
+ usbPoll();
if(usbInterruptIsReady()){
/* called after every poll of the interrupt endpoint */
advanceCircleByFixedAngle();
DBG1(0x03, 0, 0); /* debug output: interrupt report prepared */
usbSetInterrupt((void *)&reportBuffer, sizeof(reportBuffer));
}
- }
- return 0;
+ }
+ return 0;
}
/* ------------------------------------------------------------------------- */