Ringbuffer.
More...
#include <FreeRTOS.h>
|
| Ringbuffer (size_t length, ringbuf_type_t type=RINGBUF_TYPE_NOSPLIT) |
| Create a ring buffer. More...
|
|
void * | receive (size_t *size, TickType_t wait=portMAX_DELAY) |
| Receive data from the buffer. More...
|
|
void | returnItem (void *item) |
| Return an item. More...
|
|
bool | send (void *data, size_t length, TickType_t wait=portMAX_DELAY) |
| Send data to the buffer. More...
|
|
Ringbuffer::Ringbuffer |
( |
size_t |
length, |
|
|
ringbuf_type_t |
type = RINGBUF_TYPE_NOSPLIT |
|
) |
| |
Create a ring buffer.
- Parameters
-
[in] | length | The amount of storage to allocate for the ring buffer. |
[in] | type | The type of buffer. One of RINGBUF_TYPE_NOSPLIT, RINGBUF_TYPE_ALLOWSPLIT, RINGBUF_TYPE_BYTEBUF. |
void * Ringbuffer::receive |
( |
size_t * |
size, |
|
|
TickType_t |
wait = portMAX_DELAY |
|
) |
| |
Receive data from the buffer.
- Parameters
-
[out] | size | On return, the size of data returned. |
[in] | wait | How long to wait. |
- Returns
- A pointer to the storage retrieved.
void Ringbuffer::returnItem |
( |
void * |
item | ) |
|
Return an item.
- Parameters
-
[in] | item | The item to be returned/released. |
bool Ringbuffer::send |
( |
void * |
data, |
|
|
size_t |
length, |
|
|
TickType_t |
wait = portMAX_DELAY |
|
) |
| |
Send data to the buffer.
- Parameters
-
[in] | data | The data to place into the buffer. |
[in] | length | The length of data to place into the buffer. |
[in] | wait | How long to wait before giving up. The default is to wait indefinitely. |
- Returns
The documentation for this class was generated from the following files: