mirror of
https://github.com/apache/nuttx.git
synced 2026-09-23 16:22:23 +08:00
lib/circbuf: add static initialize macro helper
struct circbuf_s circ = CIRCBUF_INITIALIZER(buffer, size); Signed-off-by: chao an <anchao@lixiang.com>
This commit is contained in:
@@ -37,6 +37,12 @@
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define CIRCBUF_INITIALIZER(base, size) { base, size, 0, 0, true }
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user