@@ -169,15 +169,15 @@ TU_ATTR_WEAK bool tud_vendor_control_complete_cb(uint8_t rhport, tusb_control_re
169
169
/* CDC Header */ \
170
170
5 , TUSB_DESC_CS_INTERFACE , CDC_FUNC_DESC_HEADER , U16_TO_U8S_LE (0x0120 ),\
171
171
/* 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 ) ,\
173
173
/* CDC ACM: support line request */ \
174
174
4 , TUSB_DESC_CS_INTERFACE , CDC_FUNC_DESC_ABSTRACT_CONTROL_MANAGEMENT , 2 ,\
175
175
/* 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 ) ,\
177
177
/* Endpoint Notification */ \
178
178
7 , TUSB_DESC_ENDPOINT , _ep_notif , TUSB_XFER_INTERRUPT , U16_TO_U8S_LE (_ep_notif_size ), 16 ,\
179
179
/* 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 ,\
181
181
/* Endpoint Out */ \
182
182
7 , TUSB_DESC_ENDPOINT , _epout , TUSB_XFER_BULK , U16_TO_U8S_LE (_epsize ), 0 ,\
183
183
/* Endpoint In */ \
@@ -206,7 +206,7 @@ TU_ATTR_WEAK bool tud_vendor_control_complete_cb(uint8_t rhport, tusb_control_re
206
206
// Interface number, string index, protocol, report descriptor len, EP In address, size & polling interval
207
207
#define TUD_HID_DESCRIPTOR (_itfnum , _stridx , _boot_protocol , _report_desc_len , _epin , _epsize , _ep_interval ) \
208
208
/* 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 ,\
210
210
/* HID descriptor */ \
211
211
9 , HID_DESC_TYPE_HID , U16_TO_U8S_LE (0x0111 ), 0 , 1 , HID_DESC_TYPE_REPORT , U16_TO_U8S_LE (_report_desc_len ),\
212
212
/* Endpoint In */ \
@@ -219,7 +219,7 @@ TU_ATTR_WEAK bool tud_vendor_control_complete_cb(uint8_t rhport, tusb_control_re
219
219
// Interface number, string index, protocol, report descriptor len, EP OUT & IN address, size & polling interval
220
220
#define TUD_HID_INOUT_DESCRIPTOR (_itfnum , _stridx , _boot_protocol , _report_desc_len , _epout , _epin , _epsize , _ep_interval ) \
221
221
/* 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 ,\
223
223
/* HID descriptor */ \
224
224
9 , HID_DESC_TYPE_HID , U16_TO_U8S_LE (0x0111 ), 0 , 1 , HID_DESC_TYPE_REPORT , U16_TO_U8S_LE (_report_desc_len ),\
225
225
/* Endpoint Out */ \
@@ -239,9 +239,9 @@ TU_ATTR_WEAK bool tud_vendor_control_complete_cb(uint8_t rhport, tusb_control_re
239
239
/* Audio Control (AC) Interface */ \
240
240
9 , TUSB_DESC_INTERFACE , _itfnum , 0 , 0 , TUSB_CLASS_AUDIO , AUDIO_SUBCLASS_CONTROL , AUDIO_PROTOCOL_V1 , _stridx ,\
241
241
/* 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 ) ,\
243
243
/* 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 ,\
245
245
/* MS Header */ \
246
246
7 , TUSB_DESC_CS_INTERFACE , MIDI_CS_INTERFACE_HEADER , U16_TO_U8S_LE (0x0100 ), U16_TO_U8S_LE (0x0025 ),\
247
247
/* MS In Jack (Embedded) */ \
0 commit comments