Closed GoogleCodeExporter closed 9 years ago
Yes, of course. If the buffer is full when you write, the function will block
waiting for room. Since (uart) interrupts are required for characters to be
removed from the buffer, and all interrupts are disabled during any ISR, you
are stuck.
This is another example of what I keep saying about buffered output not solving
the problems that people think it solves. ("Nyah, nyah... Told you so!")
Original comment by wes...@gmail.com
on 8 Oct 2011 at 11:04
Well, I submitted a pull request for a potential fix on GitHub, namely a
function called Serial.waitForBufferSpace(0); that the user can call that
disables that waiting inside of Serial.write, and simply makes it returns 0
when this condition occurs. Problem solved, at least for me.
Original comment by hjohnson...@ric.edu
on 9 Oct 2011 at 12:37
Original comment by dmel...@gmail.com
on 10 Oct 2011 at 4:45
Follow up here:
https://github.com/arduino/Arduino/issues/672
Original comment by c.mag...@arduino.cc
on 28 Jan 2014 at 5:02
Original issue reported on code.google.com by
hjohnson...@ric.edu
on 8 Oct 2011 at 4:59Attachments: