aversive_10-03-12/modules/base/cirbuf/cirbuf_add_buf_head.c File Reference

#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)


Function Documentation

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().


Generated on Fri Mar 12 06:32:05 2010 for AVR by  doxygen 1.5.6