Skip to content

Commit 1c12d83

Browse files
authored
Merge pull request #3953 from dhalbert/update-tinyusb-to-fix-_ticks_enabled
update tinyusb; _ticks_enabled only for SAMD21
2 parents 95d32a9 + 39c166b commit 1c12d83

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/tinyusb

Submodule tinyusb updated 40 files

ports/atmel-samd/supervisor/port.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,9 @@ uint32_t port_get_saved_word(void) {
429429
// TODO: Move this to an RTC backup register so we can preserve it when only the BACKUP power domain
430430
// is enabled.
431431
static volatile uint64_t overflowed_ticks = 0;
432+
#ifdef SAMD21
432433
static volatile bool _ticks_enabled = false;
434+
#endif
433435

434436
static uint32_t _get_count(uint64_t* overflow_count) {
435437
#ifdef SAM_D5X_E5X
@@ -537,9 +539,11 @@ void port_disable_tick(void) {
537539
// they'll wake us up earlier. If we don't, we'll mess up ticks by overwriting
538540
// the next RTC wake up time.
539541
void port_interrupt_after_ticks(uint32_t ticks) {
542+
#ifdef SAMD21
540543
if (_ticks_enabled) {
541544
return;
542545
}
546+
#endif
543547
_port_interrupt_after_ticks(ticks);
544548
}
545549

0 commit comments

Comments
 (0)