Browse Source

samd: Fix to build with latest tinyusb.

pull/5749/head
Jim Mussared 5 years ago
committed by Damien George
parent
commit
211032a5c9
  1. 3
      ports/samd/Makefile
  2. 4
      ports/samd/tusb_port.c

3
ports/samd/Makefile

@ -63,16 +63,15 @@ SRC_C = \
lib/tinyusb/src/common/tusb_fifo.c \
lib/tinyusb/src/device/usbd.c \
lib/tinyusb/src/device/usbd_control.c \
lib/tinyusb/src/portable/microchip/samd/dcd_samd.c \
lib/tinyusb/src/tusb.c \
lib/utils/printf.c \
lib/utils/pyexec.c \
lib/utils/stdout_helpers.c \
ifeq ($(MCU_SERIES),SAMD21)
SRC_C += lib/tinyusb/src/portable/microchip/samd21/dcd_samd21.c
SRC_S = lib/utils/gchelper_m0.s
else
SRC_C += lib/tinyusb/src/portable/microchip/samd51/dcd_samd51.c
SRC_S = lib/utils/gchelper_m3.s
endif

4
ports/samd/tusb_port.c

@ -108,8 +108,8 @@ const uint16_t *tud_descriptor_string_cb(uint8_t index) {
}
}
// first byte is len, second byte is string type
desc_str[0] = TUD_DESC_STR_HEADER(len);
// first byte is length (including header), second byte is string type
desc_str[0] = (TUSB_DESC_STRING << 8 ) | (2 * len + 2);
return desc_str;
}

Loading…
Cancel
Save