|
|
|
@ -198,9 +198,9 @@ FastSerial::write(uint8_t c)
@@ -198,9 +198,9 @@ FastSerial::write(uint8_t c)
|
|
|
|
|
uint8_t i; |
|
|
|
|
|
|
|
|
|
// wait for room in the tx buffer
|
|
|
|
|
do { |
|
|
|
|
i = (_txBuffer.head + 1) % RX_BUFFER_SIZE; |
|
|
|
|
} while (i == _txBuffer.tail); |
|
|
|
|
i = (_txBuffer.head + 1) % TX_BUFFER_SIZE; |
|
|
|
|
while (i == _txBuffer.tail) |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
// add byte to the buffer
|
|
|
|
|
_txBuffer.bytes[_txBuffer.head] = c; |
|
|
|
@ -210,13 +210,6 @@ FastSerial::write(uint8_t c)
@@ -210,13 +210,6 @@ FastSerial::write(uint8_t c)
|
|
|
|
|
*_ucsrb |= _portTxBits; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
FastSerial::write(const uint8_t *buffer, int count) |
|
|
|
|
{ |
|
|
|
|
while (count--) |
|
|
|
|
write(*buffer++); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// STDIO emulation /////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
int |
|
|
|
|