Circular Buffer implementation.
Copyright (c) 2019 Microchip Technology Inc. and its subsidiaries.
#include "circularBuffer.h"
Functions | |
void | initCircularBuffer (circularBuffer_t *circularBuffer, uint8_t *buffer, uint16_t size) |
uint16_t | readCircularBuffer (circularBuffer_t *circularBuffer, uint16_t maxReadLength, uint8_t *readBuffer) |
void | writeCircularBuffer (circularBuffer_t *circularBuffer, uint16_t length, uint8_t *value) |
void initCircularBuffer | ( | circularBuffer_t * | circularBuffer, |
uint8_t * | buffer, | ||
uint16_t | size | ||
) |
References buffer, circularBuffer_t::buffer, circularBuffer_t::head, circularBuffer_t::size, and circularBuffer_t::tail.
Referenced by otauDebugInit(), and otauDebugRcvdFrame().
uint16_t readCircularBuffer | ( | circularBuffer_t * | circularBuffer, |
uint16_t | maxReadLength, | ||
uint8_t * | readBuffer | ||
) |
References circularBuffer_t::buffer, circularBuffer_t::head, NULL, circularBuffer_t::size, and circularBuffer_t::tail.
Referenced by otauDebugTimerHandler().
void writeCircularBuffer | ( | circularBuffer_t * | circularBuffer, |
uint16_t | length, | ||
uint8_t * | value | ||
) |
References circularBuffer_t::buffer, NULL, circularBuffer_t::size, and circularBuffer_t::tail.
Referenced by otau_log(), and otau_trace().