Document API IEC60730 Library
|
Power On Self Test - Executed once during power up. More...
Classes | |
struct | sl_iec60730_library_version_t |
Macros | |
#define | UNUSED_VAR(x) (void) (x) |
#define | __CONCAT(x, y) x##y |
Macro merge separate words to be joined into a single word. | |
#define | CONCAT(x, y) __CONCAT(x, y) |
#define | STR(x) #x |
Macro convert to string. | |
#define | XSTR(x) STR(x) |
#define | LABEL_DEF(NAME) LB_ASM volatile(LB_XSTR(NAME)) |
#define | __no_init |
#define | DEC_CLASSB_VARS(vartype, name) |
#define | EXTERN_DEC_CLASSB_VARS(vartype, name) |
#define | sl_static_dec_classb_vars(vartype, name) |
#define | INV_CLASSB_VAR(vartype, name) CONCAT(name, _inv) = (vartype) (~(vartype) name) |
#define | INV_CLASSB_PVAR(vartype, name) CONCAT(name, _inv) = (vartype *) (~(vartype) name) |
#define | CHECK_INTEGRITY(vartype, x) ((vartype) - 1 == ((vartype) x ^ (vartype) CONCAT(x, _inv))) |
Functions | |
void | sl_iec60730_post (void) |
Variables | |
const sl_iec60730_library_version_t | SL_IEC60730_LIBRARY_VERSION |
Global variable which holds the IEC60370 library version. | |
Power On Self Test - Executed once during power up.
sl_iec60730_post() validates system health before starting execution of the main loop. It must be called first in the main() function. If the result of a test routine is a failure, sl_iec60730_safe_state() is called.
#define __no_init |
The __no_init macro is used for compatibility between GCC and IAR compiler.
#define CHECK_INTEGRITY | ( | vartype, | |
x | |||
) | ((vartype) - 1 == ((vartype) x ^ (vartype) CONCAT(x, _inv))) |
The CHECK_INTEGRITY definition used for checking integrity of pair of variables stored in *.classb_ram* section.
#define DEC_CLASSB_VARS | ( | vartype, | |
name | |||
) |
The DEC_CLASSB_VARS definition is used for declaring pair of classsb_ram variables.
#define EXTERN_DEC_CLASSB_VARS | ( | vartype, | |
name | |||
) |
The EXTERN_DEC_CLASSB_VARS definition is extern of pair of DEC_CLASSB_VARS
#define INV_CLASSB_PVAR | ( | vartype, | |
name | |||
) | CONCAT(name, _inv) = (vartype *) (~(vartype) name) |
The INV_CLASSB_PVAR macro is used to inverse a Inv value of pointer pair DEC_CLASSB_VARS
#define INV_CLASSB_VAR | ( | vartype, | |
name | |||
) | CONCAT(name, _inv) = (vartype) (~(vartype) name) |
The INV_CLASSB_VAR macro is used to inverse a Inv value of pair DEC_CLASSB_VARS
The LABEL_DEF macro is used to generate label for break points. Using this macro avoids label removal by the compiler's optimize levels.
#define sl_static_dec_classb_vars | ( | vartype, | |
name | |||
) |
The sl_static_dec_classb_vars definition used for declaring static pair DEC_CLASSB_VARS
#define UNUSED_VAR | ( | x | ) | (void) (x) |
Useful macro for avoiding compiler warnings related to unused function arguments or unused variables.
Cause of failure passed to Safe State function.
void sl_iec60730_post | ( | void | ) |
public IEC60730 Power On Self Test
Each module is tested to validate system health before starting the execution of the main loop, and if a failure is detected sl_iec60730_safe_state() is called.