Ring buffer functions.
More...
Go to the source code of this file.
Detailed Description
Ring buffer functions.
- Author:
- Satofumi KAMIMURA
- Id:
- urg_ring_buffer.h,v c5747add6615 2015/05/07 03:18:34 alexandr
Function Documentation
Returns the maximum number of elements of the ring buffer.
- Parameters:
-
[in] | ring | Pointer to the ring buffer data structure |
Clears the ring buffer.
- Parameters:
-
[in] | ring | Pointer to the ring buffer data structure |
Initialization.
- Parameters:
-
[in] | ring | Pointer to the ring buffer data structure |
[in] | buffer | Actual buffer to use |
[in] | shift_length | Buffer size as multiple of 2 |
Extracts data from the ring buffer.
- Parameters:
-
[in] | ring | Pointer to the ring buffer data structure |
[out] | buffer | Buffer to hold the extracted data |
[in] | size | Maximum size of the buffer |
- Returns:
- The number of elements read from the ring buffer
Returns the number of elements on the buffer.
- Parameters:
-
[in] | ring | Pointer to the ring buffer data structure |
Stores data on the ring buffer.
- Parameters:
-
[in] | ring | Pointer to the ring buffer data structure |
[in] | data | Data to store |
[in] | size | Number of elements to store |
- Returns:
- The number of elements written to the ring buffer