#include <string.h>
#include <cirbuf.h>
Go to the source code of this file.
Functions | |
cirbuf_int | cirbuf_add_buf_head (struct cirbuf *cbuf, const char *c, cirbuf_uint n) |
cirbuf_int cirbuf_add_buf_head | ( | struct cirbuf * | cbuf, | |
const char * | c, | |||
cirbuf_uint | n | |||
) |
Add a buffer at head of the circular buffer. 'c' is a pointer to a buffer, and n is the number of char to add. Return the number of copied bytes on success, or a negative value on error.
Definition at line 31 of file cirbuf_add_buf_head.c.
References cirbuf::buf, CIRBUF_GET_FREELEN, CIRBUF_IS_EMPTY, dprintf, EINVAL, cirbuf::len, cirbuf::maxlen, and cirbuf::start.
Referenced by uart_send_9bits(), and uart_send_9bits_nowait().