diff options
| -rw-r--r-- | examples/host/cdc_msc_hid/src/main.c | 2 | ||||
| -rw-r--r-- | src/common/tusb_types.h | 2 | ||||
| -rw-r--r-- | src/portable/espressif/esp32sx/dcd_esp32sx.c | 2 | ||||
| -rw-r--r-- | src/portable/microchip/samg/dcd_samg.c | 2 | ||||
| -rw-r--r-- | src/portable/nordic/nrf5x/dcd_nrf5x.c | 7 | ||||
| -rw-r--r-- | src/portable/nuvoton/nuc120/dcd_nuc120.c | 2 | ||||
| -rw-r--r-- | src/portable/nuvoton/nuc121/dcd_nuc121.c | 2 | ||||
| -rw-r--r-- | src/portable/nuvoton/nuc505/dcd_nuc505.c | 2 | ||||
| -rw-r--r-- | src/portable/raspberrypi/rp2040/hcd_rp2040.c | 4 | ||||
| -rw-r--r-- | src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c | 2 | ||||
| -rw-r--r-- | src/portable/st/synopsys/dcd_synopsys.c | 2 | ||||
| -rw-r--r-- | src/portable/template/dcd_template.c | 2 | ||||
| -rw-r--r-- | src/portable/ti/msp430x5xx/dcd_msp430x5xx.c | 2 |
13 files changed, 19 insertions, 14 deletions
diff --git a/examples/host/cdc_msc_hid/src/main.c b/examples/host/cdc_msc_hid/src/main.c index d941c56f3..c6ab54682 100644 --- a/examples/host/cdc_msc_hid/src/main.c +++ b/examples/host/cdc_msc_hid/src/main.c @@ -262,7 +262,7 @@ void hid_task(void) if ( !tuh_hid_keyboard_is_busy(addr) ) { process_kbd_report(&usb_keyboard_report); - tuh_hid_keyboard_get_report(addr, &usb_mouse_report); + tuh_hid_keyboard_get_report(addr, &usb_keyboard_report); } } #endif 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/nordic/nrf5x/dcd_nrf5x.c b/src/portable/nordic/nrf5x/dcd_nrf5x.c index 6b8095a00..977ec6cdb 100644 --- a/src/portable/nordic/nrf5x/dcd_nrf5x.c +++ b/src/portable/nordic/nrf5x/dcd_nrf5x.c @@ -833,9 +833,8 @@ void tusb_hal_nrf_power_event (uint32_t event) NRF_USBD->EVENTCAUSE = USBD_EVENTCAUSE_READY_Msk; __ISB(); __DSB(); // for sync - /* Enable the peripheral */ +#ifdef NRF52_SERIES // ERRATA 171, 187, 166 - if ( nrfx_usbd_errata_187() ) { // CRITICAL_REGION_ENTER(); @@ -867,7 +866,9 @@ void tusb_hal_nrf_power_event (uint32_t event) } // CRITICAL_REGION_EXIT(); } +#endif + /* Enable the peripheral */ NRF_USBD->ENABLE = 1; __ISB(); __DSB(); // for sync @@ -889,6 +890,7 @@ void tusb_hal_nrf_power_event (uint32_t event) NRF_USBD->EVENTCAUSE = USBD_EVENTCAUSE_READY_Msk; __ISB(); __DSB(); // for sync +#ifdef NRF52_SERIES if ( nrfx_usbd_errata_171() ) { // CRITICAL_REGION_ENTER(); @@ -929,6 +931,7 @@ void tusb_hal_nrf_power_event (uint32_t event) __ISB(); __DSB(); } +#endif // ISO buffer Lower half for IN, upper half for OUT NRF_USBD->ISOSPLIT = USBD_ISOSPLIT_SPLIT_HalfIN; 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/raspberrypi/rp2040/hcd_rp2040.c b/src/portable/raspberrypi/rp2040/hcd_rp2040.c index 40d208679..5201d1d4c 100644 --- a/src/portable/raspberrypi/rp2040/hcd_rp2040.c +++ b/src/portable/raspberrypi/rp2040/hcd_rp2040.c @@ -306,8 +306,8 @@ static void _hw_endpoint_init(struct hw_endpoint *ep, uint8_t dev_addr, uint8_t ep->wMaxPacketSize = wMaxPacketSize; ep->transfer_type = transfer_type; - pico_trace("hw_endpoint_init dev %d ep %d %s xfer %d\n", ep->dev_addr, ep->num, ep_dir_string[ep->in], ep->transfer_type); - pico_trace("dev %d ep %d %s setup buffer @ 0x%p\n", ep->dev_addr, ep->num, ep_dir_string[ep->in], ep->hw_data_buf); + pico_trace("hw_endpoint_init dev %d ep %d %s xfer %d\n", ep->dev_addr, tu_edpt_number(ep->ep_addr), ep_dir_string[tu_edpt_dir(ep->ep_addr)], ep->transfer_type); + pico_trace("dev %d ep %d %s setup buffer @ 0x%p\n", ep->dev_addr, tu_edpt_number(ep->ep_addr), ep_dir_string[tu_edpt_dir(ep->ep_addr)], ep->hw_data_buf); uint dpram_offset = hw_data_offset(ep->hw_data_buf); // Bits 0-5 should be 0 assert(!(dpram_offset & 0b111111)); 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" /*------------------------------------------------------------------*/ |
