Commit e5e7eaee authored by Dean Camera's avatar Dean Camera
Browse files

Removed specialized Endpoint_ClearControl* and Pipe_ClearControl* macros in...

Removed specialized Endpoint_ClearControl* and Pipe_ClearControl* macros in favour of the standard Endpoint_Clear* and Pipe_Clear* macros (Atmel have confirmed no effect from setting FIFOCON on control endpoints).
parent ba7cd3f2
...@@ -160,45 +160,45 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -160,45 +160,45 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
case REQ_GetLineEncoding: case REQ_GetLineEncoding:
if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE)) if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
{ {
Endpoint_ClearControlSETUP(); Endpoint_ClearSETUP();
for (uint8_t i = 0; i < sizeof(LineCoding); i++) for (uint8_t i = 0; i < sizeof(LineCoding); i++)
Endpoint_Write_Byte(*(LineCodingData++)); Endpoint_Write_Byte(*(LineCodingData++));
Endpoint_ClearControlIN(); Endpoint_ClearIN();
/* Acknowledge status stage */ /* Acknowledge status stage */
while (!(Endpoint_IsOUTReceived())); while (!(Endpoint_IsOUTReceived()));
Endpoint_ClearControlOUT(); Endpoint_ClearOUT();
} }
break; break;
case REQ_SetLineEncoding: case REQ_SetLineEncoding:
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE)) if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
{ {
Endpoint_ClearControlSETUP(); Endpoint_ClearSETUP();
while (!(Endpoint_IsOUTReceived())); while (!(Endpoint_IsOUTReceived()));
for (uint8_t i = 0; i < sizeof(LineCoding); i++) for (uint8_t i = 0; i < sizeof(LineCoding); i++)
*(LineCodingData++) = Endpoint_Read_Byte(); *(LineCodingData++) = Endpoint_Read_Byte();
Endpoint_ClearControlOUT(); Endpoint_ClearOUT();
/* Acknowledge status stage */ /* Acknowledge status stage */
while (!(Endpoint_IsINReady())); while (!(Endpoint_IsINReady()));
Endpoint_ClearControlIN(); Endpoint_ClearIN();
} }
break; break;
case REQ_SetControlLineState: case REQ_SetControlLineState:
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE)) if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
{ {
Endpoint_ClearControlSETUP(); Endpoint_ClearSETUP();
/* Acknowledge status stage */ /* Acknowledge status stage */
while (!(Endpoint_IsINReady())); while (!(Endpoint_IsINReady()));
Endpoint_ClearControlIN(); Endpoint_ClearIN();
} }
break; break;
......
...@@ -163,7 +163,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -163,7 +163,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
switch (bRequest) switch (bRequest)
{ {
case DFU_DNLOAD: case DFU_DNLOAD:
Endpoint_ClearControlSETUP(); Endpoint_ClearSETUP();
/* Check if bootloader is waiting to terminate */ /* Check if bootloader is waiting to terminate */
if (WaitForExit) if (WaitForExit)
...@@ -235,7 +235,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -235,7 +235,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
/* Check if endpoint is empty - if so clear it and wait until ready for next packet */ /* Check if endpoint is empty - if so clear it and wait until ready for next packet */
if (!(Endpoint_BytesInEndpoint())) if (!(Endpoint_BytesInEndpoint()))
{ {
Endpoint_ClearControlOUT(); Endpoint_ClearOUT();
while (!(Endpoint_IsOUTReceived())); while (!(Endpoint_IsOUTReceived()));
} }
...@@ -279,7 +279,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -279,7 +279,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
/* Check if endpoint is empty - if so clear it and wait until ready for next packet */ /* Check if endpoint is empty - if so clear it and wait until ready for next packet */
if (!(Endpoint_BytesInEndpoint())) if (!(Endpoint_BytesInEndpoint()))
{ {
Endpoint_ClearControlOUT(); Endpoint_ClearOUT();
while (!(Endpoint_IsOUTReceived())); while (!(Endpoint_IsOUTReceived()));
} }
...@@ -296,15 +296,15 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -296,15 +296,15 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
} }
} }
Endpoint_ClearControlOUT(); Endpoint_ClearOUT();
/* Acknowledge status stage */ /* Acknowledge status stage */
while (!(Endpoint_IsINReady())); while (!(Endpoint_IsINReady()));
Endpoint_ClearControlIN(); Endpoint_ClearIN();
break; break;
case DFU_UPLOAD: case DFU_UPLOAD:
Endpoint_ClearControlSETUP(); Endpoint_ClearSETUP();
while (!(Endpoint_IsINReady())); while (!(Endpoint_IsINReady()));
...@@ -343,7 +343,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -343,7 +343,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
/* Check if endpoint is full - if so clear it and wait until ready for next packet */ /* Check if endpoint is full - if so clear it and wait until ready for next packet */
if (Endpoint_BytesInEndpoint() == FIXED_CONTROL_ENDPOINT_SIZE) if (Endpoint_BytesInEndpoint() == FIXED_CONTROL_ENDPOINT_SIZE)
{ {
Endpoint_ClearControlIN(); Endpoint_ClearIN();
while (!(Endpoint_IsINReady())); while (!(Endpoint_IsINReady()));
} }
...@@ -368,7 +368,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -368,7 +368,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
/* Check if endpoint is full - if so clear it and wait until ready for next packet */ /* Check if endpoint is full - if so clear it and wait until ready for next packet */
if (Endpoint_BytesInEndpoint() == FIXED_CONTROL_ENDPOINT_SIZE) if (Endpoint_BytesInEndpoint() == FIXED_CONTROL_ENDPOINT_SIZE)
{ {
Endpoint_ClearControlIN(); Endpoint_ClearIN();
while (!(Endpoint_IsINReady())); while (!(Endpoint_IsINReady()));
} }
...@@ -384,15 +384,15 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -384,15 +384,15 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
DFU_State = dfuIDLE; DFU_State = dfuIDLE;
} }
Endpoint_ClearControlIN(); Endpoint_ClearIN();
/* Acknowledge status stage */ /* Acknowledge status stage */
while (!(Endpoint_IsOUTReceived())); while (!(Endpoint_IsOUTReceived()));
Endpoint_ClearControlOUT(); Endpoint_ClearOUT();
break; break;
case DFU_GETSTATUS: case DFU_GETSTATUS:
Endpoint_ClearControlSETUP(); Endpoint_ClearSETUP();
/* Write 8-bit status value */ /* Write 8-bit status value */
Endpoint_Write_Byte(DFU_Status); Endpoint_Write_Byte(DFU_Status);
...@@ -407,46 +407,46 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -407,46 +407,46 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
/* Write 8-bit state string ID number */ /* Write 8-bit state string ID number */
Endpoint_Write_Byte(0); Endpoint_Write_Byte(0);
Endpoint_ClearControlIN(); Endpoint_ClearIN();
/* Acknowledge status stage */ /* Acknowledge status stage */
while (!(Endpoint_IsOUTReceived())); while (!(Endpoint_IsOUTReceived()));
Endpoint_ClearControlOUT(); Endpoint_ClearOUT();
break; break;
case DFU_CLRSTATUS: case DFU_CLRSTATUS:
Endpoint_ClearControlSETUP(); Endpoint_ClearSETUP();
/* Reset the status value variable to the default OK status */ /* Reset the status value variable to the default OK status */
DFU_Status = OK; DFU_Status = OK;
/* Acknowledge status stage */ /* Acknowledge status stage */
while (!(Endpoint_IsINReady())); while (!(Endpoint_IsINReady()));
Endpoint_ClearControlIN(); Endpoint_ClearIN();
break; break;
case DFU_GETSTATE: case DFU_GETSTATE:
Endpoint_ClearControlSETUP(); Endpoint_ClearSETUP();
/* Write the current device state to the endpoint */ /* Write the current device state to the endpoint */
Endpoint_Write_Byte(DFU_State); Endpoint_Write_Byte(DFU_State);
Endpoint_ClearControlIN(); Endpoint_ClearIN();
/* Acknowledge status stage */ /* Acknowledge status stage */
while (!(Endpoint_IsOUTReceived())); while (!(Endpoint_IsOUTReceived()));
Endpoint_ClearControlOUT(); Endpoint_ClearOUT();
break; break;
case DFU_ABORT: case DFU_ABORT:
Endpoint_ClearControlSETUP(); Endpoint_ClearSETUP();
/* Reset the current state variable to the default idle state */ /* Reset the current state variable to the default idle state */
DFU_State = dfuIDLE; DFU_State = dfuIDLE;
/* Acknowledge status stage */ /* Acknowledge status stage */
while (!(Endpoint_IsINReady())); while (!(Endpoint_IsINReady()));
Endpoint_ClearControlIN(); Endpoint_ClearIN();
break; break;
} }
...@@ -463,7 +463,7 @@ static void DiscardFillerBytes(uint8_t NumberOfBytes) ...@@ -463,7 +463,7 @@ static void DiscardFillerBytes(uint8_t NumberOfBytes)
{ {
if (!(Endpoint_BytesInEndpoint())) if (!(Endpoint_BytesInEndpoint()))
{ {
Endpoint_ClearControlOUT(); Endpoint_ClearOUT();
/* Wait until next data packet received */ /* Wait until next data packet received */
while (!(Endpoint_IsOUTReceived())); while (!(Endpoint_IsOUTReceived()));
......
...@@ -101,7 +101,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -101,7 +101,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
case REQ_SetReport: case REQ_SetReport:
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE)) if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
{ {
Endpoint_ClearControlSETUP(); Endpoint_ClearSETUP();
/* Wait until the command (report) has been sent by the host */ /* Wait until the command (report) has been sent by the host */
while (!(Endpoint_IsOUTReceived())); while (!(Endpoint_IsOUTReceived()));
...@@ -126,7 +126,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -126,7 +126,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
/* Check if endpoint is empty - if so clear it and wait until ready for next packet */ /* Check if endpoint is empty - if so clear it and wait until ready for next packet */
if (!(Endpoint_BytesInEndpoint())) if (!(Endpoint_BytesInEndpoint()))
{ {
Endpoint_ClearControlOUT(); Endpoint_ClearOUT();
while (!(Endpoint_IsOUTReceived())); while (!(Endpoint_IsOUTReceived()));
} }
...@@ -142,11 +142,11 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -142,11 +142,11 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
boot_rww_enable(); boot_rww_enable();
} }
Endpoint_ClearControlOUT(); Endpoint_ClearOUT();
/* Acknowledge status stage */ /* Acknowledge status stage */
while (!(Endpoint_IsINReady())); while (!(Endpoint_IsINReady()));
Endpoint_ClearControlIN(); Endpoint_ClearIN();
} }
break; break;
......
...@@ -139,7 +139,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -139,7 +139,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
{ {
uint16_t wValue = Endpoint_Read_Word_LE(); uint16_t wValue = Endpoint_Read_Word_LE();
Endpoint_ClearControlSETUP(); Endpoint_ClearSETUP();
/* Check if the host is enabling the audio interface (setting AlternateSetting to 1) */ /* Check if the host is enabling the audio interface (setting AlternateSetting to 1) */
if (wValue) if (wValue)
...@@ -155,7 +155,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -155,7 +155,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
/* Acknowledge status stage */ /* Acknowledge status stage */
while (!(Endpoint_IsINReady())); while (!(Endpoint_IsINReady()));
Endpoint_ClearControlIN(); Endpoint_ClearIN();
} }
break; break;
......
...@@ -166,7 +166,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -166,7 +166,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
{ {
uint16_t wValue = Endpoint_Read_Word_LE(); uint16_t wValue = Endpoint_Read_Word_LE();
Endpoint_ClearControlSETUP(); Endpoint_ClearSETUP();
/* Check if the host is enabling the audio interface (setting AlternateSetting to 1) */ /* Check if the host is enabling the audio interface (setting AlternateSetting to 1) */
if (wValue) if (wValue)
...@@ -182,7 +182,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -182,7 +182,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
/* Acknowledge status stage */ /* Acknowledge status stage */
while (!(Endpoint_IsINReady())); while (!(Endpoint_IsINReady()));
Endpoint_ClearControlIN(); Endpoint_ClearIN();
} }
break; break;
......
...@@ -166,13 +166,13 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -166,13 +166,13 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE)) if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
{ {
/* Acknowledge the SETUP packet, ready for data transfer */ /* Acknowledge the SETUP packet, ready for data transfer */
Endpoint_ClearControlSETUP(); Endpoint_ClearSETUP();
/* Write the line coding data to the control endpoint */ /* Write the line coding data to the control endpoint */
Endpoint_Write_Control_Stream_LE(LineCodingData, sizeof(CDC_Line_Coding_t)); Endpoint_Write_Control_Stream_LE(LineCodingData, sizeof(CDC_Line_Coding_t));
/* Finalize the stream transfer to send the last packet or clear the host abort */ /* Finalize the stream transfer to send the last packet or clear the host abort */
Endpoint_ClearControlOUT(); Endpoint_ClearOUT();
} }
break; break;
...@@ -180,13 +180,13 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -180,13 +180,13 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE)) if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
{ {
/* Acknowledge the SETUP packet, ready for data transfer */ /* Acknowledge the SETUP packet, ready for data transfer */
Endpoint_ClearControlSETUP(); Endpoint_ClearSETUP();
/* Read the line coding data in from the host into the global struct */ /* Read the line coding data in from the host into the global struct */
Endpoint_Read_Control_Stream_LE(LineCodingData, sizeof(CDC_Line_Coding_t)); Endpoint_Read_Control_Stream_LE(LineCodingData, sizeof(CDC_Line_Coding_t));
/* Finalize the stream transfer to clear the last packet from the host */ /* Finalize the stream transfer to clear the last packet from the host */
Endpoint_ClearControlIN(); Endpoint_ClearIN();
} }
break; break;
...@@ -205,11 +205,11 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -205,11 +205,11 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
#endif #endif
/* Acknowledge the SETUP packet, ready for data transfer */ /* Acknowledge the SETUP packet, ready for data transfer */
Endpoint_ClearControlSETUP(); Endpoint_ClearSETUP();
/* Acknowledge status stage */ /* Acknowledge status stage */
while (!(Endpoint_IsINReady())); while (!(Endpoint_IsINReady()));
Endpoint_ClearControlIN(); Endpoint_ClearIN();
} }
break; break;
......
...@@ -204,13 +204,13 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -204,13 +204,13 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE)) if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
{ {
/* Acknowledge the SETUP packet, ready for data transfer */ /* Acknowledge the SETUP packet, ready for data transfer */
Endpoint_ClearControlSETUP(); Endpoint_ClearSETUP();
/* Write the line coding data to the control endpoint */ /* Write the line coding data to the control endpoint */
Endpoint_Write_Control_Stream_LE(LineCodingData, sizeof(CDC_Line_Coding_t)); Endpoint_Write_Control_Stream_LE(LineCodingData, sizeof(CDC_Line_Coding_t));
/* Finalize the stream transfer to send the last packet or clear the host abort */ /* Finalize the stream transfer to send the last packet or clear the host abort */
Endpoint_ClearControlOUT(); Endpoint_ClearOUT();
} }
break; break;
...@@ -218,13 +218,13 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -218,13 +218,13 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE)) if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
{ {
/* Acknowledge the SETUP packet, ready for data transfer */ /* Acknowledge the SETUP packet, ready for data transfer */
Endpoint_ClearControlSETUP(); Endpoint_ClearSETUP();
/* Read the line coding data in from the host into the global struct */ /* Read the line coding data in from the host into the global struct */
Endpoint_Read_Control_Stream_LE(LineCodingData, sizeof(CDC_Line_Coding_t)); Endpoint_Read_Control_Stream_LE(LineCodingData, sizeof(CDC_Line_Coding_t));
/* Finalize the stream transfer to clear the last packet from the host */ /* Finalize the stream transfer to clear the last packet from the host */
Endpoint_ClearControlIN(); Endpoint_ClearIN();
} }
break; break;
...@@ -232,11 +232,11 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -232,11 +232,11 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE)) if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
{ {
/* Acknowledge the SETUP packet, ready for data transfer */ /* Acknowledge the SETUP packet, ready for data transfer */
Endpoint_ClearControlSETUP(); Endpoint_ClearSETUP();
/* Acknowledge status stage */ /* Acknowledge status stage */
while (!(Endpoint_IsINReady())); while (!(Endpoint_IsINReady()));
Endpoint_ClearControlIN(); Endpoint_ClearIN();
} }
break; break;
......
...@@ -165,7 +165,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -165,7 +165,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
case REQ_GetReport: case REQ_GetReport:
if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE)) if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
{ {
Endpoint_ClearControlSETUP(); Endpoint_ClearSETUP();
uint8_t GenericData[GENERIC_REPORT_SIZE]; uint8_t GenericData[GENERIC_REPORT_SIZE];
...@@ -175,14 +175,14 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -175,14 +175,14 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
Endpoint_Write_Control_Stream_LE(&GenericData, sizeof(GenericData)); Endpoint_Write_Control_Stream_LE(&GenericData, sizeof(GenericData));
/* Finalize the stream transfer to send the last packet or clear the host abort */ /* Finalize the stream transfer to send the last packet or clear the host abort */
Endpoint_ClearControlOUT(); Endpoint_ClearOUT();
} }
break; break;
case REQ_SetReport: case REQ_SetReport:
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE)) if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
{ {
Endpoint_ClearControlSETUP(); Endpoint_ClearSETUP();
/* Wait until the generic report has been sent by the host */ /* Wait until the generic report has been sent by the host */
while (!(Endpoint_IsOUTReceived())); while (!(Endpoint_IsOUTReceived()));
...@@ -194,13 +194,13 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -194,13 +194,13 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
ProcessGenericHIDReport(GenericData); ProcessGenericHIDReport(GenericData);
/* Clear the endpoint data */ /* Clear the endpoint data */
Endpoint_ClearControlOUT(); Endpoint_ClearOUT();
/* Wait until the host is ready to receive the request confirmation */ /* Wait until the host is ready to receive the request confirmation */
while (!(Endpoint_IsINReady())); while (!(Endpoint_IsINReady()));
/* Handshake the request by sending an empty IN packet */ /* Handshake the request by sending an empty IN packet */
Endpoint_ClearControlIN(); Endpoint_ClearIN();
} }
break; break;
......
...@@ -145,13 +145,13 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ...@@ -145,13 +145,13 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
if (wLength > sizeof(JoystickReportData)) if (wLength > sizeof(JoystickReportData))
wLength = sizeof(JoystickReportData); wLength = sizeof(JoystickReportData);
Endpoint_ClearControlSETUP(); Endpoint_ClearSETUP();
/* Write the report data to the control endpoint */ /* Write the report data to the control endpoint */
Endpoint_Write_Control_Stream_LE(&JoystickReportData, wLength); Endpoint_Write_Control_Stream_LE(&JoystickReportData, wLength);