Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 98699df

Browse files
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‎

Lines changed: 2 additions & 2 deletions
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‎

Lines changed: 1 addition & 1 deletion
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)

AltStyle によって変換されたページ (->オリジナル) /