X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/9d6a373cb61b55b94312de3809ac76fcbd0a696c..cf610c5c91c3eee02dec7ca848acc8da831ad98a:/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c diff --git a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c index effd16b01..b483defa7 100644 --- a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c +++ b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c @@ -53,7 +53,7 @@ USB_ClassInfo_HID_Host_t Keyboard_HID_Interface = /** Main program entry point. This routine configures the hardware required by the application, then - * starts the scheduler to run the application tasks. + * enters a loop to run the application tasks in sequence. */ int main(void) { @@ -99,7 +99,7 @@ int main(void) break; } - if (USB_HID_Host_SetBootProtocol(&Keyboard_HID_Interface) != 0) + if (HID_Host_SetBootProtocol(&Keyboard_HID_Interface) != 0) { printf("Could not Set Boot Protocol Mode.\r\n"); LEDs_SetAllLEDs(LEDMASK_USB_ERROR); @@ -113,10 +113,8 @@ int main(void) case HOST_STATE_Configured: if (HID_Host_IsReportReceived(&Keyboard_HID_Interface)) { - USB_KeyboardReport_Data_t KeyboardReport; - uint8_t ReportID = 0; - - HID_Host_ReceiveReport(&Keyboard_HID_Interface, false, &ReportID, &KeyboardReport); + USB_KeyboardReport_Data_t KeyboardReport; + HID_Host_ReceiveReport(&Keyboard_HID_Interface, &KeyboardReport); LEDs_ChangeLEDs(LEDS_LED1, (KeyboardReport.Modifier) ? LEDS_LED1 : 0);