added doc, changed type

This commit is contained in:
Robin Müller 2020-09-22 16:32:59 +02:00
parent 2f73841580
commit 978d7514a4
2 changed files with 10 additions and 2 deletions

View File

@ -18,7 +18,7 @@ SharedRingBuffer::SharedRingBuffer(object_id_t objectId, uint8_t *buffer,
}
void SharedRingBuffer::setToUseReceiveSizeFIFO(uint32_t fifoDepth) {
void SharedRingBuffer::setToUseReceiveSizeFIFO(size_t fifoDepth) {
this->fifoDepth = fifoDepth;
}

View File

@ -27,7 +27,15 @@ public:
SharedRingBuffer(object_id_t objectId, const size_t size,
bool overwriteOld, size_t maxExcessBytes);
void setToUseReceiveSizeFIFO(uint32_t fifoDepth);
/**
* @brief This function can be used to add an optional FIFO to the class
* @details
* This FIFO will be allocated in the initialize function (and will
* have a fixed maximum size after that). It can be used to store
* values like packet sizes, for example for a shared ring buffer
* used by producer/consumer tasks.
*/
void setToUseReceiveSizeFIFO(size_t fifoDepth);
/**
* This constructor takes an external buffer with the specified size.