pub unsafe extern "C" fn furi_stream_buffer_alloc(
size: usize,
trigger_level: usize,
) -> *mut FuriStreamBufferExpand description
Allocate stream buffer instance. Stream buffer implementation assumes there is only one task or interrupt that will write to the buffer (the writer), and only one task or interrupt that will read from the buffer (the reader).
§Arguments
size- The total number of bytes the stream buffer will be able to hold at any one time.trigger_level- The number of bytes that must be in the stream buffer before a task that is blocked on the stream buffer to wait for data is moved out of the blocked state.
§Returns
The stream buffer instance.