Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

buffer.c File Reference


Detailed Description

Definition in file buffer.c.

#include "buffer.h"
#include "global.h"
#include "avr/io.h"

Go to the source code of this file.

Defines

#define CRITICAL_SECTION_START   unsigned char _sreg = SREG; cli()
#define CRITICAL_SECTION_END   SREG = _sreg

Functions

void bufferInit (cBuffer *buffer, unsigned char *start, unsigned short size)
 initialize a buffer to start at a given address and have given size
unsigned char bufferGetFromFront (cBuffer *buffer)
 get the first byte from the front of the buffer
void bufferDumpFromFront (cBuffer *buffer, unsigned short numbytes)
 dump (discard) the first numbytes from the front of the buffer
unsigned char bufferGetAtIndex (cBuffer *buffer, unsigned short index)
 get a byte at the specified index in the buffer (kind of like array access)
unsigned char bufferAddToEnd (cBuffer *buffer, unsigned char data)
 add a byte to the end of the buffer
unsigned short bufferIsNotFull (cBuffer *buffer)
 check if the buffer is full/not full (returns zero value if full)
void bufferFlush (cBuffer *buffer)
 flush (clear) the contents of the buffer


Generated on Sun Oct 29 03:41:08 2006 for Procyon AVRlib by  doxygen 1.4.2