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:136
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:112
FuriStreamBuffer * furi_stream_buffer_alloc(size_t size, size_t trigger_level)
Allocate stream buffer instance.
Definition stream_buffer.c:25
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:118
bool furi_stream_buffer_is_empty(FuriStreamBuffer *stream_buffer)
Queries a stream buffer to see if it is empty.
Definition stream_buffer.c:130
bool furi_stream_set_trigger_level(FuriStreamBuffer *stream_buffer, size_t trigger_level)
Set trigger level for stream buffer.
Definition stream_buffer.c:51
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:87
bool furi_stream_buffer_is_full(FuriStreamBuffer *stream_buffer)
Queries a stream buffer to see if it is full.
Definition stream_buffer.c:124
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:57
void furi_stream_buffer_free(FuriStreamBuffer *stream_buffer)
Free stream buffer instance.
Definition stream_buffer.c:40
Definition stream_buffer.c:14