Function esp_idf_hal::sys::xRingbufferReceiveSplit
source ยท pub unsafe extern "C" fn xRingbufferReceiveSplit(
xRingbuffer: *mut c_void,
ppvHeadItem: *mut *mut c_void,
ppvTailItem: *mut *mut c_void,
pxHeadItemSize: *mut usize,
pxTailItemSize: *mut usize,
xTicksToWait: u32,
) -> i32
Expand description
@brief Retrieve a split item from an allow-split ring buffer
Attempt to retrieve a split item from an allow-split ring buffer. If the item is not split, only a single item is retried. If the item is split, both parts will be retrieved. This function will block until an item is available or until it times out.
@param[in] xRingbuffer Ring buffer to retrieve the item from @param[out] ppvHeadItem Double pointer to first part (set to NULL if no items were retrieved) @param[out] ppvTailItem Double pointer to second part (set to NULL if item is not split) @param[out] pxHeadItemSize Pointer to size of first part (unmodified if no items were retrieved) @param[out] pxTailItemSize Pointer to size of second part (unmodified if item is not split) @param[in] xTicksToWait Ticks to wait for items in the ring buffer.
@note Call(s) to vRingbufferReturnItem() is required after this to free up the item(s) retrieved. @note This function should only be called on allow-split buffers @note It is possible to receive items with a pxItemSize of 0 on allow split buffers.
@return - pdTRUE if an item (split or unsplit) was retrieved - pdFALSE when no item was retrieved