Flipper Zero Firmware
Loading...
Searching...
No Matches
stream_buffer.h
Go to the documentation of this file.
1
14#pragma once
15
16#include "base.h"
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
23
35FuriStreamBuffer* furi_stream_buffer_alloc(size_t size, size_t trigger_level);
36
42void furi_stream_buffer_free(FuriStreamBuffer* stream_buffer);
43
55bool furi_stream_set_trigger_level(FuriStreamBuffer* stream_buffer, size_t trigger_level);
56
72 FuriStreamBuffer* stream_buffer,
73 const void* data,
74 size_t length,
75 uint32_t timeout);
76
93 FuriStreamBuffer* stream_buffer,
94 void* data,
95 size_t length,
96 uint32_t timeout);
97
108
119
128
137
148FuriStatus furi_stream_buffer_reset(FuriStreamBuffer* stream_buffer);
149
150#ifdef __cplusplus
151}
152#endif
FuriStatus furi_stream_buffer_reset(FuriStreamBuffer *stream_buffer)
Resets a stream buffer to its initial, empty, state.
Definition stream_buffer.c:112
size_t furi_stream_buffer_bytes_available(FuriStreamBuffer *stream_buffer)
Queries a stream buffer to see how much data it contains, which is equal to the number of bytes that ...
Definition stream_buffer.c:88
FuriStreamBuffer * furi_stream_buffer_alloc(size_t size, size_t trigger_level)
Allocate stream buffer instance.
Definition stream_buffer.c:19
size_t furi_stream_buffer_spaces_available(FuriStreamBuffer *stream_buffer)
Queries a stream buffer to see how much free space it contains, which is equal to the amount of data ...
Definition stream_buffer.c:94
bool furi_stream_buffer_is_empty(FuriStreamBuffer *stream_buffer)
Queries a stream buffer to see if it is empty.
Definition stream_buffer.c:106
bool furi_stream_set_trigger_level(FuriStreamBuffer *stream_buffer, size_t trigger_level)
Set trigger level for stream buffer.
Definition stream_buffer.c:41
size_t furi_stream_buffer_receive(FuriStreamBuffer *stream_buffer, void *data, size_t length, uint32_t timeout)
Receives bytes from a stream buffer.
Definition stream_buffer.c:67
bool furi_stream_buffer_is_full(FuriStreamBuffer *stream_buffer)
Queries a stream buffer to see if it is full.
Definition stream_buffer.c:100
size_t furi_stream_buffer_send(FuriStreamBuffer *stream_buffer, const void *data, size_t length, uint32_t timeout)
Sends bytes to a stream buffer.
Definition stream_buffer.c:47
void furi_stream_buffer_free(FuriStreamBuffer *stream_buffer)
Free stream buffer instance.
Definition stream_buffer.c:34
Definition stream_buffer.c:9