Skip to content

Commit

Permalink
samd: Fix to build with latest tinyusb.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmo authored and dpgeorge committed Mar 11, 2020
1 parent 6cea369 commit 211032a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions ports/samd/Makefile
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions ports/samd/tusb_port.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 211032a

Please sign in to comment.