This is an automated email from the ASF dual-hosted git repository. jerzy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push: new 031df91 tinyusb: Fix DFU configuration in std_descriptors 031df91 is described below commit 031df91ec6e0b485d5428d07c6d98ee2f799a0e2 Author: Jerzy Kasenberg <jerzy.kasenb...@codecoup.pl> AuthorDate: Fri Nov 5 14:39:32 2021 +0100 tinyusb: Fix DFU configuration in std_descriptors This fixes two build errors: Definition USBD_DFU_DETACH_TIMEOUT was missing. If package dfu was no included USBD_DFU_SLOT_NAME was also missing --- hw/usb/tinyusb/std_descriptors/include/tusb_config.h | 6 ++++++ hw/usb/tinyusb/std_descriptors/src/std_descriptors.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/hw/usb/tinyusb/std_descriptors/include/tusb_config.h b/hw/usb/tinyusb/std_descriptors/include/tusb_config.h index ca85acd..f6c08f0 100755 --- a/hw/usb/tinyusb/std_descriptors/include/tusb_config.h +++ b/hw/usb/tinyusb/std_descriptors/include/tusb_config.h @@ -96,6 +96,12 @@ extern "C" { #define CFG_TUD_DFU_XFER_BUFSIZE 256 #endif +#if MYNEWT_VAL(USBD_DFU_DETACH_TIMEOUT) +#define CFG_TUD_DFU_DETACH_TIMEOUT MYNEWT_VAL(USBD_DFU_DETACH_TIMEOUT) +#else +#define CFG_TUD_DFU_DETACH_TIMEOUT 1000 +#endif + #ifdef __cplusplus } #endif diff --git a/hw/usb/tinyusb/std_descriptors/src/std_descriptors.c b/hw/usb/tinyusb/std_descriptors/src/std_descriptors.c index 194e5f6..1691f1d 100755 --- a/hw/usb/tinyusb/std_descriptors/src/std_descriptors.c +++ b/hw/usb/tinyusb/std_descriptors/src/std_descriptors.c @@ -250,7 +250,11 @@ const char *string_desc_arr[] = { MYNEWT_VAL(USBD_MSC_DESCRIPTOR_STRING), MYNEWT_VAL(USBD_HID_DESCRIPTOR_STRING), MYNEWT_VAL(USBD_BTH_DESCRIPTOR_STRING), +#if defined MYNEWT_VAL_USBD_DFU_SLOT_NAME MYNEWT_VAL(USBD_DFU_SLOT_NAME), +#else + NULL, +#endif }; static uint16_t desc_string[MYNEWT_VAL(USBD_STRING_DESCRIPTOR_MAX_LENGTH) + 1];