@@ -169,15 +169,15 @@ TU_ATTR_WEAK bool tud_vendor_control_complete_cb(uint8_t rhport, tusb_control_re
169169 /* CDC Header */ \
170170 5 , TUSB_DESC_CS_INTERFACE , CDC_FUNC_DESC_HEADER , U16_TO_U8S_LE (0x0120 ),\
171171 /* CDC Call */ \
172- 5 , TUSB_DESC_CS_INTERFACE , CDC_FUNC_DESC_CALL_MANAGEMENT , 0 , ( _itfnum ) + 1 ,\
172+ 5 , TUSB_DESC_CS_INTERFACE , CDC_FUNC_DESC_CALL_MANAGEMENT , 0 , static_cast < uint8_t > (( _itfnum ) + 1 ) ,\
173173 /* CDC ACM: support line request */ \
174174 4 , TUSB_DESC_CS_INTERFACE , CDC_FUNC_DESC_ABSTRACT_CONTROL_MANAGEMENT , 2 ,\
175175 /* CDC Union */ \
176- 5 , TUSB_DESC_CS_INTERFACE , CDC_FUNC_DESC_UNION , _itfnum , ( _itfnum ) + 1 ,\
176+ 5 , TUSB_DESC_CS_INTERFACE , CDC_FUNC_DESC_UNION , _itfnum , static_cast < uint8_t > (( _itfnum ) + 1 ) ,\
177177 /* Endpoint Notification */ \
178178 7 , TUSB_DESC_ENDPOINT , _ep_notif , TUSB_XFER_INTERRUPT , U16_TO_U8S_LE (_ep_notif_size ), 16 ,\
179179 /* CDC Data Interface */ \
180- 9 , TUSB_DESC_INTERFACE , ( _itfnum )+ 1 , 0 , 2 , TUSB_CLASS_CDC_DATA , 0 , 0 , 0 ,\
180+ 9 , TUSB_DESC_INTERFACE , static_cast < uint8_t > (( _itfnum ) + 1 ) , 0 , 2 , TUSB_CLASS_CDC_DATA , 0 , 0 , 0 ,\
181181 /* Endpoint Out */ \
182182 7 , TUSB_DESC_ENDPOINT , _epout , TUSB_XFER_BULK , U16_TO_U8S_LE (_epsize ), 0 ,\
183183 /* Endpoint In */ \
@@ -206,7 +206,7 @@ TU_ATTR_WEAK bool tud_vendor_control_complete_cb(uint8_t rhport, tusb_control_re
206206// Interface number, string index, protocol, report descriptor len, EP In address, size & polling interval
207207#define TUD_HID_DESCRIPTOR (_itfnum , _stridx , _boot_protocol , _report_desc_len , _epin , _epsize , _ep_interval ) \
208208 /* Interface */ \
209- 9 , TUSB_DESC_INTERFACE , _itfnum , 0 , 1 , TUSB_CLASS_HID , ( _boot_protocol ) ? HID_SUBCLASS_BOOT : 0 , _boot_protocol , _stridx ,\
209+ 9 , TUSB_DESC_INTERFACE , _itfnum , 0 , 1 , TUSB_CLASS_HID , static_cast < uint8_t > (( _boot_protocol ) ? HID_SUBCLASS_BOOT : 0 ) , _boot_protocol , _stridx ,\
210210 /* HID descriptor */ \
211211 9 , HID_DESC_TYPE_HID , U16_TO_U8S_LE (0x0111 ), 0 , 1 , HID_DESC_TYPE_REPORT , U16_TO_U8S_LE (_report_desc_len ),\
212212 /* Endpoint In */ \
@@ -219,7 +219,7 @@ TU_ATTR_WEAK bool tud_vendor_control_complete_cb(uint8_t rhport, tusb_control_re
219219// Interface number, string index, protocol, report descriptor len, EP OUT & IN address, size & polling interval
220220#define TUD_HID_INOUT_DESCRIPTOR (_itfnum , _stridx , _boot_protocol , _report_desc_len , _epout , _epin , _epsize , _ep_interval ) \
221221 /* Interface */ \
222- 9 , TUSB_DESC_INTERFACE , _itfnum , 0 , 2 , TUSB_CLASS_HID , ( _boot_protocol ) ? HID_SUBCLASS_BOOT : 0 , _boot_protocol , _stridx ,\
222+ 9 , TUSB_DESC_INTERFACE , _itfnum , 0 , 2 , TUSB_CLASS_HID , static_cast < uint8_t > (( _boot_protocol ) ? HID_SUBCLASS_BOOT : 0 ) , _boot_protocol , _stridx ,\
223223 /* HID descriptor */ \
224224 9 , HID_DESC_TYPE_HID , U16_TO_U8S_LE (0x0111 ), 0 , 1 , HID_DESC_TYPE_REPORT , U16_TO_U8S_LE (_report_desc_len ),\
225225 /* Endpoint Out */ \
@@ -239,9 +239,9 @@ TU_ATTR_WEAK bool tud_vendor_control_complete_cb(uint8_t rhport, tusb_control_re
239239 /* Audio Control (AC) Interface */ \
240240 9 , TUSB_DESC_INTERFACE , _itfnum , 0 , 0 , TUSB_CLASS_AUDIO , AUDIO_SUBCLASS_CONTROL , AUDIO_PROTOCOL_V1 , _stridx ,\
241241 /* AC Header */ \
242- 9 , TUSB_DESC_CS_INTERFACE , AUDIO_CS_INTERFACE_HEADER , U16_TO_U8S_LE (0x0100 ), U16_TO_U8S_LE (0x0009 ), 1 , _itfnum + 1 ,\
242+ 9 , TUSB_DESC_CS_INTERFACE , AUDIO_CS_INTERFACE_HEADER , U16_TO_U8S_LE (0x0100 ), U16_TO_U8S_LE (0x0009 ), 1 , static_cast < uint8_t > (( _itfnum ) + 1 ) ,\
243243 /* MIDI Streaming (MS) Interface */ \
244- 9 , TUSB_DESC_INTERFACE , _itfnum + 1 , 0 , 2 , TUSB_CLASS_AUDIO , AUDIO_SUBCLASS_MIDI_STREAMING , AUDIO_PROTOCOL_V1 , 0 ,\
244+ 9 , TUSB_DESC_INTERFACE , static_cast < uint8_t > (( _itfnum ) + 1 ) , 0 , 2 , TUSB_CLASS_AUDIO , AUDIO_SUBCLASS_MIDI_STREAMING , AUDIO_PROTOCOL_V1 , 0 ,\
245245 /* MS Header */ \
246246 7 , TUSB_DESC_CS_INTERFACE , MIDI_CS_INTERFACE_HEADER , U16_TO_U8S_LE (0x0100 ), U16_TO_U8S_LE (0x0025 ),\
247247 /* MS In Jack (Embedded) */ \
0 commit comments