Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c68af81

Browse files
committedDec 29, 2020
Update wiring_analog.c
1 parent 4846d1d commit c68af81

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎cores/arduino/wiring_analog.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ void analogWrite(uint8_t pin, int val)
178178
// (16-bit read/write operation are non-atomic and use a temporary register)
179179
savedSREG = SREG;
180180
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
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
183183
SREG = savedSREG;
184184

185185
/* Enable Timer Output */

0 commit comments

Comments
 (0)
Please sign in to comment.