Function riot_sys::ringbuffer_add

source ·
pub unsafe extern "C" fn ringbuffer_add(
    rb: *mut ringbuffer_t,
    buf: *const c_char,
    n: c_uint
) -> c_uint
Expand description

@brief Add a number of elements to the ringbuffer. @details Only so many elements are added as fit in the ringbuffer. No elements get overwritten. If this is not the intended behavior, then use ringbuffer_add_one() in a loop instead. @param[in,out] rb Ringbuffer to operate on. @param[in] buf Buffer to add elements from. @param[in] n Maximum number of elements to add. @returns Number of elements actually added. 0 if rb is full.