This commit is contained in:
Armin 2023-08-07 21:45:57 +02:00
parent 8cedd6b253
commit 5507618f93
1 changed files with 9 additions and 3 deletions

View File

@ -408,7 +408,8 @@ void disableSendPWMByTimer() {
# else
# if defined(USE_TIMER_CHANNEL_B)
void enableSendPWMByTimer() {
TCNT1 = 0; (TCCR1A |= _BV(COM1B1)) // Clear OC1A/OC1B on Compare Match when up-counting. Set OC1A/OC1B on Compare Match when downcounting.
TCNT1 = 0;
TCCR1A |= _BV(COM1B1); // Clear OC1A/OC1B on Compare Match when up-counting. Set OC1A/OC1B on Compare Match when counting down.
}
void disableSendPWMByTimer() {
TCCR1A &= ~(_BV(COM1B1));
@ -694,8 +695,13 @@ void timerConfigForReceive() {
# endif
# if defined(ARDUINO_AVR_PROMICRO) // Sparkfun Pro Micro
void enableSendPWMByTimer() { TCNT4 = 0; (TCCR4A |= _BV(COM4A0)) // Use complementary OC4A output on pin 5
void disableSendPWMByTimer() { (TCCR4A &= ~(_BV(COM4A0))) // (Pro Micro does not map PC7 (32/ICP3/CLK0/OC4A)
void enableSendPWMByTimer() {
TCNT4 = 0;
TCCR4A |= _BV(COM4A0); // Use complementary OC4A output on pin 5
}
void disableSendPWMByTimer() {
TCCR4A &= ~(_BV(COM4A0)); // (Pro Micro does not map PC7 (32/ICP3/CLK0/OC4A)
}
// of ATmega32U4 )
# else
void enableSendPWMByTimer() {