From 2c8e80d474f5b4b56d4dd6886aabb370c6fc435e Mon Sep 17 00:00:00 2001 From: Joshua DeWeese Date: Wed, 2 Apr 2025 15:22:20 -0400 Subject: [PATCH] sys/isrpipe: clarify state after timeout This patch documents what happens when a timeout occurs when isrpipe_read_all_timeout() has been called. --- sys/include/isrpipe/read_timeout.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/include/isrpipe/read_timeout.h b/sys/include/isrpipe/read_timeout.h index 984de0c53f..14e13b3700 100644 --- a/sys/include/isrpipe/read_timeout.h +++ b/sys/include/isrpipe/read_timeout.h @@ -52,6 +52,12 @@ int isrpipe_read_timeout(isrpipe_t *isrpipe, uint8_t *buf, size_t count, uint32_ * This function is like @ref isrpipe_read_timeout, but will only return on * timeout or when @p count bytes have been received. * + * A timeout only occurs if no data is received within @p timeout microseconds. + * Each time a byte or burst of bytes is received, the timeout is reset. + * + * @note If a timeout occurs, some bytes may have been read out of the pipe and + * placed into @p buf. + * * @param[in] isrpipe isrpipe object to operate on * @param[in] buf buffer to write to * @param[in] count number of bytes to read