172size_t pipe_send(
PipeSide* pipe,
const void* data,
size_t length, FuriWait timeout);
FuriEventLoopEvent
Enumeration of event types, flags and masks.
Definition event_loop.h:35
void pipe_set_data_arrived_callback(PipeSide *pipe, PipeSideDataArrivedCallback callback, FuriEventLoopEvent event)
Sets the callback for when data arrives.
Definition pipe.c:186
size_t pipe_receive(PipeSide *pipe, void *data, size_t length, FuriWait timeout)
Receives data from the pipe.
Definition pipe.c:121
PipeSideBundle pipe_alloc_ex(PipeSideReceiveSettings alice, PipeSideReceiveSettings bob)
Allocates two connected sides of one pipe.
Definition pipe.c:36
PipeRole
The role of a pipe side.
Definition pipe.h:27
PipeSideBundle pipe_alloc(size_t capacity, size_t trigger_level)
Allocates two connected sides of one pipe.
Definition pipe.c:28
void pipe_attach_to_event_loop(PipeSide *pipe, FuriEventLoop *event_loop)
Attaches a PipeSide to a FuriEventLoop, allowing to attach callbacks to the PipeSide.
Definition pipe.c:162
PipeRole pipe_role(PipeSide *pipe)
Gets the role of a pipe side.
Definition pipe.c:66
PipeState
The state of a pipe.
Definition pipe.h:45
void(* PipeSideBrokenCallback)(PipeSide *pipe, void *context)
Callback for when the opposite PipeSide is freed, making the pipe broken.
Definition pipe.h:231
void pipe_set_space_freed_callback(PipeSide *pipe, PipeSideSpaceFreedCallback callback, FuriEventLoopEvent event)
Sets the callback for when data is read out of the opposite PipeSide.
Definition pipe.c:205
void pipe_install_as_stdio(PipeSide *pipe)
Connects the pipe to the stdin and stdout of the current thread.
Definition pipe.c:115
void(* PipeSideSpaceFreedCallback)(PipeSide *pipe, void *context)
Callback for when data is read out of the opposite PipeSide.
Definition pipe.h:222
size_t pipe_spaces_available(PipeSide *pipe)
Determines how many space there is in the pipe for data to be written into.
Definition pipe.c:136
void pipe_detach_from_event_loop(PipeSide *pipe)
Detaches a PipeSide from the FuriEventLoop that it was previously attached to.
Definition pipe.c:170
PipeState pipe_state(PipeSide *pipe)
Gets the state of a pipe.
Definition pipe.c:71
size_t pipe_bytes_available(PipeSide *pipe)
Determines how many bytes there are in the pipe available to be read.
Definition pipe.c:131
void pipe_set_callback_context(PipeSide *pipe, void *context)
Sets the custom context for all callbacks.
Definition pipe.c:181
void pipe_set_broken_callback(PipeSide *pipe, PipeSideBrokenCallback callback, FuriEventLoopEvent event)
Sets the callback for when the opposite PipeSide is freed, making the pipe broken.
Definition pipe.c:224
size_t pipe_send(PipeSide *pipe, const void *data, size_t length, FuriWait timeout)
Sends data into the pipe.
Definition pipe.c:126
void pipe_free(PipeSide *pipe)
Frees a side of a pipe.
Definition pipe.c:77
void(* PipeSideDataArrivedCallback)(PipeSide *pipe, void *context)
Callback for when data arrives to a PipeSide.
Definition pipe.h:214
Definition event_loop_i.h:78
There are two PipeSides per pipe.
Definition pipe.c:15