- Tue Jan 25, 2011 9:55 pm
#118432
Any Ardino system software gurus out there?
Am I correct that the current Audino hardware serial library code does not use buffered output for the serial transmit? The code below, shows a busy-loop waiting on the prior byte to finish before sending the next. Unlike the hardware serial receive functions, there seems to be no ring buffer on the output, and use of transmit interrupts.
This busy loop would hose up timing-dependent code.
Am I correct that the current Audino hardware serial library code does not use buffered output for the serial transmit? The code below, shows a busy-loop waiting on the prior byte to finish before sending the next. Unlike the hardware serial receive functions, there seems to be no ring buffer on the output, and use of transmit interrupts.
This busy loop would hose up timing-dependent code.
Code: Select all
void HardwareSerial::write(uint8_t c)
{
while (!((*_ucsra) & (1 << _udre)))
;
*_udr = c;
}