From 422b6f9bb797fc59e12ad95171ca037629ed9b14 Mon Sep 17 00:00:00 2001 From: Sandeep Mistry Date: Thu, 10 Mar 2016 10:22:44 -0500 Subject: Make SoftwareSerial receive buffer a uint8_t array --- libraries/SoftwareSerial/src/SoftwareSerial.cpp | 4 ++-- libraries/SoftwareSerial/src/SoftwareSerial.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/SoftwareSerial/src/SoftwareSerial.cpp b/libraries/SoftwareSerial/src/SoftwareSerial.cpp index 877d128..376762e 100644 --- a/libraries/SoftwareSerial/src/SoftwareSerial.cpp +++ b/libraries/SoftwareSerial/src/SoftwareSerial.cpp @@ -48,7 +48,7 @@ http://arduiniana.org. // Statics // SoftwareSerial *SoftwareSerial::active_object = 0; -char SoftwareSerial::_receive_buffer[_SS_MAX_RX_BUFF]; +uint8_t SoftwareSerial::_receive_buffer[_SS_MAX_RX_BUFF]; volatile uint8_t SoftwareSerial::_receive_buffer_tail = 0; volatile uint8_t SoftwareSerial::_receive_buffer_head = 0; @@ -482,5 +482,5 @@ int SoftwareSerial::peek() return -1; // Read from "head" - return (uint8_t)_receive_buffer[_receive_buffer_head]; + return _receive_buffer[_receive_buffer_head]; } diff --git a/libraries/SoftwareSerial/src/SoftwareSerial.h b/libraries/SoftwareSerial/src/SoftwareSerial.h index 622e2a5..26183ba 100644 --- a/libraries/SoftwareSerial/src/SoftwareSerial.h +++ b/libraries/SoftwareSerial/src/SoftwareSerial.h @@ -66,7 +66,7 @@ private: uint16_t _inverse_logic:1; // static data - static char _receive_buffer[_SS_MAX_RX_BUFF]; + static uint8_t _receive_buffer[_SS_MAX_RX_BUFF]; static volatile uint8_t _receive_buffer_tail; static volatile uint8_t _receive_buffer_head; static SoftwareSerial *active_object; -- cgit v1.2.3-18-g5258