diff --git a/module_usb_audio/endpoint0/descriptors.h b/module_usb_audio/endpoint0/descriptors.h index 1b938cde..631164c9 100644 --- a/module_usb_audio/endpoint0/descriptors.h +++ b/module_usb_audio/endpoint0/descriptors.h @@ -1842,7 +1842,7 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2= #endif /* IAP */ #ifdef HID_CONTROLS - .HID_Interface = + .HID_Interface = { 9, /* 0 bLength : Size of descriptor in Bytes */ 4, /* 1 bDescriptorType (Interface: 0x04)*/ @@ -1855,7 +1855,7 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2= 0, /* 8 iInterface */ }, - { + { 9, /* 0 bLength : Size of descriptor in Bytes */ 0x21, /* 1 bDescriptorType (HID) */ 0x10, /* 2 bcdHID */ @@ -1865,9 +1865,9 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2= 0x22, /* 6 bDescriptorType[0] (Report) */ sizeof(hidReportDescriptor) & 0xff,/* 7 wDescriptorLength[0] */ sizeof(hidReportDescriptor) >> 8, /* 8 wDescriptorLength[0] */ - }, + }, - .HID_In_Endpoint = + .HID_In_Endpoint = { /* Endpoint descriptor (IN) */ 0x7, /* 0 bLength */ @@ -1884,7 +1884,7 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2= #ifdef HID_CONTROLS unsigned char hidDescriptor[] = -{ +{ 9, /* 0 bLength : Size of descriptor in Bytes */ 0x21, /* 1 bDescriptorType (HID) */ 0x10, /* 2 bcdHID */ @@ -1894,7 +1894,7 @@ unsigned char hidDescriptor[] = 0x22, /* 6 bDescriptorType[0] (Report) */ sizeof(hidReportDescriptor) & 0xff,/* 7 wDescriptorLength[0] */ sizeof(hidReportDescriptor) >> 8, /* 8 wDescriptorLength[0] */ -}; +}; #endif diff --git a/module_usb_audio/endpoint0/endpoint0.c b/module_usb_audio/endpoint0/endpoint0.c index 55cee49b..e026bb39 100755 --- a/module_usb_audio/endpoint0/endpoint0.c +++ b/module_usb_audio/endpoint0/endpoint0.c @@ -380,7 +380,7 @@ void Endpoint0(chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl, { /* High byte of wValue is descriptor type */ unsigned descriptorType = sp.wValue & 0xff00; - + switch (descriptorType) { case HID_HID: