Skip to content

Commit e2fe4cd

Browse files
committed
Correct interrupt example: Varbiable accessed by ISR needs to be volatile.
1 parent cdc0141 commit e2fe4cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ void loop() {
200200
Example of interrupt based read
201201

202202
```C++
203-
bool interrupt = false;
203+
volatile bool interrupt = false;
204204
struct can_frame frame;
205205

206206
void irqHandler() {

0 commit comments

Comments
 (0)