Merge pull request #3953 from dhalbert/update-tinyusb-to-fix-_ticks_enabled
update tinyusb; _ticks_enabled only for SAMD21
This commit is contained in:
commit
1c12d8351c
|
@ -1 +1 @@
|
||||||
Subproject commit 218b80e63ab6ff87c1851e403f08b3d716d68f5e
|
Subproject commit cfcffe94ce62f5ef1fb5aef4641924d64dc4b1c0
|
|
@ -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
|
// TODO: Move this to an RTC backup register so we can preserve it when only the BACKUP power domain
|
||||||
// is enabled.
|
// is enabled.
|
||||||
static volatile uint64_t overflowed_ticks = 0;
|
static volatile uint64_t overflowed_ticks = 0;
|
||||||
|
#ifdef SAMD21
|
||||||
static volatile bool _ticks_enabled = false;
|
static volatile bool _ticks_enabled = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
static uint32_t _get_count(uint64_t* overflow_count) {
|
static uint32_t _get_count(uint64_t* overflow_count) {
|
||||||
#ifdef SAM_D5X_E5X
|
#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
|
// they'll wake us up earlier. If we don't, we'll mess up ticks by overwriting
|
||||||
// the next RTC wake up time.
|
// the next RTC wake up time.
|
||||||
void port_interrupt_after_ticks(uint32_t ticks) {
|
void port_interrupt_after_ticks(uint32_t ticks) {
|
||||||
|
#ifdef SAMD21
|
||||||
if (_ticks_enabled) {
|
if (_ticks_enabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
_port_interrupt_after_ticks(ticks);
|
_port_interrupt_after_ticks(ticks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue