NXP's driver library for LPC17xx, ported to mbed's online compiler. Not tested! I had to fix a lot of warings and found a couple of pretty obvious bugs, so the chances are there are more. Original: http://ics.nxp.com/support/documents/microcontrollers/zip/lpc17xx.cmsis.driver.library.zip
lpc17xx_libcfg_default.h
00001 /***********************************************************************//** 00002 * @file : lpc17xx_libcfg_default.h 00003 * @brief : Default Library configuration header file 00004 * @version : 1.0 00005 * @date : 26. Mar. 2009 00006 * @author : HieuNguyen 00007 ************************************************************************** 00008 * Software that is described herein is for illustrative purposes only 00009 * which provides customers with programming information regarding the 00010 * products. This software is supplied "AS IS" without any warranties. 00011 * NXP Semiconductors assumes no responsibility or liability for the 00012 * use of the software, conveys no license or title under any patent, 00013 * copyright, or mask work right to the product. NXP Semiconductors 00014 * reserves the right to make changes in the software without 00015 * notification. NXP Semiconductors also make no representation or 00016 * warranty that such application will be suitable for the specified 00017 * use without further testing or modification. 00018 **************************************************************************/ 00019 00020 /* Library Configuration group ----------------------------------------------------------- */ 00021 /** @defgroup LIBCFG_DEFAULT 00022 * @ingroup LPC1700CMSIS_FwLib_Drivers 00023 * @{ 00024 */ 00025 00026 #ifndef LPC17XX_LIBCFG_DEFAULT_H_ 00027 #define LPC17XX_LIBCFG_DEFAULT_H_ 00028 00029 /* Includes ------------------------------------------------------------------- */ 00030 #include "lpc_types.h" 00031 00032 00033 /* Public Macros -------------------------------------------------------------- */ 00034 /** @defgroup LIBCFG_DEFAULT_Public_Macros 00035 * @{ 00036 */ 00037 00038 /************************** DEBUG MODE DEFINITIONS *********************************/ 00039 /* Un-comment the line below to compile the library in DEBUG mode, this will expanse 00040 the "CHECK_PARAM" macro in the FW library code */ 00041 00042 #define DEBUG 1 00043 00044 00045 /******************* PERIPHERAL FW LIBRARY CONFIGURATION DEFINITIONS ***********************/ 00046 00047 /* Comment the line below to disable the specific peripheral inclusion */ 00048 00049 /* GPIO ------------------------------- */ 00050 #define _GPIO 1 00051 00052 /* UART ------------------------------- */ 00053 #define _UART 1 00054 #define _UART0 1 00055 #define _UART1 1 00056 #define _UART2 1 00057 #define _UART3 1 00058 00059 /* SPI ------------------------------- */ 00060 #define _SPI 1 00061 00062 /* SSP ------------------------------- */ 00063 #define _SSP 1 00064 #define _SSP0 1 00065 #define _SSP1 1 00066 00067 00068 /* I2C ------------------------------- */ 00069 #define _I2C 1 00070 #define _I2C0 1 00071 #define _I2C1 1 00072 #define _I2C2 1 00073 00074 /* TIMER ------------------------------- */ 00075 #define _TIM 1 00076 00077 /* WDT ------------------------------- */ 00078 #define _WDT 1 00079 00080 00081 /* GPDMA ------------------------------- */ 00082 #define _GPDMA 1 00083 00084 00085 /* DAC ------------------------------- */ 00086 #define _DAC 1 00087 00088 /* DAC ------------------------------- */ 00089 #define _ADC 1 00090 00091 00092 /* PWM ------------------------------- */ 00093 #define _PWM 1 00094 #define _PWM1 1 00095 00096 /* RTC ------------------------------- */ 00097 #define _RTC 1 00098 00099 /* I2S ------------------------------- */ 00100 #define _I2S 1 00101 00102 /* USB device ------------------------------- */ 00103 #define _USBDEV 1 00104 #define _USB_DMA 1 00105 00106 /* QEI ------------------------------- */ 00107 #define _QEI 1 00108 00109 /* MCPWM ------------------------------- */ 00110 #define _MCPWM 1 00111 00112 /* CAN--------------------------------*/ 00113 #define _CAN 1 00114 00115 /* RIT ------------------------------- */ 00116 #define _RIT 1 00117 00118 /* EMAC ------------------------------ */ 00119 #define _EMAC 1 00120 00121 00122 /************************** GLOBAL/PUBLIC MACRO DEFINITIONS *********************************/ 00123 00124 #ifdef DEBUG 00125 /******************************************************************************* 00126 * @brief The CHECK_PARAM macro is used for function's parameters check. 00127 * It is used only if the library is compiled in DEBUG mode. 00128 * @param[in] expr - If expr is false, it calls check_failed() function 00129 * which reports the name of the source file and the source 00130 * line number of the call that failed. 00131 * - If expr is true, it returns no value. 00132 * @return None 00133 *******************************************************************************/ 00134 #define CHECK_PARAM(expr) ((expr) ? (void)0 : check_failed((uint8_t *)__FILE__, __LINE__)) 00135 #else 00136 #define CHECK_PARAM(expr) 00137 #endif /* DEBUG */ 00138 00139 /** 00140 * @} 00141 */ 00142 00143 00144 /* Public Functions ----------------------------------------------------------- */ 00145 /** @defgroup LIBCFG_DEFAULT_Public_Functions 00146 * @{ 00147 */ 00148 00149 #ifdef DEBUG 00150 void check_failed(uint8_t *file, uint32_t line); 00151 #endif 00152 00153 /** 00154 * @} 00155 */ 00156 00157 #endif /* LPC17XX_LIBCFG_DEFAULT_H_ */ 00158 00159 /** 00160 * @} 00161 */ 00162 00163 /* --------------------------------- End Of File ------------------------------ */
Generated on Tue Jul 12 2022 17:06:02 by 1.7.2