Envorimental Monitoring
Loading...
Searching...
No Matches
buf_handle_t Struct Reference

Ring buffer control structure. More...

#include <ring_buffer.h>

Data Fields

float * buffer
uint16_t head
uint16_t tail
uint16_t count
uint16_t size

Detailed Description

Ring buffer control structure.

All fields should be treated as private; use the API functions below to interact with the buffer.

Field Documentation

◆ buffer

float* buffer

Pointer to the externally allocated storage array.

◆ count

uint16_t count

Number of valid samples currently in the buffer.

◆ head

uint16_t head

Write index — points to the next free slot.

◆ size

uint16_t size

Total capacity of the buffer (number of floats).

◆ tail

uint16_t tail

Read index — points to the oldest sample.


The documentation for this struct was generated from the following file: