pub unsafe extern "C" fn xRingbufferReceiveUpTo(
    xRingbuffer: *mut c_void,
    pxItemSize: *mut usize,
    xTicksToWait: u32,
    xMaxSize: usize
) -> *mut c_void
Expand description

@brief Retrieve bytes from a byte buffer, specifying the maximum amount of bytes to retrieve

Attempt to retrieve data from a byte buffer whilst specifying a maximum number of bytes to retrieve. This function will block until there is data available for retrieval or until it times out.

@param[in] xRingbuffer Ring buffer to retrieve the item from @param[out] pxItemSize Pointer to a variable to which the size of the retrieved item will be written. @param[in] xTicksToWait Ticks to wait for items in the ring buffer. @param[in] xMaxSize Maximum number of bytes to return.

@note A call to vRingbufferReturnItem() is required after this to free up the data retrieved. @note This function should only be called on byte buffers @note Byte buffers do not allow multiple retrievals before returning an item @note Two calls to RingbufferReceiveUpTo() are required if the bytes wrap around the end of the ring buffer.

@return - Pointer to the retrieved item on success; *pxItemSize filled with the length of the item. - NULL on timeout, *pxItemSize is untouched in that case.