X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/8f6b4ddf764c3a54e42d00a7502c82c5c3e71b1c..e5e7eaee7af719cee00a8c2cb6fb4649dde0aa05:/Demos/Device/Mouse/Mouse.c?ds=sidebyside diff --git a/Demos/Device/Mouse/Mouse.c b/Demos/Device/Mouse/Mouse.c index e74002b7c..0959a4a12 100644 --- a/Demos/Device/Mouse/Mouse.c +++ b/Demos/Device/Mouse/Mouse.c @@ -40,11 +40,11 @@ TASK_LIST { #if !defined(INTERRUPT_CONTROL_ENDPOINT) - { Task: USB_USBTask , TaskStatus: TASK_STOP }, + { .Task = USB_USBTask , .TaskStatus = TASK_STOP }, #endif #if !defined(INTERRUPT_DATA_ENDPOINT) - { Task: USB_Mouse_Report , TaskStatus: TASK_STOP }, + { .Task = USB_Mouse_Report , .TaskStatus = TASK_STOP }, #endif }; @@ -206,7 +206,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket) if (wLength > sizeof(MouseReportData)) wLength = sizeof(MouseReportData); - Endpoint_ClearControlSETUP(); + Endpoint_ClearSETUP(); /* Write the report data to the control endpoint */ Endpoint_Write_Control_Stream_LE(&MouseReportData, wLength); @@ -215,24 +215,24 @@ EVENT_HANDLER(USB_UnhandledControlPacket) memset(&MouseReportData, 0, sizeof(MouseReportData)); /* Finalize the stream transfer to send the last packet or clear the host abort */ - Endpoint_ClearControlOUT(); + Endpoint_ClearOUT(); } break; case REQ_GetProtocol: if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE)) { - Endpoint_ClearControlSETUP(); + Endpoint_ClearSETUP(); /* Write the current protocol flag to the host */ Endpoint_Write_Byte(UsingReportProtocol); /* Send the flag to the host */ - Endpoint_ClearControlIN(); + Endpoint_ClearIN(); /* Acknowledge status stage */ while (!(Endpoint_IsOUTReceived())); - Endpoint_ClearControlOUT(); + Endpoint_ClearOUT(); } break; @@ -242,14 +242,14 @@ EVENT_HANDLER(USB_UnhandledControlPacket) /* Read in the wValue parameter containing the new protocol mode */ uint16_t wValue = Endpoint_Read_Word_LE(); - Endpoint_ClearControlSETUP(); + Endpoint_ClearSETUP(); /* Set or clear the flag depending on what the host indicates that the current Protocol should be */ UsingReportProtocol = (wValue != 0x0000); /* Acknowledge status stage */ while (!(Endpoint_IsINReady())); - Endpoint_ClearControlIN(); + Endpoint_ClearIN(); } break; @@ -259,31 +259,31 @@ EVENT_HANDLER(USB_UnhandledControlPacket) /* Read in the wValue parameter containing the idle period */ uint16_t wValue = Endpoint_Read_Word_LE(); - Endpoint_ClearControlSETUP(); + Endpoint_ClearSETUP(); /* Get idle period in MSB */ IdleCount = (wValue >> 8); /* Acknowledge status stage */ while (!(Endpoint_IsINReady())); - Endpoint_ClearControlIN(); + Endpoint_ClearIN(); } break; case REQ_GetIdle: if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE)) { - Endpoint_ClearControlSETUP(); + Endpoint_ClearSETUP(); /* Write the current idle duration to the host */ Endpoint_Write_Byte(IdleCount); /* Send the flag to the host */ - Endpoint_ClearControlIN(); + Endpoint_ClearIN(); /* Acknowledge status stage */ while (!(Endpoint_IsOUTReceived())); - Endpoint_ClearControlOUT(); + Endpoint_ClearOUT(); } break;