Finish initial draft of the Host Mode HID Class driver.

Add new MouseHostWithParser and KeyboardHostWithParser Host Class driver demos.
This commit is contained in:
Dean Camera 2009-09-21 10:49:06 +00:00
parent f5c645296c
commit 3ffa7543a0
24 changed files with 5385 additions and 88 deletions

View file

@ -113,18 +113,14 @@ int main(void)
case HOST_STATE_Configured:
if (HID_Host_IsReportReceived(&Mouse_HID_Interface))
{
USB_MouseReport_Data_t MouseReport;
uint8_t ReportID = 0;
uint8_t LEDMask = LEDS_NO_LEDS;
/* Receive next boot protocol mouse report from the device */
HID_Host_ReceiveReport(&Mouse_HID_Interface, false, &ReportID, &MouseReport);
USB_MouseReport_Data_t MouseReport;
HID_Host_ReceiveReport(&Mouse_HID_Interface, &MouseReport);
/* Print mouse report data through the serial port */
printf_P(PSTR("dX:%2d dY:%2d Button:%d\r\n"), MouseReport.X,
MouseReport.Y,
MouseReport.Button);
if (MouseReport.X > 0)
LEDMask |= LEDS_LED1;
else if (MouseReport.X < 0)