Function esp_idf_svc::sys::xRingbufferSendFromISR

source ยท
pub unsafe extern "C" fn xRingbufferSendFromISR(
    xRingbuffer: *mut c_void,
    pvItem: *const c_void,
    xItemSize: usize,
    pxHigherPriorityTaskWoken: *mut i32,
) -> i32
Expand description

@brief Insert an item into the ring buffer in an ISR

Attempt to insert an item into the ring buffer from an ISR. This function will return immediately if there is insufficient free space in the buffer.

@param[in] xRingbuffer Ring buffer to insert the item into @param[in] pvItem Pointer to data to insert. NULL is allowed if xItemSize is 0. @param[in] xItemSize Size of data to insert. @param[out] pxHigherPriorityTaskWoken Value pointed to will be set to pdTRUE if the function woke up a higher priority task.

@note For no-split/allow-split ring buffers, the actual size of memory that the item will occupy will be rounded up to the nearest 32-bit aligned size. This is done to ensure all items are always stored in 32-bit aligned fashion. @note For no-split/allow-split buffers, an xItemSize of 0 will result in an item with no data being set (i.e., item only contains the header). For byte buffers, an xItemSize of 0 will simply return pdTRUE without copying any data.

@return - pdTRUE if succeeded - pdFALSE when the ring buffer does not have space.