diff --git a/hardware/arduino/sam/cores/arduino/RingBuffer.cpp b/hardware/arduino/sam/cores/arduino/RingBuffer.cpp index f0b3ed1df..d9931c977 100644 --- a/hardware/arduino/sam/cores/arduino/RingBuffer.cpp +++ b/hardware/arduino/sam/cores/arduino/RingBuffer.cpp @@ -21,7 +21,7 @@ RingBuffer::RingBuffer( void ) { - memset( _aucBuffer, 0, SERIAL_BUFFER_SIZE ) ; + memset( (void *)_aucBuffer, 0, SERIAL_BUFFER_SIZE ) ; _iHead=0 ; _iTail=0 ; } diff --git a/hardware/arduino/sam/cores/arduino/RingBuffer.h b/hardware/arduino/sam/cores/arduino/RingBuffer.h index 28309df45..1a5861b0b 100644 --- a/hardware/arduino/sam/cores/arduino/RingBuffer.h +++ b/hardware/arduino/sam/cores/arduino/RingBuffer.h @@ -25,14 +25,14 @@ // using a ring buffer (I think), in which head is the index of the location // to which to write the next incoming character and tail is the index of the // location from which to read. -#define SERIAL_BUFFER_SIZE 64 +#define SERIAL_BUFFER_SIZE 128 class RingBuffer { public: - uint8_t _aucBuffer[SERIAL_BUFFER_SIZE] ; - int _iHead ; - int _iTail ; + volatile uint8_t _aucBuffer[SERIAL_BUFFER_SIZE] ; + volatile int _iHead ; + volatile int _iTail ; public: RingBuffer( void ) ;