Common timer interrupt handler
| 279 | |
| 280 | // Common timer interrupt handler |
| 281 | static void timer_interrupt_handler(u8 timer_idx) FL_NOEXCEPT { |
| 282 | Tc* timer = get_timer_instance(timer_idx); |
| 283 | if (!timer) return; |
| 284 | |
| 285 | // Check if MC0 (Match/Compare 0) interrupt occurred |
| 286 | if (timer->COUNT16.INTFLAG.bit.MC0) { |
| 287 | // Clear the interrupt flag |
| 288 | timer->COUNT16.INTFLAG.bit.MC0 = 1; |
| 289 | |
| 290 | samd_isr_handle_data* handle = timer_handles[timer_idx]; |
| 291 | if (handle && handle->user_handler) { |
| 292 | handle->user_handler(handle->user_data); |
| 293 | } |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | // Timer ISR wrappers for each possible TC instance |
| 298 | extern "C" { |
no test coverage detected