Chapter 2. API Reference
void
xRingbufferPrintInfo(RingbufHandle_t
Debugging function to print the internal pointers in the ring buffer.
Parameters
• xRingbuffer: Ring buffer to show
Structures
struct xSTATIC_RINGBUFFER
Struct that is equivalent in size to the ring buffer's data structure.
The contents of this struct are not meant to be used directly. This structure is meant to be used when creating
a statically allocated ring buffer where this struct is of the exact size required to store a ring buffer's control
data structure.
Type Definitions
typedef void *RingbufHandle_t
Type by which ring buffers are referenced. For example, a call to xRingbufferCreate() returns a RingbufHan-
dle_t variable that can then be used as a parameter to xRingbufferSend(), xRingbufferReceive(), etc.
typedef struct
xSTATIC_RINGBUFFER
Struct that is equivalent in size to the ring buffer's data structure.
The contents of this struct are not meant to be used directly. This structure is meant to be used when creating
a statically allocated ring buffer where this struct is of the exact size required to store a ring buffer's control
data structure.
Enumerations
enum RingbufferType_t
Values:
RINGBUF_TYPE_NOSPLIT = 0
No-split buffers will only store an item in contiguous memory and will never split an item. Each item
requires an 8 byte overhead for a header and will always internally occupy a 32-bit aligned size of space.
RINGBUF_TYPE_ALLOWSPLIT
Allow-split buffers will split an item into two parts if necessary in order to store it. Each item requires
an 8 byte overhead for a header, splitting incurs an extra header. Each item will always internally occupy
a 32-bit aligned size of space.
RINGBUF_TYPE_BYTEBUF
Byte buffers store data as a sequence of bytes and do not maintain separate items, therefore byte buffers
have no overhead. All data is stored as a sequence of byte and any number of bytes can be sent or retrieved
each time.
RINGBUF_TYPE_MAX
Hooks API
Header File
•
components/esp_system/include/esp_freertos_hooks.h
Functions
esp_err_t esp_register_freertos_idle_hook_for_cpu(esp_freertos_idle_cb_t
Register a callback to be called from the specified core's idle hook. The callback should return true if it
should be called by the idle hook once per interrupt (or FreeRTOS tick), and return false if it should be called
repeatedly as fast as possible by the idle hook.
Espressif Systems
xRingbuffer)
StaticRingbuffer_t
970
Submit Document Feedback
new_idle_cb,
UBaseType_t cpuid)
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?