ISR -> userspace pipe with timeout. More...
ISR -> userspace pipe with timeout.
Files | |
| file | read_timeout.h |
| isrpipe read timeout Interface | |
Functions | |
| int | isrpipe_read_timeout (isrpipe_t *isrpipe, uint8_t *buf, size_t count, uint32_t timeout) |
| Read data from isrpipe (with timeout, blocking) More... | |
| int | isrpipe_read_all_timeout (isrpipe_t *isrpipe, uint8_t *buf, size_t count, uint32_t timeout) |
| Read data from isrpipe (with timeout, blocking, wait until all read) More... | |
| int isrpipe_read_all_timeout | ( | isrpipe_t * | isrpipe, |
| uint8_t * | buf, | ||
| size_t | count, | ||
| uint32_t | timeout | ||
| ) |
Read data from isrpipe (with timeout, blocking, wait until all read)
This function is like isrpipe_read_timeout, but will only return on timeout or when count bytes have been received.
A timeout only occurs if no data is received within timeout microseconds. Each time a byte or burst of bytes is received, the timeout is reset.
buf.| [in] | isrpipe | isrpipe object to operate on |
| [in] | buf | buffer to write to |
| [in] | count | number of bytes to read |
| [in] | timeout | timeout in microseconds |
| int isrpipe_read_timeout | ( | isrpipe_t * | isrpipe, |
| uint8_t * | buf, | ||
| size_t | count, | ||
| uint32_t | timeout | ||
| ) |
Read data from isrpipe (with timeout, blocking)
Currently, the timeout parameter is applied on every underlying read, which might be per single byte.
count bytes| [in] | isrpipe | isrpipe object to operate on |
| [in] | buf | buffer to write to |
| [in] | count | number of bytes to read |
| [in] | timeout | timeout in microseconds |