Skip to content

Commit fc36032

Browse files
authored
Merge pull request #957 from davidhbrown/patch-1
Volatile example code variable name is now `changed`, not `state`
2 parents c3cdc5c + 57308ec commit fc36032

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ There are several ways to do this:
5555
=== Example Code
5656
// Describe what the example code is all about and add relevant code ►►►►► THIS SECTION IS MANDATORY ◄◄◄◄◄
5757

58-
The `volatile` modifier ensures that changes to the `state` variable are immediately visible in `loop()`. Without the `volatile` modifier, the `state` variable may be loaded into a register when entering the function and would not be updated anymore until the function ends.
58+
The `volatile` modifier ensures that changes to the `changed` variable are immediately visible in `loop()`. Without the `volatile` modifier, the `changed` variable may be loaded into a register when entering the function and would not be updated anymore until the function ends.
5959

6060
[source,arduino]
6161
----

0 commit comments

Comments
 (0)