summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2021-01-08 13:30:11 -0500
committerDan Halbert <halbert@halwitz.org>2021-01-08 13:30:11 -0500
commit39c166ba6a72d6e95aaf2865ff3e7cade39d04a2 (patch)
tree388f1a57b61710eab37ddcf222f77f49731f99b0
parent55c80754c76a115e2f128931a408e6702aee6ef4 (diff)
update tinyusb; _ticks_enabled only for SAMD21
m---------lib/tinyusb0
-rw-r--r--ports/atmel-samd/supervisor/port.c4
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);
}