pub unsafe extern "C" fn furi_stream_buffer_receive(
    stream_buffer: *mut c_void,
    data: *mut c_void,
    length: usize,
    timeout: u32
) -> usize
Expand description

@brief Receives bytes from a stream buffer. Wakes up task waiting for space to become available if called from ISR.

@param stream_buffer The stream buffer instance. @param data A pointer to the buffer into which the received bytes will be copied. @param length The length of the buffer pointed to by the data parameter. @param timeout The maximum amount of time the task should remain in the Blocked state to wait for data to become available if the stream buffer is empty. Will return immediately if timeout is zero. Setting timeout to FuriWaitForever will cause the task to wait indefinitely. Ignored if called from ISR. @return The number of bytes read from the stream buffer, if any.