diff --git a/src/common/tusb_types.h b/src/common/tusb_types.h index ba3fe2c4..922d3daf 100644 --- a/src/common/tusb_types.h +++ b/src/common/tusb_types.h @@ -309,6 +309,8 @@ typedef struct TU_ATTR_PACKED uint8_t bMaxPower ; ///< Maximum power consumption of the USB device from the bus in this specific configuration when the device is fully operational. Expressed in 2 mA units (i.e., 50 = 100 mA). } tusb_desc_configuration_t; +TU_VERIFY_STATIC( sizeof(tusb_desc_configuration_t) == 9, "size is not correct"); + /// USB Interface Descriptor typedef struct TU_ATTR_PACKED { diff --git a/src/portable/espressif/esp32sx/dcd_esp32sx.c b/src/portable/espressif/esp32sx/dcd_esp32sx.c index 74842a29..502273a9 100644 --- a/src/portable/espressif/esp32sx/dcd_esp32sx.c +++ b/src/portable/espressif/esp32sx/dcd_esp32sx.c @@ -27,7 +27,6 @@ */ #include "tusb_option.h" -#include "common/tusb_fifo.h" #if (((CFG_TUSB_MCU == OPT_MCU_ESP32S2) || (CFG_TUSB_MCU == OPT_MCU_ESP32S3)) && TUSB_OPT_DEVICE_ENABLED) @@ -41,6 +40,7 @@ #include "soc/gpio_sig_map.h" #include "soc/usb_periph.h" +#include "common/tusb_fifo.h" #include "device/dcd.h" // Since TinyUSB doesn't use SOF for now, and this interrupt too often (1ms interval) diff --git a/src/portable/microchip/samg/dcd_samg.c b/src/portable/microchip/samg/dcd_samg.c index 62fab8d1..9b6a1f9a 100644 --- a/src/portable/microchip/samg/dcd_samg.c +++ b/src/portable/microchip/samg/dcd_samg.c @@ -25,11 +25,11 @@ */ #include "tusb_option.h" -#include "common/tusb_fifo.h" #if CFG_TUSB_MCU == OPT_MCU_SAMG #include "sam.h" +#include "common/tusb_fifo.h" #include "device/dcd.h" // TODO should support (SAM3S || SAM4S || SAM4E || SAMG55) diff --git a/src/portable/nuvoton/nuc120/dcd_nuc120.c b/src/portable/nuvoton/nuc120/dcd_nuc120.c index 5dc3bca2..7aeb49f2 100644 --- a/src/portable/nuvoton/nuc120/dcd_nuc120.c +++ b/src/portable/nuvoton/nuc120/dcd_nuc120.c @@ -34,10 +34,10 @@ */ #include "tusb_option.h" -#include "common/tusb_fifo.h" #if TUSB_OPT_DEVICE_ENABLED && (CFG_TUSB_MCU == OPT_MCU_NUC120) +#include "common/tusb_fifo.h" #include "device/dcd.h" #include "NUC100Series.h" diff --git a/src/portable/nuvoton/nuc121/dcd_nuc121.c b/src/portable/nuvoton/nuc121/dcd_nuc121.c index d50e8284..e76d7118 100644 --- a/src/portable/nuvoton/nuc121/dcd_nuc121.c +++ b/src/portable/nuvoton/nuc121/dcd_nuc121.c @@ -34,10 +34,10 @@ */ #include "tusb_option.h" -#include "common/tusb_fifo.h" #if TUSB_OPT_DEVICE_ENABLED && ( (CFG_TUSB_MCU == OPT_MCU_NUC121) || (CFG_TUSB_MCU == OPT_MCU_NUC126) ) +#include "common/tusb_fifo.h" #include "device/dcd.h" #include "NuMicro.h" diff --git a/src/portable/nuvoton/nuc505/dcd_nuc505.c b/src/portable/nuvoton/nuc505/dcd_nuc505.c index b7bbb020..46081d4d 100644 --- a/src/portable/nuvoton/nuc505/dcd_nuc505.c +++ b/src/portable/nuvoton/nuc505/dcd_nuc505.c @@ -34,10 +34,10 @@ */ #include "tusb_option.h" -#include "common/tusb_fifo.h" #if TUSB_OPT_DEVICE_ENABLED && (CFG_TUSB_MCU == OPT_MCU_NUC505) +#include "common/tusb_fifo.h" #include "device/dcd.h" #include "NUC505Series.h" diff --git a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c index dd0d76c1..0b7605a7 100644 --- a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c +++ b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c @@ -102,7 +102,6 @@ */ #include "tusb_option.h" -#include "common/tusb_fifo.h" #if defined(STM32F102x6) || defined(STM32F102xB) || \ defined(STM32F103x6) || defined(STM32F103xB) || \ @@ -121,6 +120,7 @@ // Some definitions are copied to our private include file. #undef USE_HAL_DRIVER +#include "common/tusb_fifo.h" #include "device/dcd.h" #include "portable/st/stm32_fsdev/dcd_stm32_fsdev_pvt_st.h" diff --git a/src/portable/st/synopsys/dcd_synopsys.c b/src/portable/st/synopsys/dcd_synopsys.c index 0fe7c2a3..76f5c605 100644 --- a/src/portable/st/synopsys/dcd_synopsys.c +++ b/src/portable/st/synopsys/dcd_synopsys.c @@ -28,7 +28,6 @@ */ #include "tusb_option.h" -#include "common/tusb_fifo.h" // Since TinyUSB doesn't use SOF for now, and this interrupt too often (1ms interval) // We disable SOF for now until needed later on @@ -98,6 +97,7 @@ #endif +#include "common/tusb_fifo.h" #include "device/dcd.h" //--------------------------------------------------------------------+ diff --git a/src/portable/template/dcd_template.c b/src/portable/template/dcd_template.c index d8c8753d..92a9f314 100644 --- a/src/portable/template/dcd_template.c +++ b/src/portable/template/dcd_template.c @@ -25,10 +25,10 @@ */ #include "tusb_option.h" -#include "common/tusb_fifo.h" #if CFG_TUSB_MCU == OPT_MCU_NONE +#include "common/tusb_fifo.h" #include "device/dcd.h" //--------------------------------------------------------------------+ diff --git a/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c b/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c index 48e9dd59..e13ee697 100644 --- a/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c +++ b/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c @@ -26,11 +26,11 @@ */ #include "tusb_option.h" -#include "common/tusb_fifo.h" #if TUSB_OPT_DEVICE_ENABLED && ( CFG_TUSB_MCU == OPT_MCU_MSP430x5xx ) #include "msp430.h" +#include "common/tusb_fifo.h" #include "device/dcd.h" /*------------------------------------------------------------------*/