Followup to HAL optimizations and delays
- Cleanups, fixes for Due HAL code. - TC_IER is write-only. Use TC_IMR to test ISR state.
This commit is contained in:
@ -137,19 +137,7 @@ void HAL_timer_disable_interrupt(const uint8_t timer_num) {
|
||||
|
||||
bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
|
||||
const tTimerConfig * const pConfig = &TimerConfig[timer_num];
|
||||
return pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_IER == TC_IER_CPCS;
|
||||
return (pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_IMR & TC_IMR_CPCS) != 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
void HAL_timer_set_compare(const uint8_t timer_num, const uint32_t compare) {
|
||||
const tTimerConfig * const pConfig = &TimerConfig[timer_num];
|
||||
TC_SetRC(pConfig->pTimerRegs, pConfig->channel, compare);
|
||||
}
|
||||
|
||||
void HAL_timer_isr_prologue(const uint8_t timer_num) {
|
||||
const tTimerConfig * const pConfig = &TimerConfig[timer_num];
|
||||
TC_GetStatus(pConfig->pTimerRegs, pConfig->channel);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // ARDUINO_ARCH_SAM
|
||||
|
Reference in New Issue
Block a user