Count active ISR-backend channels
| 161 | |
| 162 | // Count active ISR-backend channels |
| 163 | u8 countIsrChannels() { |
| 164 | PwmStateData& st = state(); |
| 165 | u8 count = 0; |
| 166 | for (u8 i = 0; i < MAX_PWM_CHANNELS; i++) { |
| 167 | if (st.channels[i].pin >= 0 && st.channels[i].backend == PwmBackend::IsrSoftware) { |
| 168 | count++; |
| 169 | } |
| 170 | } |
| 171 | return count; |
| 172 | } |
| 173 | |
| 174 | // Ensure ISR timer is running (lazy init) |
| 175 | int ensureIsrActive() { |