File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
hardware/arduino/avr/cores/arduino Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ The following changes are included also in the Arduino IDE 1.0.7:
9
9
[libraries]
10
10
* EthernetClien: use IANA recommended ephemeral port range, 49152-65535 (Jack Christensen, cifer-lee)
11
11
12
+ [core]
13
+ * Fixed regression in HardwareSerial::available() introduced with https://github.com/arduino/Arduino/pull/2057
14
+
12
15
ARDUINO 1.5.8 BETA - 2014.10.01
13
16
14
17
[ide]
@@ -346,6 +349,10 @@ ARDUINO 1.0.7
346
349
* Backported GSM from IDE 1.5.x
347
350
* EthernetClien: use IANA recommended ephemeral port range, 49152-65535 (Jack Christensen, cifer-lee)
348
351
352
+ [core]
353
+ * Fixed missing NOT_AN_INTERRUPT constant in digitalPinToInterrupt() macro
354
+ * Fixed regression in HardwareSerial::available() introduced with https://github.com/arduino/Arduino/pull/2057
355
+
349
356
ARDUINO 1.0.6 - 2014.09.16
350
357
351
358
[core]
Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ void HardwareSerial::end()
152
152
153
153
int HardwareSerial::available (void )
154
154
{
155
- return (int )(SERIAL_RX_BUFFER_SIZE + _rx_buffer_head - _rx_buffer_tail) % SERIAL_RX_BUFFER_SIZE;
155
+ return (( unsigned int )(SERIAL_RX_BUFFER_SIZE + _rx_buffer_head - _rx_buffer_tail) ) % SERIAL_RX_BUFFER_SIZE;
156
156
}
157
157
158
158
int HardwareSerial::peek (void )
Original file line number Diff line number Diff line change 32
32
// using a ring buffer (I think), in which head is the index of the location
33
33
// to which to write the next incoming character and tail is the index of the
34
34
// location from which to read.
35
+ // NOTE: a "power of 2" buffer size is reccomended to dramatically
36
+ // optimize all the modulo operations for ring buffers.
35
37
#if !(defined(SERIAL_TX_BUFFER_SIZE) && defined(SERIAL_RX_BUFFER_SIZE))
36
38
#if (RAMEND < 1000)
37
39
#define SERIAL_TX_BUFFER_SIZE 16
You can’t perform that action at this time.
0 commit comments