Skip to content

Commit 5507618

Browse files
committed
Closes #1155
1 parent 8cedd6b commit 5507618

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/private/IRTimer.hpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,8 @@ void disableSendPWMByTimer() {
408408
# else
409409
# if defined(USE_TIMER_CHANNEL_B)
410410
void enableSendPWMByTimer() {
411-
TCNT1 = 0; (TCCR1A |= _BV(COM1B1)) // Clear OC1A/OC1B on Compare Match when up-counting. Set OC1A/OC1B on Compare Match when downcounting.
411+
TCNT1 = 0;
412+
TCCR1A |= _BV(COM1B1); // Clear OC1A/OC1B on Compare Match when up-counting. Set OC1A/OC1B on Compare Match when counting down.
412413
}
413414
void disableSendPWMByTimer() {
414415
TCCR1A &= ~(_BV(COM1B1));
@@ -694,8 +695,13 @@ void timerConfigForReceive() {
694695
# endif
695696

696697
# if defined(ARDUINO_AVR_PROMICRO) // Sparkfun Pro Micro
697-
void enableSendPWMByTimer() { TCNT4 = 0; (TCCR4A |= _BV(COM4A0)) // Use complementary OC4A output on pin 5
698-
void disableSendPWMByTimer() { (TCCR4A &= ~(_BV(COM4A0))) // (Pro Micro does not map PC7 (32/ICP3/CLK0/OC4A)
698+
void enableSendPWMByTimer() {
699+
TCNT4 = 0;
700+
TCCR4A |= _BV(COM4A0); // Use complementary OC4A output on pin 5
701+
}
702+
void disableSendPWMByTimer() {
703+
TCCR4A &= ~(_BV(COM4A0)); // (Pro Micro does not map PC7 (32/ICP3/CLK0/OC4A)
704+
}
699705
// of ATmega32U4 )
700706
# else
701707
void enableSendPWMByTimer() {

0 commit comments

Comments
 (0)