RTOS_ERR API#
RTOS_ERR_CODE_GET()#
Description#
Obtains the error code from an error variable, no matter how RTOS_ERR_CFG_LEGACY_EN is configured.
Files#
lib_mem.h/lib_mem.c
Prototype#
RTOS_ERR_CODE_GET (err_var)
Arguments#
err_var
Error variable from which to obtain error code.
Returned Value#
Error code in passed variable.
Notes / Warnings#
None.
RTOS_ERR_STR_GET()#
Description#
Obtains the description string from an error code. Will return a string saying strings are unavailable if RTOS_ERR_CFG_STR_EN is set to DEF_DISABLED.
Files#
lib_mem.h/lib_mem.c
Prototype#
RTOS_ERR_STR_GET (err_code)
Arguments#
err_code
Error code for which to obtain the string.
Returned Value#
The requested error description string.
Notes / Warnings#
None.
RTOS_ERR_DESC_STR_GET()#
Description#
Obtains the error string from an error code. Will return a string saying strings are unavailable if RTOS_ERR_CFG_STR_EN is set to DEF_DISABLED.
Files#
lib_mem.h/lib_mem.c
Prototype#
RTOS_ERR_DESC_STR_GET (err_code)
Arguments#
err_code
Error code for which to obtain the string.
Returned Value#
The requested error string.
Notes / Warnings#
None.
RTOS_ERR_SET()#
Description#
Sets a given error variable to an error value. Also sets the extended error, if enabled.
Files#
lib_mem.h/lib_mem.c
Prototype#
RTOS_ERR_SET(err_var, err_code)
Arguments#
err_var
Error variable to set to 'err'.
err_code
Error value to which to set 'err_var'.
Returned Value#
None.
Notes / Warnings#
None.
RTOS_ERR_COPY()#
Description#
Copies every field of an error variable to another one.
Files#
lib_mem.h/lib_mem.c
Prototype#
RTOS_ERR_COPY (err_dst, err_src)
Arguments#
err_dst
Destination error variable.
err_src
Source error variable.
Returned Value#
None.
Notes / Warnings#
This wrapper is present if other fields require particular manipulations to copy, even if a simple assignation could have been enough for the moment.