Skip to content

Commit 46bde99

Browse files
committed
Update USBCDC.cpp
1 parent 7f61d20 commit 46bde99

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libraries/USB/src/USBCDC.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ extern "C" {
2828
uint16_t tusb_dfu_load_descriptor(uint8_t * dst, uint8_t * itf)
2929
{
3030
uint8_t str_index = tinyusb_add_string_descriptor("TinyUSB DFU_RT");
31+
#if CFG_TUSB_DYNAMIC_DRIVER_LOAD
3132
LOAD_DEFAULT_TUSB_DRIVER(dfu_rt);
33+
#endif
3234

3335
#define DFU_ATTR_CAN_DOWNLOAD 1
3436
#define DFU_ATTR_CAN_UPLOAD 2
@@ -50,7 +52,9 @@ uint16_t tusb_dfu_load_descriptor(uint8_t * dst, uint8_t * itf)
5052
uint16_t tusb_cdc_load_descriptor(uint8_t * dst, uint8_t * itf)
5153
{
5254
uint8_t str_index = tinyusb_add_string_descriptor("TinyUSB CDC");
55+
#if CFG_TUSB_DYNAMIC_DRIVER_LOAD
5356
LOAD_DEFAULT_TUSB_DRIVER(cdc);
57+
#endif
5458
// Interface number, string index, attributes, detach timeout, transfer size */
5559
uint8_t descriptor[TUD_CDC_DESC_LEN] = {
5660
// Interface number, string index, EP notification address and size, EP data address (out, in) and size.

0 commit comments

Comments
 (0)