static uint8_t getType(uint16_t index) { int8_t arrayPos = convertToArrayPos(index); if (arrayPos < 0) return 0; return types[arrayPos]; }
static void setType(uint16_t index, uint8_t type) { int8_t arrayPos = convertToArrayPos(index); if (arrayPos < 0) return; types[arrayPos] = type; }
static void setDate(uint16_t index, char *name) { int8_t arrayPos = convertToArrayPos(index); if (arrayPos < 0) return; strcpy(dates[arrayPos],name); }
static char* getDate(uint16_t index) { int8_t arrayPos = convertToArrayPos(index); if (arrayPos < 0) return ""; return dates[arrayPos]; }
static char* getNumber(uint16_t index) { int8_t arrayPos = convertToArrayPos(index); if (arrayPos < 0) return ""; return numbers[arrayPos]; }
bool cb_isLoaded(CircularBuffer* buffer, uint16_t index) { int8_t bufferPosition = convertToArrayPos(buffer, index); if (bufferPosition < 0) return false; return buffer->loaded[bufferPosition]; }
void* cb_getEntryForFilling(CircularBuffer* buffer, uint16_t index) { int8_t bufferPosition = convertToArrayPos(buffer, index); if (bufferPosition < 0) return NULL; buffer->loaded[bufferPosition] = true; return (void*) &buffer->data[buffer->singleEntrySize * bufferPosition]; }