Hi Joep,
On 03/31/12 01:33 pm, Joep Suijs wrote:
I also suspect 'serial_overflow_discard=true' might not work properly
with the 'put procedure...
Did you observe mal behaviour?
No, I never want to loose chars (even if it messes up my timing). But
if I understand correct: the serial_overflow_discard=true makes
serial_send_byte() to exit on buffer full, with
serial_send_success=false. As a result serial_hw_data'put() will try
again. So no discard...
Right! Same with serial_hw_write()!
I think these procedures need not check serial_send_success at all!
1. when buffer is empty data will be transmitted immediately
2. when buffer is not full the data is put in the buffer
3. when buffer is full and serial_overflow_discard == FALSE,
serial_send_byte() spins until a previous byte is
physically transmitted
4. when buffer is full and serial_overflow_discard == TRUE,
data is discarded, but user doesn't care.
So in all possible situations transmission can be considered as
successful, and 'serial_send_success' can in fact be removed!
It may have been added by someone who didn't fully understand the
working of this library.
Will do some more testing, also with serial_overflow_discard = TRUE,
even though I never use that option.
Regards, Rob.
--
R. Hamerling, Netherlands --- http://www.robh.nl
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en.