Add STEPPER_ISR_ENABLED() to HALs
Some also get a `HAL_timer_interrupt_enabled` function.
This commit is contained in:
@ -75,6 +75,14 @@ void HAL_timer_disable_interrupt(const uint8_t timer_num) {
|
||||
}
|
||||
}
|
||||
|
||||
bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
|
||||
switch (timer_num) {
|
||||
case 0: return NVIC_GetActive(TIMER0_IRQn);
|
||||
case 1: return NVIC_GetActive(TIMER1_IRQn);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void HAL_timer_isr_prologue(const uint8_t timer_num) {
|
||||
switch (timer_num) {
|
||||
case 0: SBI(LPC_TIM0->IR, 0); break; // Clear the Interrupt
|
||||
|
Reference in New Issue
Block a user