Ring buffer management. More...
|
Data Structures | |
| struct | co_ring |
| Structure holds the information related to the ring. More... | |
Functions | |
| __INLINE void | co_ring_init (struct co_ring *ring, uint8_t max_count) |
| This function initializes the co-ring array structure. | |
| __INLINE void | co_ring_write (struct co_ring *ring) |
| Write an element onto the ring. | |
| __INLINE void | co_ring_read (struct co_ring *ring) |
| Read an element from the ring. | |
| __INLINE bool | co_ring_empty (struct co_ring *ring) |
| Check if the ring is empty. | |
| __INLINE bool | co_ring_full (struct co_ring *ring) |
| Check if the ring is full. | |
Ring buffer management.
This module contains the ring buffer structure definition and its member function proto-types.
| __INLINE bool co_ring_empty | ( | struct co_ring * | ring | ) |
Check if the ring is empty.
| [in] | ring | Pointer to the ring instance. |
Definition at line 141 of file co_ring.h.
References ASSERT_ERR, co_ring::max_count, and co_ring::used_count.
| __INLINE bool co_ring_full | ( | struct co_ring * | ring | ) |
Check if the ring is full.
| [in] | ring | Pointer to the ring instance. |
Definition at line 157 of file co_ring.h.
References ASSERT_ERR, co_ring::max_count, and co_ring::used_count.
| __INLINE void co_ring_init | ( | struct co_ring * | ring, | |
| uint8_t | max_count | |||
| ) |
This function initializes the co-ring array structure.
| [in] | ring | Pointer to ring instance holding the ring parameters. |
| [in] | max_count | Number of elements in the ring. |
Definition at line 73 of file co_ring.h.
References ASSERT_ERR, co_ring::free_idx, co_ring::max_count, co_ring::used_count, and co_ring::used_idx.
| __INLINE void co_ring_read | ( | struct co_ring * | ring | ) |
Read an element from the ring.
| [in] | ring | Pointer to the ring instance. |
Definition at line 115 of file co_ring.h.
References ASSERT_ERR, co_ring::max_count, co_ring::used_count, and co_ring::used_idx.
| __INLINE void co_ring_write | ( | struct co_ring * | ring | ) |
Write an element onto the ring.
| [in] | ring | Pointer to the ring instance. |
Definition at line 92 of file co_ring.h.
References ASSERT_ERR, co_ring::free_idx, co_ring::max_count, and co_ring::used_count.
1.6.1