#include <string.h>
#include <cirbuf.h>
Go to the source code of this file.
Functions | |
cirbuf_int | cirbuf_add_head_safe (struct cirbuf *cbuf, char c) |
void | cirbuf_add_head (struct cirbuf *cbuf, char c) |
void cirbuf_add_head | ( | struct cirbuf * | cbuf, | |
char | c | |||
) |
Add a character at head of the circular buffer. You _must_ check that you have enough free space in the buffer before calling this func.
Definition at line 52 of file cirbuf_add_head.c.
Referenced by rdline_char_in(), uart_send(), and uart_send_nowait().
cirbuf_int cirbuf_add_head_safe | ( | struct cirbuf * | cbuf, | |
char | c | |||
) |
Add a character at head of the circular buffer. Return 0 on success, or a negative value on error.
Definition at line 42 of file cirbuf_add_head.c.
References CIRBUF_IS_FULL, and EINVAL.