#include <nitro/misc.h>
SDK_ASSERT(exp);
SDK_ASSERTMSG(exp, fmt, ...);
SDK_NULL_ASSERT(exp);
SDK_MINMAX_ASSERT(exp, min, max);
SDK_MIN_ASSERT(exp, min);
SDK_MAX_ASSERT(exp, max);
SDK_ALIGN4_ASSERT(exp);
SDK_ALIGN2_ASSERT(exp);
exp | The condition parameter. |
fmt | The display string (format string). |
min | The minimum value when judging a condition by the range. |
max | The maximum value when judging a condition by the range. |
None.
This macro examines a condition, and outputs a string if the condition is not fulfilled. After that, it forces the application to terminate. The SDK_ASSERTMSG
macro allows a variable number of arguments according to the format string fmt
.
Each macro function displays an assert message in the following cases: SDK_ASSERT( exp )
is displayed when the value of evaluation expression exp is false (when exp
is not formed). SDK_ASSERTMSG( exp, fmt, ...
is displayed when the value of evaluation expression exp
is false (when exp
is not formed). SDK_NULL_ASSERT( exp )
is displayed when the value of evaluation expression exp
is not equal to NULL. SDK_MINMAX_ASSERT( exp, min, max )
is displayed when the value of evaluation expression exp
is less than min
or greater than max
. SDK_MIN_ASSERT( exp, min )
is displayed when the value of evaluation expression exp
is less than min
. SDK_MAX_ASSERT( exp, max )
is displayed when the value of evaluation expression exp
is greater than max
. SDK_ALIGN4_ASSERT( exp )
is displayed when the value of evaluation expression exp
is not a multiple of 4. SDK_ALIGN2_ASSERT( exp )
is displayed when the value of evaluation expression exp
is not a multiple of 2.
These macro functions are for debug purposes and the RELEASE build and FINALROM build do not perform the output operation.
SDK_WARNING
2004/01/09 Added the description that the RELEASE and ROM builds do not output.
2004/03/12 Added SDK_ALIGN4_ASSERT, SDK_ALIGN2_ASSERT.
2004/02/27 Initial version.
CONFIDENTIAL