We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
arduino
Learn more about funding links in repositories.
Report abuse
1 parent 4846d1d commit c68af81Copy full SHA for c68af81
cores/arduino/wiring_analog.c
@@ -178,8 +178,8 @@ void analogWrite(uint8_t pin, int val)
178
// (16-bit read/write operation are non-atomic and use a temporary register)
179
savedSREG = SREG;
180
cli();
181
- timer_B->CCMPL = timer_B->CCMPL; // copy CCMPL into temporary register
182
- timer_B->CCMPH = val; // set CCMPH value + copy temporary register content into CCMPL
+ timer_B->CCMPL = timer_B->CCMPL; // copy CCMPL into temporary register
+ timer_B->CCMPH = val; // set CCMPH value + copy temporary register content into CCMPL
183
SREG = savedSREG;
184
185
/* Enable Timer Output */
0 commit comments