Skip to content

update tinyusb; _ticks_enabled only for SAMD21 #3953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/tinyusb
Submodule tinyusb updated 40 files
+0 −10 .github/ISSUE_TEMPLATE/question.md
+3 −0 CONTRIBUTORS.md
+3 −2 README.md
+5 −0 docs/boards.md
+0 −0 examples/device/cdc_msc_freertos/.skip.MCU_MKL25ZXX
+6 −1 examples/device/hid_composite_freertos/src/main.c
+0 −0 examples/device/msc_dual_lun/.skip.MCU_MKL25ZXX
+0 −0 examples/device/net_lwip_webserver/.skip.MCU_MKL25ZXX
+1 −1 hw/bsp/board_mcu.h
+234 −0 hw/bsp/double_m33_express/LPC55S69_cm33_core0_uf2.ld
+51 −0 hw/bsp/double_m33_express/board.mk
+400 −0 hw/bsp/double_m33_express/double_m33_express.c
+46 −0 hw/bsp/frdm_kl25z/board.mk
+148 −0 hw/bsp/frdm_kl25z/frdm_kl25z.c
+1 −1 hw/mcu/nxp
+1 −1 src/class/hid/hid_device.h
+1 −1 src/class/msc/msc.h
+193 −191 src/class/msc/msc_device.c
+0 −871 src/common/sys_queue.h
+1 −0 src/common/tusb_compiler.h
+8 −2 src/common/tusb_fifo.c
+21 −1 src/device/usbd.c
+8 −0 src/device/usbd_control.c
+3 −4 src/portable/dialog/da146xx/dcd_da146xx.c
+19 −4 src/portable/espressif/esp32s2/dcd_esp32s2.c
+12 −3 src/portable/microchip/samd/dcd_samd.c
+1 −1 src/portable/microchip/samg/dcd_samg.c
+1 −1 src/portable/nordic/nrf5x/dcd_nrf5x.c
+1 −2 src/portable/nuvoton/nuc120/dcd_nuc120.c
+1 −1 src/portable/nuvoton/nuc121/dcd_nuc121.c
+477 −0 src/portable/nxp/khci/dcd_khci.c
+1 −1 src/portable/nxp/lpc17_40/dcd_lpc17_40.c
+2 −2 src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c
+1 −1 src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
+128 −93 src/portable/st/synopsys/dcd_synopsys.c
+3 −3 src/portable/ti/msp430x5xx/dcd_msp430x5xx.c
+1 −1 src/portable/valentyusb/eptri/dcd_eptri.c
+10 −6 src/tusb_option.h
+1 −1 test/test/device/msc/test_msc_device.c
+3 −3 test/test/support/tusb_config.h
4 changes: 4 additions & 0 deletions ports/atmel-samd/supervisor/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,9 @@ uint32_t port_get_saved_word(void) {
// TODO: Move this to an RTC backup register so we can preserve it when only the BACKUP power domain
// is enabled.
static volatile uint64_t overflowed_ticks = 0;
#ifdef SAMD21
static volatile bool _ticks_enabled = false;
#endif

static uint32_t _get_count(uint64_t* overflow_count) {
#ifdef SAM_D5X_E5X
Expand Down Expand Up @@ -537,9 +539,11 @@ void port_disable_tick(void) {
// they'll wake us up earlier. If we don't, we'll mess up ticks by overwriting
// the next RTC wake up time.
void port_interrupt_after_ticks(uint32_t ticks) {
#ifdef SAMD21
if (_ticks_enabled) {
return;
}
#endif
_port_interrupt_after_ticks(ticks);
}

Expand Down