Skip to content

Commit 5b7c5b2

Browse files
committed
sys/tsrb: emphasize buffer size requirement
This patch makes the requirement on buffer size more prominent. Additionally, it adds the missing argument to the doxygen block of the static initializer.
1 parent 2c8e80d commit 5b7c5b2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

sys/include/tsrb.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,21 @@ typedef struct tsrb {
4545

4646
/**
4747
* @brief Static initializer
48+
*
49+
* @note The size of the buffer (`sizeof(@p BUF)`) must be a power of two.
50+
*
51+
* @param[in] BUF Buffer to use by tsrb.
4852
*/
4953
#define TSRB_INIT(BUF) { (BUF), sizeof (BUF), 0, 0 }
5054

5155
/**
5256
* @brief Initialize a tsrb.
57+
*
58+
* @note The size of the buffer (@p bufsize) must be a power of two.
59+
*
5360
* @param[out] rb Datum to initialize.
5461
* @param[in] buffer Buffer to use by tsrb.
55-
* @param[in] bufsize `sizeof (buffer)`, must be power of 2.
62+
* @param[in] bufsize Size of @p buffer.
5663
*/
5764
static inline void tsrb_init(tsrb_t *rb, uint8_t *buffer, unsigned bufsize)
5865
{

0 commit comments

Comments
 (0)