mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-14 11:29:26 +01:00
Use correct type for index calculation in HardwareSerial
This commit is contained in:
parent
77187ad4e4
commit
1ad74ce09b
@ -99,7 +99,7 @@ void HardwareSerial::_rx_complete_irq(void)
|
|||||||
// No Parity error, read byte and store it in the buffer if there is
|
// No Parity error, read byte and store it in the buffer if there is
|
||||||
// room
|
// room
|
||||||
unsigned char c = *_udr;
|
unsigned char c = *_udr;
|
||||||
uint8_t i = (unsigned int)(_rx_buffer_head + 1) % SERIAL_RX_BUFFER_SIZE;
|
rx_buffer_index_t i = (unsigned int)(_rx_buffer_head + 1) % SERIAL_RX_BUFFER_SIZE;
|
||||||
|
|
||||||
// if we should be storing the received character into the location
|
// if we should be storing the received character into the location
|
||||||
// just before the tail (meaning that the head would advance to the
|
// just before the tail (meaning that the head would advance to the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user