Skip to content

Commit 6e515bc

Browse files
authored
Update volatile.adoc
1 parent 26720b8 commit 6e515bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Language/Variables/Variable Scope & Qualifiers/volatile.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ There are several ways to do this:
6161
// toggles LED when interrupt pin changes state
6262
6363
int pin = 13;
64-
volatile int state = LOW;
64+
volatile byte state = LOW;
6565
6666
void setup()
6767
{
@@ -85,7 +85,7 @@ void blink()
8585
[source,arduino]
8686
----
8787
#include <util/atomic.h> // this library includes the ATOMIC_BLOCK macro.
88-
volatile int input_from_interrupt
88+
volatile int input_from_interrupt;
8989
9090
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
9191
// code with interrupts blocked (consecutive atomic operations will not get interrupted)

0 commit comments

Comments
 (0)