atmel-samd: Minor fixes to SysTick handler, enable all interrupts function.
This commit is contained in:
parent
f77113c04f
commit
2ee52c4fde
|
@ -220,7 +220,7 @@ void SysTick_Handler(void) {
|
|||
systick_ticks_ms += 1;
|
||||
// Keep the counter within the range of 31 bit uint values since that's the
|
||||
// max value for micropython 'small' ints.
|
||||
systick_ticks_ms = systick_ticks_ms > 2147483647L ? 0 : systick_ticks_ms;
|
||||
systick_ticks_ms = systick_ticks_ms > (0xFFFFFFFF >> 1) ? 0 : systick_ticks_ms;
|
||||
}
|
||||
|
||||
// Interrupt flags that will be saved and restored during disable/Enable
|
||||
|
@ -237,8 +237,8 @@ void mp_hal_disable_all_interrupts(void) {
|
|||
|
||||
void mp_hal_enable_all_interrupts(void) {
|
||||
// Enable all interrupt sources after timing critical sections.
|
||||
// Restore ASF-based interrupts.
|
||||
cpu_irq_restore(irq_flags);
|
||||
// Restore SysTick interrupt.
|
||||
SysTick->CTRL |= SysTick_CTRL_TICKINT_Msk;
|
||||
// Restore ASF-based interrupts.
|
||||
cpu_irq_restore(irq_flags);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue