MAX32665 SDK Documentation  0.2
Software Development Kit Overview and API Documentation
Assertion Checks for Debugging

Assertion checks for debugging. More...

Functions

void mxc_assert (const char *expr, const char *file, int line)
 Assert an error when the given expression fails during debugging. More...
 

Detailed Description

Function Documentation

◆ mxc_assert()

void mxc_assert ( const char *  expr,
const char *  file,
int  line 
)
Note
To use debug assertions, the symbol MXC_ASSERT_ENABLE must be defined.
Parameters
exprString with the expression that failed the assertion.
fileFile containing the failed assertion.
lineLine number for the failed assertion.
Note
This is defined as a weak function and can be overridden at the application layer to print the debugging information.
printf("%s, file: %s, line %d\n", expr, file, line);
To use debug assertions, the symbol MXC_ASSERT_ENABLE must be defined.