Common Core API#
Common_ConfigureLogging()#
Description#
Configure the properties of the logging module.
Files#
common.h/common.c
Prototype#
void Common_ConfigureLogging (COMMON_CFG_LOGGING *p_cfg)
Arguments#
p_cfg
Pointer to the structure containing the new logging parameters.
Returned Value#
None.
Notes / Warnings#
This function is optional. If it is called, it must be called before
Common_Init()
. If it is not called, default values will be used to initialize the module.
Common_ConfigureMemSegLogging()#
Description#
Configure the memory segment that will be used to allocate internal data needed by the logging module instead of the default memory segment.
Files#
common.h/common.c
Prototype#
void Common_ConfigureMemSegLogging (MEM_SEG *p_mem_seg)
Arguments#
p_mem_seg
Pointer to the memory segment from which the internal data will be allocated. If DEF_NULL
, the internal data will be allocated from the global Heap.
Returned Value#
None.
Notes / Warnings#
This function is optional. If it is called, it must be called before
Common_Init()
. If it is not called, default values will be used to initialize the module.
Common_ConfigureMemSeg()#
Description#
Configure the memory segment that will be used to allocate internal data needed by Common modules instead of the default memory segment.
Files#
common.h/common.c
Prototype#
void Common_ConfigureMemSeg (MEM_SEG *p_mem_seg)
Arguments#
p_mem_seg
Pointer to the memory segment from which the internal data will be allocated. If DEF_NULL
, the internal data will be allocated from the global Heap.
Returned Value#
None.
Notes / Warnings#
This function is optional. If it is called, it must be called before
Common_Init()
. If it is not called, default values will be used to initialize the module.
Common_Init()#
Description#
Initializes all the common modules (Lib Mem, Lib Math, Logging, platform manager) in the correct order with the specified configurations.
Files#
common.h/common.c
Prototype#
void Common_Init (RTOS_ERR *p_err)
Arguments#
p_err
Pointer to the variable that will receive one of the following error code(s) from this function:
RTOS_ERR_NONE
RTOS_ERR_BLK_ALLOC_CALLBACK
RTOS_ERR_SEG_OVF
Returned Value#
None.
Notes / Warnings#
The functions
Common_Configure...()
can be used to configure more specific properties of the Common module, whenRTOS_CFG_EXTERNALIZE_OPTIONAL_CFG_EN
is set toDEF_DISABLED
. If set toDEF_ENABLED
, the structureCommon_InitCfg
needs to be declared and filled by the application to configure these specific properties for the module.