mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-24 22:13:52 +01:00
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.
This commit is contained in:
parent
2c8e80d474
commit
5b7c5b232c
@ -45,14 +45,21 @@ typedef struct tsrb {
|
||||
|
||||
/**
|
||||
* @brief Static initializer
|
||||
*
|
||||
* @note The size of the buffer (`sizeof(@p BUF)`) must be a power of two.
|
||||
*
|
||||
* @param[in] BUF Buffer to use by tsrb.
|
||||
*/
|
||||
#define TSRB_INIT(BUF) { (BUF), sizeof (BUF), 0, 0 }
|
||||
|
||||
/**
|
||||
* @brief Initialize a tsrb.
|
||||
*
|
||||
* @note The size of the buffer (@p bufsize) must be a power of two.
|
||||
*
|
||||
* @param[out] rb Datum to initialize.
|
||||
* @param[in] buffer Buffer to use by tsrb.
|
||||
* @param[in] bufsize `sizeof (buffer)`, must be power of 2.
|
||||
* @param[in] bufsize Size of @p buffer.
|
||||
*/
|
||||
static inline void tsrb_init(tsrb_t *rb, uint8_t *buffer, unsigned bufsize)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user