Handle no Timer 3C

This commit is contained in:
Scott Lahteine 2019-09-22 19:32:42 -05:00
parent f5092e92a4
commit 6c62732ae1

View file

@ -91,7 +91,7 @@ Timer get_pwm_timer(const pin_t pin) {
#endif
#endif
#endif
#ifdef TCCR3A
#ifdef OCR3C
case TIMER3C: ++q;
case TIMER3B: ++q;
case TIMER3A: {
@ -103,6 +103,17 @@ Timer get_pwm_timer(const pin_t pin) {
};
return timer;
}
#elif defined(OCR3B)
case TIMER3B: ++q;
case TIMER3A: {
Timer timer = {
/*TCCRnQ*/ { &TCCR3A, &TCCR3B, nullptr },
/*OCRnQ*/ { &OCR3A, &OCR3B, nullptr },
/*ICRn*/ &ICR3,
/*n, q*/ 3, q
};
return timer;
}
#endif
#ifdef TCCR4A
case TIMER4C: ++q;