diff options
| author | Scott Shawcroft <scott@adafruit.com> | 2021-01-11 15:17:15 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-11 15:17:15 -0800 |
| commit | 1c12d8351caa47cb2fc143147683abc6373a4734 (patch) | |
| tree | 1549c1f378a7407de940c27fd3fb508493add2d4 | |
| parent | 95d32a9a59e0a55d0e744c17a9d46ad562cc40ae (diff) | |
| parent | 39c166ba6a72d6e95aaf2865ff3e7cade39d04a2 (diff) | |
Merge pull request #3953 from dhalbert/update-tinyusb-to-fix-_ticks_enabled
update tinyusb; _ticks_enabled only for SAMD21
| m--------- | lib/tinyusb | 0 | ||||
| -rw-r--r-- | ports/atmel-samd/supervisor/port.c | 4 |
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/tinyusb b/lib/tinyusb -Subproject 218b80e63ab6ff87c1851e403f08b3d716d68f5 +Subproject cfcffe94ce62f5ef1fb5aef4641924d64dc4b1c diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c index b9977fdc4..02b9e3874 100644 --- a/ports/atmel-samd/supervisor/port.c +++ b/ports/atmel-samd/supervisor/port.c @@ -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 @@ -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); } |
