hdo
beta
|
Zobrazit zdrojový text tohoto souboru.
Definice maker | |
#define | ASSERT(condition,...) |
#define | SANITY_ERROR "Sanity check failed at %s:%d\n\r" |
#define | SANITY_CHECK(condition) ASSERT(condition, SANITY_ERROR, __FILE__, __LINE__) |
Purpose
Definition of the ASSERT() and SANITY_CHECK() macros, which are used for runtime condition & parameter verifying.
Usage
Definice v souboru assert.h.
#define ASSERT | ( | condition, | |
... | |||
) |
{ \
if (!(condition)) { \
printf("-F- ASSERT: "); \
printf(__VA_ARGS__); \
while (1); \
} \
}
Checks that the given condition is true, otherwise displays an error message and stops the program execution.
condition | Condition to verify. |
Definice je uvedena na řádku 88 v souboru assert.h.
Používá se v ADC_DisableChannel(), ADC_DisableIt(), ADC_EnableChannel(), ADC_EnableIt(), ADC_GetConvertedData() a ADC_Initialize().
#define SANITY_CHECK | ( | condition | ) | ASSERT(condition, SANITY_ERROR, __FILE__, __LINE__) |