These are the examples provided for [[/users/frank26080115/libraries/LPC1700CMSIS_Lib/]] Note, the entire "program" is not compilable!

Committer:
frank26080115
Date:
Sun Mar 20 05:38:56 2011 +0000
Revision:
0:bf7b9fba3924

        

Who changed what in which revision?

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