Browse Source

Handle no Timer 3C

pull/1/head
Scott Lahteine 5 years ago
parent
commit
6c62732ae1
  1. 13
      Marlin/src/HAL/HAL_AVR/fast_pwm.cpp

13
Marlin/src/HAL/HAL_AVR/fast_pwm.cpp

@ -91,7 +91,7 @@ Timer get_pwm_timer(const pin_t pin) {
#endif #endif
#endif #endif
#endif #endif
#ifdef TCCR3A #ifdef OCR3C
case TIMER3C: ++q; case TIMER3C: ++q;
case TIMER3B: ++q; case TIMER3B: ++q;
case TIMER3A: { case TIMER3A: {
@ -103,6 +103,17 @@ Timer get_pwm_timer(const pin_t pin) {
}; };
return timer; 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 #endif
#ifdef TCCR4A #ifdef TCCR4A
case TIMER4C: ++q; case TIMER4C: ++q;

Loading…
Cancel
Save