CO_RINGARRAY
[COMMON]

Ring buffer management. More...

Collaboration diagram for CO_RINGARRAY:

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.

Detailed Description

Ring buffer management.

This module contains the ring buffer structure definition and its member function proto-types.


Function Documentation

__INLINE bool co_ring_empty ( struct co_ring ring  ) 

Check if the ring is empty.

Parameters:
[in] ring Pointer to the ring instance.
Returns:
true is the ring is empty, false otherwise.

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.

Parameters:
[in] ring Pointer to the ring instance.
Returns:
true is the ring is full, false otherwise.

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.

Parameters:
[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.

Parameters:
[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.

Parameters:
[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.


Generated on 14 Jan 2020 for Ceva-RW WLAN FullMAC SW documentation by  doxygen 1.6.1