153 #ifndef SHARED_BUFFER_H
154 #define SHARED_BUFFER_H
161 static uint16_t head;
162 static uint16_t usedSpace;
163 static List bufferList;
166 uint16_t lastWritten;
168 static uint16_t append(uint16_t len,
const byte* data);
169 static uint16_t writeAt(uint16_t index, uint16_t len,
const byte* data);
170 static uint16_t readAt(uint16_t index, uint16_t len, byte* data );
175 uint16_t
write(uint16_t len,
const byte* data);
183 uint16_t
fillTxBuffer(uint16_t dstOffset, uint16_t& checksum, uint16_t count=0xFFFF);
uint16_t release()
Releases one fragment of data
void flush()
Releases all data in this buffer, freeing up space.
uint16_t write(uint16_t len, const byte *data)
Writes a fragment to the shared buffer
Implements a "shared" circular buffer using spare ENC28J60 memory.
bool isEmpty()
Determines whether this buffer is empty
uint16_t fillTxBuffer(uint16_t dstOffset, uint16_t &checksum, uint16_t count=0xFFFF)
Copies up to count fragments to the transmit buffer via DMA, concatenating them starting at given off...