|
SmartSnippets DA1459x SDK
|
Go to the documentation of this file.
52 typedef void *(*MSG_ALLOC)(size_t);
61 #ifndef MSG_QUEUE_MALLOC
62 #define MSG_QUEUE_MALLOC OS_MALLOC_FUNC
72 #ifndef MSG_QUEUE_FREE
73 #define MSG_QUEUE_FREE OS_FREE_FUNC
98 #if CONFIG_MSG_QUEUE_USE_ALLOCATORS
107 #define DEFAULT_OS_ALLOCATOR (&default_os_allocator)
112 #define DEFAULT_OS_ALLOCATOR NULL
126 #if CONFIG_MSG_QUEUE_USE_ALLOCATORS
369 OS_TICK_TIME timeout);
MSG_FREE content_free
Definition: msg_queues.h:95
uint16_t MSG_ID
Definition: msg_queues.h:47
OS_QUEUE queue
Definition: msg_queues.h:125
struct msg msg
Structure for messages with id, type, data.
void msg_init(msg *msg, MSG_ID id, MSG_TYPE type, void *buf, MSG_SIZE size, MSG_FREE free_cb)
Prepare message with freeing callback.
int msg_queue_put(msg_queue *queue, msg *msg, OS_TICK_TIME timeout)
Put message in queue.
uint16_t MSG_TYPE
Definition: msg_queues.h:48
OS abstraction layer API.
Message queue structure.
Definition: msg_queues.h:124
int msg_queue_send(msg_queue *queue, MSG_ID id, MSG_TYPE type, void *buf, MSG_SIZE size, OS_TICK_TIME timeout)
Send data to queue.
uint16_t MSG_SIZE
Definition: msg_queues.h:46
void(* MSG_FREE)(void *)
Definition: msg_queues.h:50
MSG_ID id
Definition: msg_queues.h:145
struct content_allocator content_allocator
Message queue content allocator.
int msg_queue_init_msg(msg_queue *queue, msg *msg, MSG_ID id, MSG_TYPE type, MSG_SIZE size)
Initialize message with queue specific freeing callback.
MSG_FREE free_cb
Definition: msg_queues.h:149
int msg_queue_get(msg_queue *queue, msg *msg, OS_TICK_TIME timeout)
Get message from queue.
MSG_TYPE type
Definition: msg_queues.h:146
void msg_queue_create(msg_queue *queue, int queue_size, content_allocator *allocator)
Create message queue.
uint8_t * data
Definition: msg_queues.h:148
Message queue content allocator.
Definition: msg_queues.h:93
struct msq_queue msg_queue
Message queue structure.
void msg_release(msg *msg)
Release message data.
MSG_ALLOC content_alloc
Definition: msg_queues.h:94
int msq_queue_send_zero_copy(msg_queue *queue, MSG_ID id, MSG_TYPE type, void *buf, MSG_SIZE size, OS_TICK_TIME timeout, MSG_FREE free_cb)
Send data to queue with zero copy.
void *(* MSG_ALLOC)(size_t)
Definition: msg_queues.h:52
void msg_queue_delete(msg_queue *queue)
Delete message queue.
Structure for messages with id, type, data.
Definition: msg_queues.h:144
MSG_SIZE size
Definition: msg_queues.h:147