Digi XBee(R) ANSI C Host Library
|
Go to the source code of this file.
Data Structures | |
struct | xbee_cbuf_t |
Circular buffer used by transparent serial cluster handler. More... | |
Macros | |
#define | XBEE_CBUF_OVERHEAD sizeof(xbee_cbuf_t) |
XBEE_CBUF_OVERHEAD is used when allocating memory for a circular buffer. More... | |
#define | xbee_cbuf_length(cbuf) ((cbuf)->mask) |
Returns the capacity of the circular buffer. More... | |
Functions | |
int | xbee_cbuf_init (xbee_cbuf_t FAR *cbuf, unsigned int datasize) |
Initialize the fields of the circular buffer. More... | |
int | xbee_cbuf_putch (xbee_cbuf_t FAR *cbuf, uint_fast8_t ch) |
Append a single byte to the circular buffer (if not full). More... | |
int | xbee_cbuf_getch (xbee_cbuf_t FAR *cbuf) |
Remove and return the first byte of the circular buffer. More... | |
unsigned int | xbee_cbuf_used (xbee_cbuf_t FAR *cbuf) |
Returns the number of bytes stored in the circular buffer. More... | |
unsigned int | xbee_cbuf_free (xbee_cbuf_t FAR *cbuf) |
Returns the number of additional bytes that can be stored in the circular buffer. More... | |
void | xbee_cbuf_flush (xbee_cbuf_t FAR *cbuf) |
Flush the contents of the circular buffer. More... | |
unsigned int | xbee_cbuf_put (xbee_cbuf_t FAR *cbuf, const void FAR *buffer, unsigned int length) |
Append multiple bytes to the end of a circular buffer. More... | |
unsigned int | xbee_cbuf_get (xbee_cbuf_t *cbuf, void FAR *buffer, unsigned int length) |
Read (and remove) multiple bytes from circular buffer. More... | |