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 186d04b040b03b1dde522b6b01548eae6046db47 Author: Jerzy Kasenberg <[email protected]> AuthorDate: Sun Dec 19 12:29:25 2021 +0100 tinyusb: Add USB high speed support This adds option for using USB high speed. --- hw/usb/tinyusb/da146xx/include/tusb_hw.h | 2 ++ hw/usb/tinyusb/nrf53/include/tusb_hw.h | 2 ++ hw/usb/tinyusb/nrf5x/include/tusb_hw.h | 2 ++ hw/usb/tinyusb/std_descriptors/include/tusb_config.h | 2 +- hw/usb/tinyusb/stm32_fsdev/include/tusb_hw.h | 2 ++ hw/usb/tinyusb/synopsys/include/tusb_hw.h | 2 ++ hw/usb/tinyusb/syscfg.yml | 4 ++++ 7 files changed, 15 insertions(+), 1 deletion(-) diff --git a/hw/usb/tinyusb/da146xx/include/tusb_hw.h b/hw/usb/tinyusb/da146xx/include/tusb_hw.h index 20aba82..17720a5 100644 --- a/hw/usb/tinyusb/da146xx/include/tusb_hw.h +++ b/hw/usb/tinyusb/da146xx/include/tusb_hw.h @@ -28,6 +28,8 @@ /* Function should be exported from TinyUSB */ void tusb_vbus_changed(bool present); +#define CFG_TUSB_RHPORT0_SPEED OPT_MODE_FULL_SPEED + #if defined(MYNEWT_VAL_USBD_CDC_NOTIFY_EP) #define USBD_CDC_NOTIFY_EP MYNEWT_VAL(USBD_CDC_NOTIFY_EP) #else diff --git a/hw/usb/tinyusb/nrf53/include/tusb_hw.h b/hw/usb/tinyusb/nrf53/include/tusb_hw.h index 88cd17f..75617c9 100644 --- a/hw/usb/tinyusb/nrf53/include/tusb_hw.h +++ b/hw/usb/tinyusb/nrf53/include/tusb_hw.h @@ -24,6 +24,8 @@ #include <syscfg/syscfg.h> +#define CFG_TUSB_RHPORT0_SPEED OPT_MODE_FULL_SPEED + #if defined(MYNEWT_VAL_USBD_CDC_NOTIFY_EP) #define USBD_CDC_NOTIFY_EP MYNEWT_VAL(USBD_CDC_NOTIFY_EP) #else diff --git a/hw/usb/tinyusb/nrf5x/include/tusb_hw.h b/hw/usb/tinyusb/nrf5x/include/tusb_hw.h index 88cd17f..75617c9 100755 --- a/hw/usb/tinyusb/nrf5x/include/tusb_hw.h +++ b/hw/usb/tinyusb/nrf5x/include/tusb_hw.h @@ -24,6 +24,8 @@ #include <syscfg/syscfg.h> +#define CFG_TUSB_RHPORT0_SPEED OPT_MODE_FULL_SPEED + #if defined(MYNEWT_VAL_USBD_CDC_NOTIFY_EP) #define USBD_CDC_NOTIFY_EP MYNEWT_VAL(USBD_CDC_NOTIFY_EP) #else diff --git a/hw/usb/tinyusb/std_descriptors/include/tusb_config.h b/hw/usb/tinyusb/std_descriptors/include/tusb_config.h index f6c08f0..ac31270 100755 --- a/hw/usb/tinyusb/std_descriptors/include/tusb_config.h +++ b/hw/usb/tinyusb/std_descriptors/include/tusb_config.h @@ -42,7 +42,7 @@ extern "C" { #error CFG_TUSB_MCU must be defined #endif -#define CFG_TUSB_RHPORT0_MODE OPT_MODE_DEVICE +#define CFG_TUSB_RHPORT0_MODE ((OPT_MODE_DEVICE) | (CFG_TUSB_RHPORT0_SPEED)) #if MYNEWT_VAL(BOOT_LOADER) #define CFG_TUSB_OS OPT_OS_NONE diff --git a/hw/usb/tinyusb/stm32_fsdev/include/tusb_hw.h b/hw/usb/tinyusb/stm32_fsdev/include/tusb_hw.h index 9a4752e..61c5c06 100755 --- a/hw/usb/tinyusb/stm32_fsdev/include/tusb_hw.h +++ b/hw/usb/tinyusb/stm32_fsdev/include/tusb_hw.h @@ -24,6 +24,8 @@ #include <syscfg/syscfg.h> +#define CFG_TUSB_RHPORT0_SPEED OPT_MODE_FULL_SPEED + #if defined(MYNEWT_VAL_USBD_CDC_NOTIFY_EP) #define USBD_CDC_NOTIFY_EP MYNEWT_VAL(USBD_CDC_NOTIFY_EP) #else diff --git a/hw/usb/tinyusb/synopsys/include/tusb_hw.h b/hw/usb/tinyusb/synopsys/include/tusb_hw.h index 885671d..6a241b7 100755 --- a/hw/usb/tinyusb/synopsys/include/tusb_hw.h +++ b/hw/usb/tinyusb/synopsys/include/tusb_hw.h @@ -22,6 +22,8 @@ #include <syscfg/syscfg.h> +#define CFG_TUSB_RHPORT0_SPEED OPT_MODE_FULL_SPEED + #if MYNEWT_VAL(MCU_STM32F4) #define CFG_TUSB_MCU OPT_MCU_STM32F4 #elif MYNEWT_VAL(MCU_STM32F7) diff --git a/hw/usb/tinyusb/syscfg.yml b/hw/usb/tinyusb/syscfg.yml index c76307b..dac44d3 100644 --- a/hw/usb/tinyusb/syscfg.yml +++ b/hw/usb/tinyusb/syscfg.yml @@ -39,3 +39,7 @@ syscfg.defs: Include descriptor support. This allows to easily use CDC, MSC, HID device functionality. value: 1 + USBD_HIGH_SPEED: + description: > + Enable USB high speed if device supports it. + value: 0
