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

Dependencies:   mbed

Committer:
igorsk
Date:
Wed Feb 17 16:22:39 2010 +0000
Revision:
0:1063a091a062

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
igorsk 0:1063a091a062 1 /***********************************************************************//**
igorsk 0:1063a091a062 2 * @file : lpc17xx_libcfg_default.h
igorsk 0:1063a091a062 3 * @brief : Default Library configuration header file
igorsk 0:1063a091a062 4 * @version : 1.0
igorsk 0:1063a091a062 5 * @date : 26. Mar. 2009
igorsk 0:1063a091a062 6 * @author : HieuNguyen
igorsk 0:1063a091a062 7 **************************************************************************
igorsk 0:1063a091a062 8 * Software that is described herein is for illustrative purposes only
igorsk 0:1063a091a062 9 * which provides customers with programming information regarding the
igorsk 0:1063a091a062 10 * products. This software is supplied "AS IS" without any warranties.
igorsk 0:1063a091a062 11 * NXP Semiconductors assumes no responsibility or liability for the
igorsk 0:1063a091a062 12 * use of the software, conveys no license or title under any patent,
igorsk 0:1063a091a062 13 * copyright, or mask work right to the product. NXP Semiconductors
igorsk 0:1063a091a062 14 * reserves the right to make changes in the software without
igorsk 0:1063a091a062 15 * notification. NXP Semiconductors also make no representation or
igorsk 0:1063a091a062 16 * warranty that such application will be suitable for the specified
igorsk 0:1063a091a062 17 * use without further testing or modification.
igorsk 0:1063a091a062 18 **************************************************************************/
igorsk 0:1063a091a062 19
igorsk 0:1063a091a062 20 /* Library Configuration group ----------------------------------------------------------- */
igorsk 0:1063a091a062 21 /** @defgroup LIBCFG_DEFAULT
igorsk 0:1063a091a062 22 * @ingroup LPC1700CMSIS_FwLib_Drivers
igorsk 0:1063a091a062 23 * @{
igorsk 0:1063a091a062 24 */
igorsk 0:1063a091a062 25
igorsk 0:1063a091a062 26 #ifndef LPC17XX_LIBCFG_DEFAULT_H_
igorsk 0:1063a091a062 27 #define LPC17XX_LIBCFG_DEFAULT_H_
igorsk 0:1063a091a062 28
igorsk 0:1063a091a062 29 /* Includes ------------------------------------------------------------------- */
igorsk 0:1063a091a062 30 #include "lpc_types.h"
igorsk 0:1063a091a062 31
igorsk 0:1063a091a062 32
igorsk 0:1063a091a062 33 /* Public Macros -------------------------------------------------------------- */
igorsk 0:1063a091a062 34 /** @defgroup LIBCFG_DEFAULT_Public_Macros
igorsk 0:1063a091a062 35 * @{
igorsk 0:1063a091a062 36 */
igorsk 0:1063a091a062 37
igorsk 0:1063a091a062 38 /************************** DEBUG MODE DEFINITIONS *********************************/
igorsk 0:1063a091a062 39 /* Un-comment the line below to compile the library in DEBUG mode, this will expanse
igorsk 0:1063a091a062 40 the "CHECK_PARAM" macro in the FW library code */
igorsk 0:1063a091a062 41
igorsk 0:1063a091a062 42 #define DEBUG 1
igorsk 0:1063a091a062 43
igorsk 0:1063a091a062 44
igorsk 0:1063a091a062 45 /******************* PERIPHERAL FW LIBRARY CONFIGURATION DEFINITIONS ***********************/
igorsk 0:1063a091a062 46
igorsk 0:1063a091a062 47 /* Comment the line below to disable the specific peripheral inclusion */
igorsk 0:1063a091a062 48
igorsk 0:1063a091a062 49 /* GPIO ------------------------------- */
igorsk 0:1063a091a062 50 #define _GPIO 1
igorsk 0:1063a091a062 51
igorsk 0:1063a091a062 52 /* UART ------------------------------- */
igorsk 0:1063a091a062 53 #define _UART 1
igorsk 0:1063a091a062 54 #define _UART0 1
igorsk 0:1063a091a062 55 #define _UART1 1
igorsk 0:1063a091a062 56 #define _UART2 1
igorsk 0:1063a091a062 57 #define _UART3 1
igorsk 0:1063a091a062 58
igorsk 0:1063a091a062 59 /* SPI ------------------------------- */
igorsk 0:1063a091a062 60 #define _SPI 1
igorsk 0:1063a091a062 61
igorsk 0:1063a091a062 62 /* SSP ------------------------------- */
igorsk 0:1063a091a062 63 #define _SSP 1
igorsk 0:1063a091a062 64 #define _SSP0 1
igorsk 0:1063a091a062 65 #define _SSP1 1
igorsk 0:1063a091a062 66
igorsk 0:1063a091a062 67
igorsk 0:1063a091a062 68 /* I2C ------------------------------- */
igorsk 0:1063a091a062 69 #define _I2C 1
igorsk 0:1063a091a062 70 #define _I2C0 1
igorsk 0:1063a091a062 71 #define _I2C1 1
igorsk 0:1063a091a062 72 #define _I2C2 1
igorsk 0:1063a091a062 73
igorsk 0:1063a091a062 74 /* TIMER ------------------------------- */
igorsk 0:1063a091a062 75 #define _TIM 1
igorsk 0:1063a091a062 76
igorsk 0:1063a091a062 77 /* WDT ------------------------------- */
igorsk 0:1063a091a062 78 #define _WDT 1
igorsk 0:1063a091a062 79
igorsk 0:1063a091a062 80
igorsk 0:1063a091a062 81 /* GPDMA ------------------------------- */
igorsk 0:1063a091a062 82 #define _GPDMA 1
igorsk 0:1063a091a062 83
igorsk 0:1063a091a062 84
igorsk 0:1063a091a062 85 /* DAC ------------------------------- */
igorsk 0:1063a091a062 86 #define _DAC 1
igorsk 0:1063a091a062 87
igorsk 0:1063a091a062 88 /* DAC ------------------------------- */
igorsk 0:1063a091a062 89 #define _ADC 1
igorsk 0:1063a091a062 90
igorsk 0:1063a091a062 91
igorsk 0:1063a091a062 92 /* PWM ------------------------------- */
igorsk 0:1063a091a062 93 #define _PWM 1
igorsk 0:1063a091a062 94 #define _PWM1 1
igorsk 0:1063a091a062 95
igorsk 0:1063a091a062 96 /* RTC ------------------------------- */
igorsk 0:1063a091a062 97 #define _RTC 1
igorsk 0:1063a091a062 98
igorsk 0:1063a091a062 99 /* I2S ------------------------------- */
igorsk 0:1063a091a062 100 #define _I2S 1
igorsk 0:1063a091a062 101
igorsk 0:1063a091a062 102 /* USB device ------------------------------- */
igorsk 0:1063a091a062 103 #define _USBDEV 1
igorsk 0:1063a091a062 104 #define _USB_DMA 1
igorsk 0:1063a091a062 105
igorsk 0:1063a091a062 106 /* QEI ------------------------------- */
igorsk 0:1063a091a062 107 #define _QEI 1
igorsk 0:1063a091a062 108
igorsk 0:1063a091a062 109 /* MCPWM ------------------------------- */
igorsk 0:1063a091a062 110 #define _MCPWM 1
igorsk 0:1063a091a062 111
igorsk 0:1063a091a062 112 /* CAN--------------------------------*/
igorsk 0:1063a091a062 113 #define _CAN 1
igorsk 0:1063a091a062 114
igorsk 0:1063a091a062 115 /* RIT ------------------------------- */
igorsk 0:1063a091a062 116 #define _RIT 1
igorsk 0:1063a091a062 117
igorsk 0:1063a091a062 118 /* EMAC ------------------------------ */
igorsk 0:1063a091a062 119 #define _EMAC 1
igorsk 0:1063a091a062 120
igorsk 0:1063a091a062 121
igorsk 0:1063a091a062 122 /************************** GLOBAL/PUBLIC MACRO DEFINITIONS *********************************/
igorsk 0:1063a091a062 123
igorsk 0:1063a091a062 124 #ifdef DEBUG
igorsk 0:1063a091a062 125 /*******************************************************************************
igorsk 0:1063a091a062 126 * @brief The CHECK_PARAM macro is used for function's parameters check.
igorsk 0:1063a091a062 127 * It is used only if the library is compiled in DEBUG mode.
igorsk 0:1063a091a062 128 * @param[in] expr - If expr is false, it calls check_failed() function
igorsk 0:1063a091a062 129 * which reports the name of the source file and the source
igorsk 0:1063a091a062 130 * line number of the call that failed.
igorsk 0:1063a091a062 131 * - If expr is true, it returns no value.
igorsk 0:1063a091a062 132 * @return None
igorsk 0:1063a091a062 133 *******************************************************************************/
igorsk 0:1063a091a062 134 #define CHECK_PARAM(expr) ((expr) ? (void)0 : check_failed((uint8_t *)__FILE__, __LINE__))
igorsk 0:1063a091a062 135 #else
igorsk 0:1063a091a062 136 #define CHECK_PARAM(expr)
igorsk 0:1063a091a062 137 #endif /* DEBUG */
igorsk 0:1063a091a062 138
igorsk 0:1063a091a062 139 /**
igorsk 0:1063a091a062 140 * @}
igorsk 0:1063a091a062 141 */
igorsk 0:1063a091a062 142
igorsk 0:1063a091a062 143
igorsk 0:1063a091a062 144 /* Public Functions ----------------------------------------------------------- */
igorsk 0:1063a091a062 145 /** @defgroup LIBCFG_DEFAULT_Public_Functions
igorsk 0:1063a091a062 146 * @{
igorsk 0:1063a091a062 147 */
igorsk 0:1063a091a062 148
igorsk 0:1063a091a062 149 #ifdef DEBUG
igorsk 0:1063a091a062 150 void check_failed(uint8_t *file, uint32_t line);
igorsk 0:1063a091a062 151 #endif
igorsk 0:1063a091a062 152
igorsk 0:1063a091a062 153 /**
igorsk 0:1063a091a062 154 * @}
igorsk 0:1063a091a062 155 */
igorsk 0:1063a091a062 156
igorsk 0:1063a091a062 157 #endif /* LPC17XX_LIBCFG_DEFAULT_H_ */
igorsk 0:1063a091a062 158
igorsk 0:1063a091a062 159 /**
igorsk 0:1063a091a062 160 * @}
igorsk 0:1063a091a062 161 */
igorsk 0:1063a091a062 162
igorsk 0:1063a091a062 163 /* --------------------------------- End Of File ------------------------------ */