MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_ringbuffer_reset

Function rt_ringbuffer_reset

components/drivers/ipc/ringbuffer.c:405–413  ·  view source on GitHub ↗

* @brief Reset the ring buffer object, and clear all contents in the buffer. * * @param rb A pointer to the ring buffer object. */

Source from the content-addressed store, hash-verified

403 * @param rb A pointer to the ring buffer object.
404 */
405void rt_ringbuffer_reset(struct rt_ringbuffer *rb)
406{
407 RT_ASSERT(rb != RT_NULL);
408
409 rb->read_mirror = 0;
410 rb->read_index = 0;
411 rb->write_mirror = 0;
412 rb->write_index = 0;
413}
414RTM_EXPORT(rt_ringbuffer_reset);
415
416#ifdef RT_USING_HEAP

Callers 3

_serial_rx_flushFunction · 0.85
rt_inputcapture_controlFunction · 0.85
hpm_uart_controlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected