You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2021/10/15 15:33:41 UTC
[mynewt-core] 02/02: tinyusb: Allow USB in bootloader
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
commit 98e7816b464ae873db3ab3d48295bc44ae07040a
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Thu Oct 7 14:07:38 2021 +0200
tinyusb: Allow USB in bootloader
Bootloader does not have OS running.
This allows to compile bootloader with TinyUSB with no OS present.
---
hw/usb/tinyusb/std_descriptors/include/tusb_config.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/usb/tinyusb/std_descriptors/include/tusb_config.h b/hw/usb/tinyusb/std_descriptors/include/tusb_config.h
index 0d65c6b..08a1f71 100755
--- a/hw/usb/tinyusb/std_descriptors/include/tusb_config.h
+++ b/hw/usb/tinyusb/std_descriptors/include/tusb_config.h
@@ -44,7 +44,11 @@ extern "C" {
#define CFG_TUSB_RHPORT0_MODE OPT_MODE_DEVICE
+#if MYNEWT_VAL(BOOT_LOADER)
+#define CFG_TUSB_OS OPT_OS_NONE
+#else
#define CFG_TUSB_OS OPT_OS_MYNEWT
+#endif
#define CFG_TUSB_DEBUG 0
/* USB DMA on some MCUs can only access a specific SRAM region with restriction on alignment.