Displaying 2 results from an estimated 2 matches for "ser_get_".
Did you mean:
ser_get
2008 Oct 30
1
Adding debugging information in serial.c
In order to improve the diagnostics for serial connected devices, I
would like to add the possibility to differentiate between errors and
timeouts.
For the ser_get_char() and ser_get_buf_len() we might do this by
changing the return value. For the first, return value -1 would be an
error, 0 a timeout and 1 success. The latter could return -1 on error,
between 0 and (buflen-1) for a timeout and buflen for success.
Unfortunately, the ser_get_line_alert()...
2009 Jan 27
0
[PATCH] al175: updated driver, please restore it
...nd timing out. This is a frequent problem and we want to solve
this in a generic way for all drivers and not on a driver-by-driver
basis (like you did in the AL175 driver now).
Your misconception is that you need to calculate the time spent during
the communication. This is not the case. The ser_get_*() functions
will return as soon they have read the number of bytes requested or
the end character was found, no matter how much time is remaining. The
timeout is only there to make sure that if characters are lost or the
UPS is disconnected, the driver can break from (usually)
upsdrv_upd...