We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26720b8 commit 6e515bcCopy full SHA for 6e515bc
Language/Variables/Variable Scope & Qualifiers/volatile.adoc
@@ -61,7 +61,7 @@ There are several ways to do this:
61
// toggles LED when interrupt pin changes state
62
63
int pin = 13;
64
-volatile int state = LOW;
+volatile byte state = LOW;
65
66
void setup()
67
{
@@ -85,7 +85,7 @@ void blink()
85
[source,arduino]
86
----
87
#include <util/atomic.h> // this library includes the ATOMIC_BLOCK macro.
88
-volatile int input_from_interrupt
+volatile int input_from_interrupt;
89
90
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
91
// code with interrupts blocked (consecutive atomic operations will not get interrupted)
0 commit comments