From 95e05b332a69bda7878e432ff5ec851cfe99c526 Mon Sep 17 00:00:00 2001 From: code-fiasco Date: Mon, 26 Jan 2026 11:02:07 +0000 Subject: [PATCH 1/5] STM32 F4 Support Adds STM32F4 support to TinyUSB Arduino library byt adding stm32 port files and modifying 'tusb_config.h' to check for STM32 Architecture. --- .../ports/stm32/Adafruit_TinyUSB_stm32.cpp | 104 ++++++++++++++++++ src/arduino/ports/stm32/tusb_config_stm32.h | 65 +++++++++++ src/tusb_config.h | 4 + 3 files changed, 173 insertions(+) create mode 100644 src/arduino/ports/stm32/Adafruit_TinyUSB_stm32.cpp create mode 100644 src/arduino/ports/stm32/tusb_config_stm32.h diff --git a/src/arduino/ports/stm32/Adafruit_TinyUSB_stm32.cpp b/src/arduino/ports/stm32/Adafruit_TinyUSB_stm32.cpp new file mode 100644 index 00000000..c31f2498 --- /dev/null +++ b/src/arduino/ports/stm32/Adafruit_TinyUSB_stm32.cpp @@ -0,0 +1,104 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2019, hathach for Adafruit + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + + #include "tusb_option.h" + +#if (defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_ARDUINO_CORE_STM32)) && CFG_TUD_ENABLED + +#define USE_HAL_DRIVER +#include "stm32f4xx_hal.h" +#include "stm32f4xx_hal_rcc.h" +#include "Arduino.h" +#include "arduino/Adafruit_TinyUSB_API.h" +#include "tusb.h" + +//--------------------------------------------------------------------+ +// Forward USB interrupt events to TinyUSB IRQ Handler +//--------------------------------------------------------------------+ +extern "C" { + +void OTG_FS_IRQHandler(void) +{ + tud_int_handler(0); +} + +void yield(void) +{ + tud_task(); + if (tud_cdc_connected()) { + tud_cdc_write_flush(); + } +} + +} // extern "C" + +//--------------------------------------------------------------------+ +// Porting API +//--------------------------------------------------------------------+ +void TinyUSB_Port_InitDevice(uint8_t rhport) +{ + (void) rhport; + + // Enable clocks FIRST + __HAL_RCC_GPIOA_CLK_ENABLE(); + __HAL_RCC_USB_OTG_FS_CLK_ENABLE(); + + // Configure USB pins (PA11 = DM, PA12 = DP) + GPIO_InitTypeDef GPIO_InitStruct = {}; + GPIO_InitStruct.Pin = GPIO_PIN_11 | GPIO_PIN_12; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + + // Enable USB IRQ + NVIC_SetPriority(OTG_FS_IRQn, 0); + NVIC_EnableIRQ(OTG_FS_IRQn); + + // Disable VBUS sensing (we're bus-powered, don't need it) + USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_NOVBUSSENS; + USB_OTG_FS->GCCFG &= ~USB_OTG_GCCFG_VBUSBSEN; + USB_OTG_FS->GCCFG &= ~USB_OTG_GCCFG_VBUSASEN; + + // Initialize TinyUSB device stack + tud_init(rhport); + +} + +void TinyUSB_Port_EnterDFU(void) { + // Optional - implement bootloader entry if needed +} + +uint8_t TinyUSB_Port_GetSerialNumber(uint8_t serial_id[16]) +{ + volatile uint32_t *uid = (volatile uint32_t *)0x1FFF7A10; // STM32F411 UID base + uint32_t *serial_32 = (uint32_t *)serial_id; + serial_32[0] = uid[0]; + serial_32[1] = uid[1]; + serial_32[2] = uid[2]; + return 12; +} + +#endif // ARDUINO_ARCH_STM32 \ No newline at end of file diff --git a/src/arduino/ports/stm32/tusb_config_stm32.h b/src/arduino/ports/stm32/tusb_config_stm32.h new file mode 100644 index 00000000..6bb60fc7 --- /dev/null +++ b/src/arduino/ports/stm32/tusb_config_stm32.h @@ -0,0 +1,65 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2019, hathach for Adafruit + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef TUSB_CONFIG_STM32_H_ +#define TUSB_CONFIG_STM32_H_ + +// USB Port +#define CFG_TUSB_RHPORT0_MODE OPT_MODE_DEVICE +#define CFG_TUSB_RHPORT0_SPEED OPT_FULL_SPEED +#define CFG_TUSB_RHPORT1_MODE OPT_MODE_NONE + +// MCU / OS +#define CFG_TUSB_MCU OPT_MCU_STM32F4 +#define CFG_TUSB_OS OPT_OS_NONE + +// Debug +#ifndef CFG_TUSB_DEBUG +#define CFG_TUSB_DEBUG 0 +#endif + +#define CFG_TUSB_MEM_SECTION +#define CFG_TUSB_MEM_ALIGN __attribute__((aligned(4))) + +// Device stack +#define CFG_TUD_ENABLED 1 +#define CFG_TUD_ENDPOINT0_SIZE 64 + +// Classes +#define CFG_TUD_CDC 1 +#define CFG_TUD_MSC 0 +#define CFG_TUD_HID 1 +#define CFG_TUD_MIDI 1 +#define CFG_TUD_VENDOR 0 + +// Buffer sizes +#define CFG_TUD_CDC_RX_BUFSIZE 64 +#define CFG_TUD_CDC_TX_BUFSIZE 64 +#define CFG_TUD_HID_EP_BUFSIZE 64 +#define CFG_TUD_MIDI_RX_BUFSIZE 128 +#define CFG_TUD_MIDI_TX_BUFSIZE 128 +#define CFG_TUD_VENDOR_RX_BUFSIZE 64 +#define CFG_TUD_VENDOR_TX_BUFSIZE 64 + +#endif diff --git a/src/tusb_config.h b/src/tusb_config.h index df0752a7..42273e0d 100644 --- a/src/tusb_config.h +++ b/src/tusb_config.h @@ -43,6 +43,10 @@ #elif defined(ARDUINO_ARCH_CH32) || defined(CH32V20x) || defined(CH32V30x) #include "arduino/ports/ch32/tusb_config_ch32.h" + +#elif defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_ARDUINO_CORE_STM32) + #include "arduino/ports/stm32/tusb_config_stm32.h" + #else #error TinyUSB Arduino Library does not support your core yet #endif From 994eda957d3d500eaf690d44d6eb22b69f872105 Mon Sep 17 00:00:00 2001 From: code-fiasco Date: Mon, 26 Jan 2026 15:19:45 +0000 Subject: [PATCH 2/5] Redirect Serial to SerialTinyUSB Modified tusb_config_stm32.h to automatically map `Serial` to `SerialTinyUSB` for all STM32 boards, removing the need for users to manually `#define Serial SerialTinyUSB` in every sketch. --- src/arduino/ports/stm32/tusb_config_stm32.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/arduino/ports/stm32/tusb_config_stm32.h b/src/arduino/ports/stm32/tusb_config_stm32.h index 6bb60fc7..ae49aa7f 100644 --- a/src/arduino/ports/stm32/tusb_config_stm32.h +++ b/src/arduino/ports/stm32/tusb_config_stm32.h @@ -62,4 +62,7 @@ #define CFG_TUD_VENDOR_RX_BUFSIZE 64 #define CFG_TUD_VENDOR_TX_BUFSIZE 64 +//Serial Redirect +#define Serial SerialTinyUSB + #endif From cb82cbb2b759150edfbb79d0ae84f4e369926032 Mon Sep 17 00:00:00 2001 From: code-fiasco Date: Wed, 4 Feb 2026 13:17:36 +0000 Subject: [PATCH 3/5] Apply clang-format --- .../ports/stm32/Adafruit_TinyUSB_stm32.cpp | 102 +++++++++--------- src/arduino/ports/stm32/tusb_config_stm32.h | 26 ++--- 2 files changed, 62 insertions(+), 66 deletions(-) diff --git a/src/arduino/ports/stm32/Adafruit_TinyUSB_stm32.cpp b/src/arduino/ports/stm32/Adafruit_TinyUSB_stm32.cpp index c31f2498..f40a2a93 100644 --- a/src/arduino/ports/stm32/Adafruit_TinyUSB_stm32.cpp +++ b/src/arduino/ports/stm32/Adafruit_TinyUSB_stm32.cpp @@ -22,15 +22,17 @@ * THE SOFTWARE. */ - #include "tusb_option.h" +#include "tusb_option.h" -#if (defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_ARDUINO_CORE_STM32)) && CFG_TUD_ENABLED +#if (defined(ARDUINO_ARCH_STM32) || \ + defined(ARDUINO_ARCH_ARDUINO_CORE_STM32)) && \ + CFG_TUD_ENABLED #define USE_HAL_DRIVER -#include "stm32f4xx_hal.h" -#include "stm32f4xx_hal_rcc.h" #include "Arduino.h" #include "arduino/Adafruit_TinyUSB_API.h" +#include "stm32f4xx_hal.h" +#include "stm32f4xx_hal_rcc.h" #include "tusb.h" //--------------------------------------------------------------------+ @@ -38,17 +40,13 @@ //--------------------------------------------------------------------+ extern "C" { -void OTG_FS_IRQHandler(void) -{ - tud_int_handler(0); -} +void OTG_FS_IRQHandler(void) { tud_int_handler(0); } -void yield(void) -{ - tud_task(); - if (tud_cdc_connected()) { - tud_cdc_write_flush(); - } +void yield(void) { + tud_task(); + if (tud_cdc_connected()) { + tud_cdc_write_flush(); + } } } // extern "C" @@ -56,49 +54,47 @@ void yield(void) //--------------------------------------------------------------------+ // Porting API //--------------------------------------------------------------------+ -void TinyUSB_Port_InitDevice(uint8_t rhport) -{ - (void) rhport; - - // Enable clocks FIRST - __HAL_RCC_GPIOA_CLK_ENABLE(); - __HAL_RCC_USB_OTG_FS_CLK_ENABLE(); - - // Configure USB pins (PA11 = DM, PA12 = DP) - GPIO_InitTypeDef GPIO_InitStruct = {}; - GPIO_InitStruct.Pin = GPIO_PIN_11 | GPIO_PIN_12; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS; - HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); - - // Enable USB IRQ - NVIC_SetPriority(OTG_FS_IRQn, 0); - NVIC_EnableIRQ(OTG_FS_IRQn); - - // Disable VBUS sensing (we're bus-powered, don't need it) - USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_NOVBUSSENS; - USB_OTG_FS->GCCFG &= ~USB_OTG_GCCFG_VBUSBSEN; - USB_OTG_FS->GCCFG &= ~USB_OTG_GCCFG_VBUSASEN; - - // Initialize TinyUSB device stack - tud_init(rhport); - +void TinyUSB_Port_InitDevice(uint8_t rhport) { + (void)rhport; + + // Enable clocks FIRST + __HAL_RCC_GPIOA_CLK_ENABLE(); + __HAL_RCC_USB_OTG_FS_CLK_ENABLE(); + + // Configure USB pins (PA11 = DM, PA12 = DP) + GPIO_InitTypeDef GPIO_InitStruct = {}; + GPIO_InitStruct.Pin = GPIO_PIN_11 | GPIO_PIN_12; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + + // Enable USB IRQ + NVIC_SetPriority(OTG_FS_IRQn, 0); + NVIC_EnableIRQ(OTG_FS_IRQn); + + // Disable VBUS sensing (we're bus-powered, don't need it) + USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_NOVBUSSENS; + USB_OTG_FS->GCCFG &= ~USB_OTG_GCCFG_VBUSBSEN; + USB_OTG_FS->GCCFG &= ~USB_OTG_GCCFG_VBUSASEN; + + // Initialize TinyUSB device stack + tud_init(rhport); } -void TinyUSB_Port_EnterDFU(void) { - // Optional - implement bootloader entry if needed +void TinyUSB_Port_EnterDFU(void) { + // Optional - implement bootloader entry if needed } -uint8_t TinyUSB_Port_GetSerialNumber(uint8_t serial_id[16]) -{ - volatile uint32_t *uid = (volatile uint32_t *)0x1FFF7A10; // STM32F411 UID base - uint32_t *serial_32 = (uint32_t *)serial_id; - serial_32[0] = uid[0]; - serial_32[1] = uid[1]; - serial_32[2] = uid[2]; - return 12; +uint8_t TinyUSB_Port_GetSerialNumber(uint8_t serial_id[16]) { + volatile uint32_t *uid = + (volatile uint32_t *)0x1FFF7A10; // STM32F411 UID base + uint32_t *serial_32 = (uint32_t *)serial_id; + serial_32[0] = uid[0]; + serial_32[1] = uid[1]; + serial_32[2] = uid[2]; + return 12; } #endif // ARDUINO_ARCH_STM32 \ No newline at end of file diff --git a/src/arduino/ports/stm32/tusb_config_stm32.h b/src/arduino/ports/stm32/tusb_config_stm32.h index ae49aa7f..b983241b 100644 --- a/src/arduino/ports/stm32/tusb_config_stm32.h +++ b/src/arduino/ports/stm32/tusb_config_stm32.h @@ -26,13 +26,13 @@ #define TUSB_CONFIG_STM32_H_ // USB Port -#define CFG_TUSB_RHPORT0_MODE OPT_MODE_DEVICE +#define CFG_TUSB_RHPORT0_MODE OPT_MODE_DEVICE #define CFG_TUSB_RHPORT0_SPEED OPT_FULL_SPEED -#define CFG_TUSB_RHPORT1_MODE OPT_MODE_NONE +#define CFG_TUSB_RHPORT1_MODE OPT_MODE_NONE // MCU / OS #define CFG_TUSB_MCU OPT_MCU_STM32F4 -#define CFG_TUSB_OS OPT_OS_NONE +#define CFG_TUSB_OS OPT_OS_NONE // Debug #ifndef CFG_TUSB_DEBUG @@ -43,26 +43,26 @@ #define CFG_TUSB_MEM_ALIGN __attribute__((aligned(4))) // Device stack -#define CFG_TUD_ENABLED 1 +#define CFG_TUD_ENABLED 1 #define CFG_TUD_ENDPOINT0_SIZE 64 // Classes -#define CFG_TUD_CDC 1 -#define CFG_TUD_MSC 0 -#define CFG_TUD_HID 1 -#define CFG_TUD_MIDI 1 -#define CFG_TUD_VENDOR 0 +#define CFG_TUD_CDC 1 +#define CFG_TUD_MSC 0 +#define CFG_TUD_HID 1 +#define CFG_TUD_MIDI 1 +#define CFG_TUD_VENDOR 0 // Buffer sizes -#define CFG_TUD_CDC_RX_BUFSIZE 64 -#define CFG_TUD_CDC_TX_BUFSIZE 64 -#define CFG_TUD_HID_EP_BUFSIZE 64 +#define CFG_TUD_CDC_RX_BUFSIZE 64 +#define CFG_TUD_CDC_TX_BUFSIZE 64 +#define CFG_TUD_HID_EP_BUFSIZE 64 #define CFG_TUD_MIDI_RX_BUFSIZE 128 #define CFG_TUD_MIDI_TX_BUFSIZE 128 #define CFG_TUD_VENDOR_RX_BUFSIZE 64 #define CFG_TUD_VENDOR_TX_BUFSIZE 64 -//Serial Redirect +// Serial Redirect #define Serial SerialTinyUSB #endif From 6e38500f080019fe79468391f43d0d3f9a607712 Mon Sep 17 00:00:00 2001 From: code-fiasco Date: Thu, 5 Feb 2026 14:38:35 +0000 Subject: [PATCH 4/5] Update tusb_config_stm32.h Enable MSC and VENDOR modes in tusb_config_stm32.h --- src/arduino/ports/stm32/tusb_config_stm32.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arduino/ports/stm32/tusb_config_stm32.h b/src/arduino/ports/stm32/tusb_config_stm32.h index b983241b..28f04781 100644 --- a/src/arduino/ports/stm32/tusb_config_stm32.h +++ b/src/arduino/ports/stm32/tusb_config_stm32.h @@ -48,10 +48,10 @@ // Classes #define CFG_TUD_CDC 1 -#define CFG_TUD_MSC 0 +#define CFG_TUD_MSC 1 #define CFG_TUD_HID 1 #define CFG_TUD_MIDI 1 -#define CFG_TUD_VENDOR 0 +#define CFG_TUD_VENDOR 1 // Buffer sizes #define CFG_TUD_CDC_RX_BUFSIZE 64 From 88ef94290bef515f13579b5c0794d371b30e6e7a Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 6 Feb 2026 00:27:51 +0700 Subject: [PATCH 5/5] add stm32 to readme as wip and update tusb_config_stm32.h --- README.md | 2 ++ src/arduino/ports/stm32/tusb_config_stm32.h | 32 +++++++++++++-------- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 5b346b2a..b6497116 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,8 @@ Note: For ESP32 port, version before v3.0 requires all descriptors must be speci Following is cores without built-in support - **mbed_rp2040** +- **[stm32duino/Arduino_Core_STM32](https://github.com/stm32duino/Arduino_Core_STM32)** + - Still WIP, only support/tested with F4, only support OTG_FS It is still possible to use TinyUSB but with some limits such as: diff --git a/src/arduino/ports/stm32/tusb_config_stm32.h b/src/arduino/ports/stm32/tusb_config_stm32.h index 28f04781..9b719450 100644 --- a/src/arduino/ports/stm32/tusb_config_stm32.h +++ b/src/arduino/ports/stm32/tusb_config_stm32.h @@ -25,11 +25,9 @@ #ifndef TUSB_CONFIG_STM32_H_ #define TUSB_CONFIG_STM32_H_ -// USB Port -#define CFG_TUSB_RHPORT0_MODE OPT_MODE_DEVICE -#define CFG_TUSB_RHPORT0_SPEED OPT_FULL_SPEED -#define CFG_TUSB_RHPORT1_MODE OPT_MODE_NONE - +//-------------------------------------------------------------------- +// COMMON CONFIGURATION +//-------------------------------------------------------------------- // MCU / OS #define CFG_TUSB_MCU OPT_MCU_STM32F4 #define CFG_TUSB_OS OPT_OS_NONE @@ -42,8 +40,11 @@ #define CFG_TUSB_MEM_SECTION #define CFG_TUSB_MEM_ALIGN __attribute__((aligned(4))) -// Device stack +//-------------------------------------------------------------------- +// DEVICE CONFIGURATION +//-------------------------------------------------------------------- #define CFG_TUD_ENABLED 1 +#define CFG_TUD_MAX_SPEED OPT_MODE_FULL_SPEED // TODO some are highspeed #define CFG_TUD_ENDPOINT0_SIZE 64 // Classes @@ -54,15 +55,22 @@ #define CFG_TUD_VENDOR 1 // Buffer sizes -#define CFG_TUD_CDC_RX_BUFSIZE 64 -#define CFG_TUD_CDC_TX_BUFSIZE 64 +#define CFG_TUD_CDC_RX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64) +#define CFG_TUD_CDC_TX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64) +#define CFG_TUD_CDC_EP_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64) +#define CFG_TUD_MSC_EP_BUFSIZE 512 #define CFG_TUD_HID_EP_BUFSIZE 64 -#define CFG_TUD_MIDI_RX_BUFSIZE 128 -#define CFG_TUD_MIDI_TX_BUFSIZE 128 -#define CFG_TUD_VENDOR_RX_BUFSIZE 64 -#define CFG_TUD_VENDOR_TX_BUFSIZE 64 +#define CFG_TUD_MIDI_RX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 128) +#define CFG_TUD_MIDI_TX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 128) +#define CFG_TUD_VENDOR_RX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64) +#define CFG_TUD_VENDOR_TX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64) // Serial Redirect #define Serial SerialTinyUSB +//-------------------------------------------------------------------- +// Host Configuration +//-------------------------------------------------------------------- +#define CFG_TUH_ENABLED 0 // disable for now + #endif