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:
parent
f8d7762f0e
commit
8bea7c2b94
@ -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));
|
||||
|
@ -21,6 +21,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define RINGBUF_TYPE_NOSPLIT 0
|
||||
#define RINGBUF_TYPE_BYTEBUF 2
|
||||
|
||||
typedef unsigned RingbufferType_t;
|
||||
|
Loading…
Reference in New Issue
Block a user