1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/esp_common: add RINGBUF_TYPE_NOSPLIT to ringbuffer

This commit is contained in:
Gunar Schorcht 2023-03-26 18:29:33 +02:00
parent f8d7762f0e
commit 8bea7c2b94
2 changed files with 4 additions and 2 deletions

View File

@ -28,8 +28,9 @@ typedef struct {
RingbufHandle_t xRingbufferCreate(size_t xBufferSize, RingbufferType_t xBufferType)
{
/* only byte buffer supported for now */
assert(xBufferType == RINGBUF_TYPE_BYTEBUF);
/* only byte and no split buffers are supported for now */
assert((xBufferType == RINGBUF_TYPE_BYTEBUF) ||
(xBufferType == RINGBUF_TYPE_NOSPLIT));
/* allocate the space for rbuf_handle_t including the buffer */
rbuf_handle_t *handle = malloc(xBufferSize + sizeof(uint16_t) + sizeof(ringbuffer_t));

View File

@ -21,6 +21,7 @@
extern "C" {
#endif
#define RINGBUF_TYPE_NOSPLIT 0
#define RINGBUF_TYPE_BYTEBUF 2
typedef unsigned RingbufferType_t;