summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-05-10 19:15:46 +0700
committerhathach <[email protected]>2021-05-10 19:15:46 +0700
commit13de8f5d98eceae8771af78e6acb126f8da19854 (patch)
treed585558b97bb3823aad0afb3a82513d9fd598ff3 /src
parent42a1d2f3b9d40b57a7ef8364c138d8274f1a0a8d (diff)
minor clean up
Diffstat (limited to 'src')
-rw-r--r--src/common/tusb_types.h2
-rw-r--r--src/portable/espressif/esp32sx/dcd_esp32sx.c2
-rw-r--r--src/portable/microchip/samg/dcd_samg.c2
-rw-r--r--src/portable/nuvoton/nuc120/dcd_nuc120.c2
-rw-r--r--src/portable/nuvoton/nuc121/dcd_nuc121.c2
-rw-r--r--src/portable/nuvoton/nuc505/dcd_nuc505.c2
-rw-r--r--src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c2
-rw-r--r--src/portable/st/synopsys/dcd_synopsys.c2
-rw-r--r--src/portable/template/dcd_template.c2
-rw-r--r--src/portable/ti/msp430x5xx/dcd_msp430x5xx.c2
10 files changed, 11 insertions, 9 deletions
diff --git a/src/common/tusb_types.h b/src/common/tusb_types.h
index ba3fe2c41..922d3daff 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 74842a291..502273a9b 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 62fab8d17..9b6a1f9a5 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 5dc3bca21..7aeb49f2a 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 d50e82846..e76d7118c 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 b7bbb020b..46081d4d0 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 dd0d76c1f..0b7605a73 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 0fe7c2a3c..76f5c6050 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 d8c8753d3..92a9f3144 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 48e9dd592..e13ee697e 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"
/*------------------------------------------------------------------*/