Skip to content
Permalink
Browse files

include/uart.h: Clarify async receive event length

Clarify that the async receive event length is relative to the
offset, rather than representing an absolute length of data
received.

Signed-off-by: Derek Hageman <hageman@inthat.cloud>
  • Loading branch information...
Sizurka authored and nashif committed May 13, 2019
1 parent 5d65ee1 commit 699217637cf4978d04c49cc17af61b0ecea1707d
Showing with 8 additions and 3 deletions.
  1. +8 −3 include/uart.h
@@ -174,13 +174,18 @@ struct uart_event_tx {
size_t len;
};

/** @brief UART RX event data. */
/**
* @brief UART RX event data.
*
* The data represented by the event is stored in rx.buf[rx.offset] to
* rx.buf[rx.offset+rx.len]. That is, the length is relative to the offset.
*/
struct uart_event_rx {
/** @brief Pointer to current buffer. */
u8_t *buf;
/** @brief Offset from buffer start to currently received data. */
/** @brief Currently received data offset in bytes. */
size_t offset;
/** @brief Number of bytes received. */
/** @brief Number of new bytes received. */
size_t len;
};

0 comments on commit 6992176

Please sign in to comment.
You can’t perform that action at this time.