Get timer instance pointer from index
| 101 | |
| 102 | // Get timer instance pointer from index |
| 103 | static Tc* get_timer_instance(u8 index) FL_NOEXCEPT { |
| 104 | switch (index) { |
| 105 | #ifdef TC0 |
| 106 | case 0: return TC0; |
| 107 | #endif |
| 108 | #ifdef TC1 |
| 109 | case 1: return TC1; |
| 110 | #endif |
| 111 | #ifdef TC2 |
| 112 | case 2: return TC2; |
| 113 | #endif |
| 114 | #ifdef TC3 |
| 115 | case 3: return TC3; |
| 116 | #endif |
| 117 | #ifdef TC4 |
| 118 | case 4: return TC4; |
| 119 | #endif |
| 120 | #ifdef TC5 |
| 121 | case 5: return TC5; |
| 122 | #endif |
| 123 | #ifdef TC6 |
| 124 | case 6: return TC6; |
| 125 | #endif |
| 126 | #ifdef TC7 |
| 127 | case 7: return TC7; |
| 128 | #endif |
| 129 | default: return nullptr; |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | // Get timer IRQ from index |
| 134 | static IRQn_Type get_timer_irq(u8 index) FL_NOEXCEPT { |
no outgoing calls
no test coverage detected