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