ring_buf
Loading...
Searching...
No Matches
ring_buf_item.h
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: MIT
3 * SPDX-FileCopyrightText: 2024, Roy Ratcliffe, Northumberland, United Kingdom
4 */
33#ifndef __RING_BUF_ITEM_H__
34#define __RING_BUF_ITEM_H__
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40#include "ring_buf.h"
41
46typedef uint16_t ring_buf_item_length_t;
47
58int ring_buf_item_put(struct ring_buf *buf, const void *item,
60
73int ring_buf_item_get(struct ring_buf *buf, void *item,
75
76#ifdef __cplusplus
77}
78#endif
79
80#endif /* __RING_BUF_ITEM_H__ */
Ring buffer function prototypes.
int ring_buf_item_put(struct ring_buf *buf, const void *item, ring_buf_item_length_t length)
Puts an item's length and content.
int ring_buf_item_get(struct ring_buf *buf, void *item, ring_buf_item_length_t *length)
Gets an item from a ring buffer.
uint16_t ring_buf_item_length_t
Size of the ring buffer's item length.
Ring buffer instance.
Definition ring_buf.h:128