diff options
-rw-r--r-- | libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino | 10 | ||||
-rw-r--r-- | libraries/SoftwareSerial/src/SoftwareSerial.cpp | 2 | ||||
-rw-r--r-- | libraries/SoftwareSerial/src/SoftwareSerial.h | 2 | ||||
-rw-r--r-- | platform.txt | 10 |
4 files changed, 11 insertions, 13 deletions
diff --git a/libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino b/libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino index 26659d6..8d7f93e 100644 --- a/libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino +++ b/libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino @@ -13,8 +13,8 @@ The circuit: Two devices which communicate serially are needed. - * First serial device's TX attached to digital pin 2, RX to pin 3 - * Second serial device's TX attached to digital pin 4, RX to pin 5 + * First serial device's TX attached to digital pin 10(RX), RX to pin 11(TX) + * Second serial device's TX attached to digital pin 8(RX), RX to pin 9(TX) Note: Not all pins on the Mega and Mega 2560 support change interrupts, @@ -26,7 +26,7 @@ 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI). created 18 Apr. 2011 - modified 25 May 2012 + modified 19 March 2016 by Tom Igoe based on Mikal Hart's twoPortRXExample @@ -35,10 +35,10 @@ */ #include <SoftwareSerial.h> -// software serial #1: TX = digital pin 10, RX = digital pin 11 +// software serial #1: RX = digital pin 10, TX = digital pin 11 SoftwareSerial portOne(10, 11); -// software serial #2: TX = digital pin 8, RX = digital pin 9 +// software serial #2: RX = digital pin 8, TX = digital pin 9 // on the Mega, use other pins instead, since 8 and 9 don't work on the Mega SoftwareSerial portTwo(8, 9); diff --git a/libraries/SoftwareSerial/src/SoftwareSerial.cpp b/libraries/SoftwareSerial/src/SoftwareSerial.cpp index 0a16ff7..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;
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;
diff --git a/platform.txt b/platform.txt index 959e6e4..137e937 100644 --- a/platform.txt +++ b/platform.txt @@ -9,7 +9,7 @@ name=Arduino AVR Boards version=1.6.10 # AVR compile variables -# --------------------- +# --------------------- compiler.warning_flags=-w compiler.warning_flags.none=-w @@ -17,12 +17,10 @@ compiler.warning_flags.default= compiler.warning_flags.more=-Wall compiler.warning_flags.all=-Wall -Wextra -# Default "compiler.path" is correct, change only if you want to overidde the initial value +# Default "compiler.path" is correct, change only if you want to override the initial value compiler.path={runtime.tools.avr-gcc.path}/bin/ compiler.c.cmd=avr-gcc compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -MMD -# -w flag added to avoid printing a wrong warning http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59396 -# This is fixed in gcc 4.8.3 and will be removed as soon as we update the toolchain compiler.c.elf.flags={compiler.warning_flags} -Os -Wl,--gc-sections compiler.c.elf.cmd=avr-gcc compiler.S.flags=-c -g -x assembler-with-cpp @@ -37,7 +35,7 @@ compiler.elf2hex.cmd=avr-objcopy compiler.ldflags= compiler.size.cmd=avr-size -# This can be overriden in boards.txt +# This can be overridden in boards.txt build.extra_flags= # These can be overridden in platform.local.txt @@ -114,7 +112,7 @@ tools.avrdude.bootloader.pattern="{cmd.path}" "-C{config.path}" {bootloader.verb # USB Default Flags -# Default blank usb manufacturer will be filled it at compile time +# Default blank usb manufacturer will be filled in at compile time # - from numeric vendor ID, set to Unknown otherwise build.usb_manufacturer="Unknown" build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' |