void USB_EndPoint1 (uint32_t event) { switch (event) { case USB_EVT_OUT: SetOutReport(); /* data received from Host */ break; case USB_EVT_IN: GetInReport(); break; } }
uint32_t HID_SetReport (void) { /* ReportID = SetupPacket.wValue.WB.L; */ switch (SetupPacket.wValue.WB.H) { case HID_REPORT_INPUT: return (FALSE); /* Not Supported */ case HID_REPORT_OUTPUT: OutReport = EP0Buf[0]; SetOutReport(); break; case HID_REPORT_FEATURE: return (FALSE); /* Not Supported */ } return (TRUE); }