Skip to content

Commit 8674b5a

Browse files
committed
Better note about volatile
1 parent 089ef8f commit 8674b5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -872,8 +872,8 @@ void SysTick_Handler(void) {
872872
> The `volatile` specifier is required here becase `s_ticks` is modified by the
873873
> interrupt handler. `volatile` prevents the compiler to optimise/cache
874874
> `s_ticks` value in a CPU register: instead, generated code always accesses
875-
> memory. That is why you will find `volatile` keywords later in the
876-
> peripheral, too.
875+
> memory. That is why `volatile` keywords is present in the peripheral struct
876+
> definitions, too.
877877
878878
Note the `volatile` specifier for `s_ticks`. Any variable that is changed
879879
by the IRQ handler, must be marked as `volatile`, in order to prevent the

0 commit comments

Comments
 (0)