ASSERT - Assert#

Assert/error checking module.

By default, library assert usage is not included to reduce footprint and processing overhead. Further, assert usage is decoupled from ISO C assert handling (NDEBUG usage) to allow using ISO C assert without including assert statements.

Below are available defines for controlling assert inclusion. The defines are typically for a project to be used by the preprocessor.

  • If DEBUG_EFM is defined, the internal library assert handling will be used. This is implemented as a simple while(true) loop. DEBUG_EFM is not defined by default.

  • If DEBUG_EFM_USER is defined, the user must provide custom implementation of the assertEFM() function.

  • If both DEBUG_EFM and DEBUG_EFM_USER are undefined, all EFM_ASSERT() statements are not operational.

Note

  • The internal assert is documented because DEBUG_EFM is defined in the doxygen configuration.

Functions#

void
assertEFM(const char *file, int line)

Assert function for EFM.

Macros#

#define
EFM_ASSERT (expr)

Default assertion is not operational.

Function Documentation#

assertEFM#

void assertEFM (const char * file, int line)

Assert function for EFM.

Parameters
[in]file

- path and file name of the assert.

[in]line

- line number, in the file.


Definition at line 82 of file platform/common/inc/sl_assert.h

Macro Definition Documentation#

EFM_ASSERT#

#define EFM_ASSERT
Value:
(expr)

Default assertion is not operational.


Definition at line 84 of file platform/common/inc/sl_assert.h