From 0e7296ce58561059248dc3f8b5c1b33cdf9729b7 Mon Sep 17 00:00:00 2001 From: midilab Date: Fri, 1 Apr 2022 14:12:35 -0300 Subject: [PATCH] change 303 example at readme with a ATOMIC version that fits teensy arm devices too --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 76b3d2c..a94db61 100755 --- a/README.md +++ b/README.md @@ -169,8 +169,7 @@ uint16_t _step_length = STEP_MAX_SIZE; // make sure all above sequencer data are modified atomicly only // eg. ATOMIC(_sequencer[0].accent = true); ATOMIC(_step_length = 7); -uint8_t _tmpSREG; -#define ATOMIC(X) _tmpSREG = SREG; cli(); X; SREG = _tmpSREG; +#define ATOMIC(X) noInterrupts(); X; interrupts(); // shared data to be used for user interface feedback bool _playing = false;