13#include "FreeRTOSConfig.h"
21#ifndef MZ_SYS_CMSIS_OS2_H_
22#define MZ_SYS_CMSIS_OS2_H_
27#define CMSISOS2_INFINITE32 (0xFFFFFFFF)
29#define SEMA_TIMEOUT (CMSISOS2_INFINITE32)
31#define MAILBOX_TIMEOUT (CMSISOS2_INFINITE32)
33#define DEFAULT_STACK_SIZE (256)
_mz_fp mz_fn
1 Byte data type
mz_error_t
Enumeration of monoZ Error Flags.
osSemaphoreId_t mz_semaphore_t
mz_semaphore_t variable of type osSemaphoreId_t
osMessageQueueId_t mz_mailbox_t
mz_mailbox_t variable of type osMessageQueueId_t
TimerCallbackFunction_t mz_timer_fp
mz_timer_fp variable of type TimerCallbackFunction_t
osThreadId_t mz_thread_t
mz_thread_t variable of type osThreadId_t
osMutexId_t mz_mutex_t
mz_mutex_t variable of type osMutexId_t
TimerHandle_t mz_timer_t
mz_timer_t variable of type TimerHandle_t
osPriority_t mz_thread_prio_t
mz_thread_prio_t variable of type osPriority_t
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.
uint8_t mz_mailbox_delete(mz_mailbox_t *c)
This function is used to delete the message queue object Delete message queue object.
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 messa...
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 ...
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 i...
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 ...
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 valid...
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 messag...
void * mz_malloc(size_t size)
This function is used to allocate and map the required memory.
void mz_free(void *_ptr)
This function is used to free the mapped memory Map to the memory management routines required for th...
uint8_t mz_mutex_create(mz_mutex_t *c)
This function is used to create and initialize the mutex object Create and Initialize a Mutex object.
uint8_t mz_mutex_unlock(mz_mutex_t *c)
This function is used to release the mutex Release a Mutex that was acquired by.
uint8_t mz_mutex_delete(mz_mutex_t *c)
This function is used to delete the mutex object Delete a Mutex object.
uint8_t mz_mutex_isvalid(mz_mutex_t *c)
This function is used to check the mutex object validity Check the Mutex Object Validation.
uint8_t mz_mutex_lock(mz_mutex_t *c)
This function is used to acquire the mutex or timeout if it is locked Acquire a Mutex or timeout if i...
uint8_t mz_mutex_invalid(mz_mutex_t *c)
This function is used to invalidate the created mutex object Mutex Object created is invalid.
uint8_t mz_sem_isvalid(mz_semaphore_t *c)
This functiion is used to check the semaphore object validity Check the Semaphore object validation.
uint32_t mz_sem_wait(mz_semaphore_t *c, uint32_t timeout)
This function is used to acquire a semaphore token or timout if no tokens are available Acquire a Sem...
uint8_t mz_sem_create(mz_semaphore_t *c, uint8_t cnt, uint8_t init)
This function is used to create and initialize the semaphore object Create and Initialize a Semaphore...
uint8_t mz_sem_invalid(mz_semaphore_t *c)
This function is used to invalidate the created semaphore Semaphore object is invalid.
uint8_t mz_sem_delete(mz_semaphore_t *c)
This function is used to delete a semaphore object Delete a Semaphore object.
uint8_t mz_sem_release(mz_semaphore_t *c)
This function is used to acquire a semaphore token or timout if no tokens are available Release a Sem...
uint32_t mz_sys_now(void)
This function returns the RTOS system timer count as 32 bit value.
uint8_t mz_thread_terminate(mz_thread_t *t)
This function is used to terminate the execution of thread Terminate the execution of thread.
uint8_t mz_thread_create(mz_thread_t *t, const char *name, mz_fn thread_func, void *const arg, mz_thread_prio_t prio, StackType_t *stack_mem, size_t stack_size, StaticTask_t *cb_mem, uint32_t cb_size)
This function is used to check the message queue object validity Create a thread and add it to Active...
uint8_t mz_thread_yield(void)
This function is used to pass control to the next thread that is in ready state.