00001 /***********************************************************************/ 00020 #ifndef LPC17XX_LIBCFG_H_ 00021 #define LPC17XX_LIBCFG_H_ 00022 00023 #include "lpc_types.h" 00024 00025 00026 /************************** DEBUG MODE DEFINITIONS *********************************/ 00027 /* Un-comment the line below to compile the library in DEBUG mode, this will expanse 00028 the "CHECK_PARAM" macro in the FW library code */ 00029 00030 #define DEBUG 1 00031 00032 00033 /******************* PERIPHERAL FW LIBRARY CONFIGURATION DEFINITIONS ***********************/ 00034 00035 /* Comment the line below to disable the specific peripheral inclusion */ 00036 00037 /* UART ------------------------------- */ 00038 #define _UART 1 00039 #define _UART0 1 00040 #define _UART1 1 00041 #define _UART2 1 00042 #define _UART3 1 00043 00044 00045 /* SSP ------------------------------- */ 00046 #define _SSP 1 00047 00048 /* GPIO ------------------------------- */ 00049 #define _GPIO 1 00050 00051 /************************** GLOBAL/PUBLIC MACRO DEFINITIONS *********************************/ 00052 00053 #ifdef DEBUG 00054 /******************************************************************************* 00055 * @brief The CHECK_PARAM macro is used for function's parameters check. 00056 * It is used only if the library is compiled in DEBUG mode. 00057 * @param[in] expr - If expr is false, it calls check_failed() function 00058 * which reports the name of the source file and the source 00059 * line number of the call that failed. 00060 * - If expr is true, it returns no value. 00061 * @return None 00062 *******************************************************************************/ 00063 #define CHECK_PARAM(expr) ((expr) ? (void)0 : check_failed((uint8_t *)__FILE__, __LINE__)) 00064 #else 00065 #define CHECK_PARAM(expr) 00066 #endif /* DEBUG */ 00067 00068 00069 00070 /************************** GLOBAL/PUBLIC FUNCTION DECLARATION *********************************/ 00071 00072 #ifdef DEBUG 00073 void check_failed(uint8_t *file, uint32_t line); 00074 #endif 00075 00076 00077 #endif /* LPC17XX_LIBCFG_H_ */
1.5.8