Skip to content

Commit 98699df

Browse files
committed
Make SoftwareSerial receive buffer a uint8_t array
1 parent dfc3a64 commit 98699df

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

hardware/arduino/avr/libraries/SoftwareSerial/src/SoftwareSerial.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ The latest version of this library can always be found at
4848
// Statics
4949
//
5050
SoftwareSerial *SoftwareSerial::active_object = 0;
51-
char SoftwareSerial::_receive_buffer[_SS_MAX_RX_BUFF];
51+
uint8_t SoftwareSerial::_receive_buffer[_SS_MAX_RX_BUFF];
5252
volatile uint8_t SoftwareSerial::_receive_buffer_tail = 0;
5353
volatile uint8_t SoftwareSerial::_receive_buffer_head = 0;
5454

@@ -482,5 +482,5 @@ int SoftwareSerial::peek()
482482
return -1;
483483

484484
// Read from "head"
485-
return (uint8_t)_receive_buffer[_receive_buffer_head];
485+
return _receive_buffer[_receive_buffer_head];
486486
}

hardware/arduino/avr/libraries/SoftwareSerial/src/SoftwareSerial.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class SoftwareSerial : public Stream
6666
uint16_t _inverse_logic:1;
6767

6868
// static data
69-
static char _receive_buffer[_SS_MAX_RX_BUFF];
69+
static uint8_t _receive_buffer[_SS_MAX_RX_BUFF];
7070
static volatile uint8_t _receive_buffer_tail;
7171
static volatile uint8_t _receive_buffer_head;
7272
static SoftwareSerial *active_object;

0 commit comments

Comments
 (0)