kBuffer  1.1
Data Fields
buffer_t Struct Reference

Struct for buffer handling. If you need a ringbuffer in your software, you should instantiate a buffer_t, and run the neccessary functions with a pointer to your instance. More...

#include <kBuffer.h>

Data Fields

uint8_t isInitialized
 is 0 if the buffer is not initialized
 
uint16_t writePointer
 The write pointer of the buffer. At a write procedure, data gets written and the pointer is incremented.
 
uint16_t readPointer
 The read pointer of the buffer. At a read procedure, data gets read and the pointer is incremented.
 
uint16_t length
 The number of elements in the buffer.
 
uint8_t elementLength
 The number of bytes of one buffer element. The total memory consumption in Bytes is equal to length * elementLength.
 
uint16_t datacount
 A variable which is increased by one when new data gets written and decremented by one when data is read.
 
bufferDatatypedata
 A pointer to the first element of the buffer. Length * elementLength bytes of memory are allocated after this pointer.
 

Detailed Description

Struct for buffer handling. If you need a ringbuffer in your software, you should instantiate a buffer_t, and run the neccessary functions with a pointer to your instance.


The documentation for this struct was generated from the following file: