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

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


Function Documentation

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.


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