Flipper Zero Firmware
Loading...
Searching...
No Matches
message_queue.h File Reference

FuriMessageQueue. More...

#include "base.h"

Go to the source code of this file.

Typedefs

typedef struct FuriMessageQueue FuriMessageQueue
 

Functions

FuriMessageQueuefuri_message_queue_alloc (uint32_t msg_count, uint32_t msg_size)
 Allocate furi message queue.
 
void furi_message_queue_free (FuriMessageQueue *instance)
 Free queue.
 
FuriStatus furi_message_queue_put (FuriMessageQueue *instance, const void *msg_ptr, uint32_t timeout)
 Put message into queue.
 
FuriStatus furi_message_queue_get (FuriMessageQueue *instance, void *msg_ptr, uint32_t timeout)
 Get message from queue.
 
uint32_t furi_message_queue_get_capacity (FuriMessageQueue *instance)
 Get queue capacity.
 
uint32_t furi_message_queue_get_message_size (FuriMessageQueue *instance)
 Get message size.
 
uint32_t furi_message_queue_get_count (FuriMessageQueue *instance)
 Get message count in queue.
 
uint32_t furi_message_queue_get_space (FuriMessageQueue *instance)
 Get queue available space.
 
FuriStatus furi_message_queue_reset (FuriMessageQueue *instance)
 Reset queue.
 

Detailed Description

FuriMessageQueue.

Function Documentation

◆ furi_message_queue_alloc()

FuriMessageQueue * furi_message_queue_alloc ( uint32_t msg_count,
uint32_t msg_size )

Allocate furi message queue.

Parameters
[in]msg_countThe message count
[in]msg_sizeThe message size
Returns
pointer to FuriMessageQueue instance

◆ furi_message_queue_free()

void furi_message_queue_free ( FuriMessageQueue * instance)

Free queue.

Parameters
instancepointer to FuriMessageQueue instance

◆ furi_message_queue_get()

FuriStatus furi_message_queue_get ( FuriMessageQueue * instance,
void * msg_ptr,
uint32_t timeout )

Get message from queue.

Parameters
instancepointer to FuriMessageQueue instance
msg_ptrThe message pointer
[in]timeoutThe timeout
Returns
The furi status.

◆ furi_message_queue_get_capacity()

uint32_t furi_message_queue_get_capacity ( FuriMessageQueue * instance)

Get queue capacity.

Parameters
instancepointer to FuriMessageQueue instance
Returns
capacity in object count

◆ furi_message_queue_get_count()

uint32_t furi_message_queue_get_count ( FuriMessageQueue * instance)

Get message count in queue.

Parameters
instancepointer to FuriMessageQueue instance
Returns
Message count

◆ furi_message_queue_get_message_size()

uint32_t furi_message_queue_get_message_size ( FuriMessageQueue * instance)

Get message size.

Parameters
instancepointer to FuriMessageQueue instance
Returns
Message size in bytes

◆ furi_message_queue_get_space()

uint32_t furi_message_queue_get_space ( FuriMessageQueue * instance)

Get queue available space.

Parameters
instancepointer to FuriMessageQueue instance
Returns
Message count

◆ furi_message_queue_put()

FuriStatus furi_message_queue_put ( FuriMessageQueue * instance,
const void * msg_ptr,
uint32_t timeout )

Put message into queue.

Parameters
instancepointer to FuriMessageQueue instance
[in]msg_ptrThe message pointer
[in]timeoutThe timeout
Returns
The furi status.

◆ furi_message_queue_reset()

FuriStatus furi_message_queue_reset ( FuriMessageQueue * instance)

Reset queue.

Parameters
instancepointer to FuriMessageQueue instance
Returns
The furi status.