ringbuf.c File Reference

Ring buffer library implementation. More...

#include "lib/ringbuf.h"

Go to the source code of this file.

Functions

void ringbuf_init (struct ringbuf *r, uint8_t *dataptr, uint8_t size)
 Initialize a ring buffer.
int ringbuf_put (struct ringbuf *r, uint8_t c)
 Insert a byte into the ring buffer.
int ringbuf_get (struct ringbuf *r)
 Get a byte from the ring buffer.
int ringbuf_size (struct ringbuf *r)
 Get the size of a ring buffer.
int ringbuf_elements (struct ringbuf *r)
 Get the number of elements currently in the ring buffer.

Detailed Description

Ring buffer library implementation.

Author:
Adam Dunkels <adam@sics.se>

Definition in file ringbuf.c.


Generated on Mon Apr 11 14:23:46 2011 for Contiki 2.5 by  doxygen 1.6.1