| 16 | #include <string.h> |
| 17 | |
| 18 | rt_inline enum rt_ringbuffer_state rt_ringbuffer_status(struct rt_ringbuffer *rb) |
| 19 | { |
| 20 | if (rb->read_index == rb->write_index) |
| 21 | { |
| 22 | if (rb->read_mirror == rb->write_mirror) |
| 23 | return RT_RINGBUFFER_EMPTY; |
| 24 | else |
| 25 | return RT_RINGBUFFER_FULL; |
| 26 | } |
| 27 | return RT_RINGBUFFER_HALFFULL; |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * @brief Initialize the ring buffer object. |
no outgoing calls
no test coverage detected