File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
hardware/arduino/avr/cores/arduino Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ int HardwareSerial::read(void)
171171 return -1 ;
172172 } else {
173173 unsigned char c = _rx_buffer[_rx_buffer_tail];
174- _rx_buffer_tail = (unsigned int )(_rx_buffer_tail + 1 ) % SERIAL_BUFFER_SIZE;
174+ _rx_buffer_tail = (uint8_t )(_rx_buffer_tail + 1 ) % SERIAL_BUFFER_SIZE;
175175 return c;
176176 }
177177}
@@ -207,7 +207,7 @@ size_t HardwareSerial::write(uint8_t c)
207207 sbi (*_ucsra, TXC0);
208208 return 1 ;
209209 }
210- int i = (_tx_buffer_head + 1 ) % SERIAL_BUFFER_SIZE;
210+ uint8_t i = (_tx_buffer_head + 1 ) % SERIAL_BUFFER_SIZE;
211211
212212 // If the output buffer is full, there's nothing for it other than to
213213 // wait for the interrupt handler to empty it a bit
You can’t perform that action at this time.
0 commit comments