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 /* SPI ------------------------------- */ 00046 #define _SPI 00047 00048 /* GPIO ------------------------------- */ 00049 #define _GPIO 00050 00051 00052 /************************** GLOBAL/PUBLIC MACRO DEFINITIONS *********************************/ 00053 00054 #ifdef DEBUG 00055 /******************************************************************************* 00056 * @brief The CHECK_PARAM macro is used for function's parameters check. 00057 * It is used only if the library is compiled in DEBUG mode. 00058 * @param[in] expr - If expr is false, it calls check_failed() function 00059 * which reports the name of the source file and the source 00060 * line number of the call that failed. 00061 * - If expr is true, it returns no value. 00062 * @return None 00063 *******************************************************************************/ 00064 #define CHECK_PARAM(expr) ((expr) ? (void)0 : check_failed((uint8_t *)__FILE__, __LINE__)) 00065 #else 00066 #define CHECK_PARAM(expr) 00067 #endif /* DEBUG */ 00068 00069 00070 00071 /************************** GLOBAL/PUBLIC FUNCTION DECLARATION *********************************/ 00072 00073 #ifdef DEBUG 00074 void check_failed(uint8_t *file, uint32_t line); 00075 #endif 00076 00077 00078 #endif /* LPC17XX_LIBCFG_H_ */
1.5.8