EVENT_HANDLER(USB_UnhandledControlPacket)\r
{\r
/* Process General and Audio specific control requests */\r
- switch (bRequest)\r
+ switch (USB_ControlRequest.bRequest)\r
{\r
case REQ_SetInterface:\r
/* Set Interface is not handled by the library, as its function is application-specific */\r
- if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_INTERFACE))\r
+ if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_INTERFACE))\r
{\r
- uint16_t wValue = Endpoint_Read_Word_LE();\r
- \r
Endpoint_ClearSETUP();\r
\r
/* Check if the host is enabling the audio interface (setting AlternateSetting to 1) */\r
- if (wValue)\r
+ if (USB_ControlRequest.wValue)\r
{\r
/* Start audio task */\r
Scheduler_SetTaskMode(USB_Audio_Task, TASK_RUN);\r