monoZ docs
Mailbox

-For mail Box related APIs refer MZ_sys_cmsis_os2.h file. More...

Functions

uint8_t mz_mailbox_create (mz_mailbox_t *c, size_t no_of_mail, size_t mail_size)
 This function is used to create and initialize the message queue object Create and initialize a message queue object. More...
 
uint8_t mz_mailbox_delete (mz_mailbox_t *c)
 This function is used to delete the message queue object Delete message queue object. More...
 
mz_error_t mz_mailbox_put (mz_mailbox_t *c, void *m)
 This function is used to put a message into the queue or timeout if queue is full Put a message into a queue or timeout if queue is full. More...
 
mz_error_t mz_mailbox_get (mz_mailbox_t *c, void *m, uint32_t timeout)
 This function is used to put a message into the queue or timeout if queue is full Get a message from a queue or timeout if queue is empty. More...
 
mz_error_t mz_mailbox_putnow (mz_mailbox_t *c, void *m)
 This function is used to put a message now into the queue or timeout if queue is full Put a message into a queue or timeout if queue is full. More...
 
mz_error_t mz_mailbox_getnow (mz_mailbox_t *c, void *m)
 This function is used to get the message now from the queue or timeout if queue is empty Get a message from a queue or timeout if queue is empty. More...
 
uint8_t mz_mailbox_isvalid (mz_mailbox_t *c)
 This function is used to check the message queue object validity Check the message queue object validation. More...
 
uint8_t mz_mailbox_invalid (mz_mailbox_t *c)
 This function is used to check the message queue object validity Message queue object is invalid. More...
 

Detailed Description

-For mail Box related APIs refer MZ_sys_cmsis_os2.h file.

Function Documentation

◆ mz_mailbox_create()

uint8_t mz_mailbox_create ( mz_mailbox_t c,
size_t  no_of_mail,
size_t  mail_size 
)

This function is used to create and initialize the message queue object Create and initialize a message queue object.

Parameters
cmz_mailbox_t
no_of_mailsize_t
mail_sizesize_t
Returns
message queue ID for reference by other functions or NULL in case of error.

◆ mz_mailbox_delete()

uint8_t mz_mailbox_delete ( mz_mailbox_t c)

This function is used to delete the message queue object Delete message queue object.

Parameters
cmz_mailbox_t
Returns
message queue ID for reference by other functions or NULL in case of error.

◆ mz_mailbox_put()

mz_error_t mz_mailbox_put ( mz_mailbox_t c,
void *  m 
)

This function is used to put a message into the queue or timeout if queue is full Put a message into a queue or timeout if queue is full.

`osWaitForever' is set

Parameters
cmz_mailbox_t
mvoid
Returns
status code that indicates the execution status of the function.
Note
Error handler for Message Queue Related Abstarction

◆ mz_mailbox_get()

mz_error_t mz_mailbox_get ( mz_mailbox_t c,
void *  m,
uint32_t  timeout 
)

This function is used to put a message into the queue or timeout if queue is full Get a message from a queue or timeout if queue is empty.

Parameters
cmz_mailbox_t
mvoid
timeoutuint32_t
Returns
status code that indicates the execution status of the function.
Note
Error handler for Message Queue Related Abstarction

◆ mz_mailbox_putnow()

mz_error_t mz_mailbox_putnow ( mz_mailbox_t c,
void *  m 
)

This function is used to put a message now into the queue or timeout if queue is full Put a message into a queue or timeout if queue is full.

`timeout' is set to 0.

Parameters
cmz_mailbox_t
mvoid
Returns
status code that indicates the execution status of the function.
Note
Error handler for Message Queue Related Abstarction

◆ mz_mailbox_getnow()

mz_error_t mz_mailbox_getnow ( mz_mailbox_t c,
void *  m 
)

This function is used to get the message now from the queue or timeout if queue is empty Get a message from a queue or timeout if queue is empty.

Parameters
cmz_mailbox_t
mvoid
Returns
status code that indicates the execution status of the function.
Note
Error handler for Message Queue Related Abstarction

◆ mz_mailbox_isvalid()

uint8_t mz_mailbox_isvalid ( mz_mailbox_t c)

This function is used to check the message queue object validity Check the message queue object validation.

Parameters
cmz_mailbox_t
Returns
status code that indicates the execution status of the function.

◆ mz_mailbox_invalid()

uint8_t mz_mailbox_invalid ( mz_mailbox_t c)

This function is used to check the message queue object validity Message queue object is invalid.

Parameters
cmz_mailbox_t
Returns
1