Skip to content

Commit 69fcf8d

Browse files
committed
Make ring buffer head and tail indexes volatile
1 parent ca17d62 commit 69fcf8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cores/arduino/RingBuffer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ class RingBufferN
3434
{
3535
public:
3636
uint8_t _aucBuffer[N] ;
37-
int _iHead ;
38-
int _iTail ;
37+
volatile int _iHead ;
38+
volatile int _iTail ;
3939

4040
public:
4141
RingBufferN( void ) ;

0 commit comments

Comments
 (0)