#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 character string (format character 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 character 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 character 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
01/09/2004 Added the description that the RELEASE and ROM builds do not output
03/12/2004 Added SDK_ALIGN4_ASSERT, SDK_ALIGN2_ASSERT
02/27/2004 Initial version
CONFIDENTIAL