42 int read(uint8_t *str,
int len) {
43 for (
int j = 0; j < len; j++) {
75 size_t write(uint8_t *str,
int len) {
76 for (
int j = 0; j < len; j++) {
77 int result =
write(str[j]);
Implementation of a Simple Circular Buffer. Instead of comparing the position of the read and write p...
Definition: RingBuffer.h:16
size_t write(uint8_t ch)
Definition: RingBuffer.h:62
RingBuffer(int size=512)
Definition: RingBuffer.h:18
int peek()
Definition: RingBuffer.h:54
int read(uint8_t *str, int len)
Definition: RingBuffer.h:42
void resize(int size)
Definition: RingBuffer.h:85
int available()
Definition: RingBuffer.h:24
int actual_write_pos
Definition: RingBuffer.h:92
int max_len
Definition: RingBuffer.h:89
size_t write(uint8_t *str, int len)
Definition: RingBuffer.h:75
int actual_len
Definition: RingBuffer.h:90
int availableToWrite()
Definition: RingBuffer.h:26
Vector< char > buffer
Definition: RingBuffer.h:88
int actual_read_pos
Definition: RingBuffer.h:91
int read()
Definition: RingBuffer.h:29
bool resize(int newSize, T value)
Definition: Vector.h:247
Definition: Allocator.h:6