APM:Libraries
|
#include <ring_buffer_pulse.h>
Public Attributes | |
Pulse * | buf |
uint16_t | head |
volatile uint16_t | tail |
uint16_t | size |
Ring buffer type.
The buffer is empty when head == tail.
The buffer is full when the head is one byte in front of the tail, modulo buffer length.
One element is left free to distinguish empty from full.
Definition at line 34 of file ring_buffer_pulse.h.
Pulse* Pulse_buffer::buf |
Buffer items are stored into
Definition at line 35 of file ring_buffer_pulse.h.
Referenced by pb_init(), pb_insert(), and pb_remove().
uint16_t Pulse_buffer::head |
Index of the next item to remove
Definition at line 36 of file ring_buffer_pulse.h.
Referenced by pb_full_count(), pb_init(), pb_is_empty(), pb_is_full(), pb_remove(), and pb_reset().
uint16_t Pulse_buffer::size |
Buffer capacity minus one
Definition at line 38 of file ring_buffer_pulse.h.
Referenced by pb_full_count(), pb_init(), pb_insert(), pb_is_full(), and pb_remove().
volatile uint16_t Pulse_buffer::tail |
Index where the next item will get inserted
Definition at line 37 of file ring_buffer_pulse.h.
Referenced by pb_full_count(), pb_init(), pb_insert(), pb_is_empty(), pb_is_full(), and pb_reset().