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 template.c
frank26080115 0:bf7b9fba3924 3 * @purpose A simple template for GNU example
frank26080115 0:bf7b9fba3924 4 * @version x.x
frank26080115 0:bf7b9fba3924 5 * @date dd. mm. yy
frank26080115 0:bf7b9fba3924 6 * @author xxxx
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 /* Include files */
frank26080115 0:bf7b9fba3924 20 /* <<add include files here>> */
frank26080115 0:bf7b9fba3924 21 #include "lpc17xx_libcfg.h"
frank26080115 0:bf7b9fba3924 22
frank26080115 0:bf7b9fba3924 23 /* Add Private Types */
frank26080115 0:bf7b9fba3924 24 /* <<add private type here >> */
frank26080115 0:bf7b9fba3924 25
frank26080115 0:bf7b9fba3924 26 /* Add Private Variables */
frank26080115 0:bf7b9fba3924 27 /* <<add private variables here >> */
frank26080115 0:bf7b9fba3924 28
frank26080115 0:bf7b9fba3924 29 /* Add Private Functions */
frank26080115 0:bf7b9fba3924 30 /* <<add private functions here >> */
frank26080115 0:bf7b9fba3924 31
frank26080115 0:bf7b9fba3924 32 /**
frank26080115 0:bf7b9fba3924 33 * @brief Main program body
frank26080115 0:bf7b9fba3924 34 */
frank26080115 0:bf7b9fba3924 35 int c_entry(void)
frank26080115 0:bf7b9fba3924 36 {
frank26080115 0:bf7b9fba3924 37 /* <<add code here >> */
frank26080115 0:bf7b9fba3924 38 while(1);
frank26080115 0:bf7b9fba3924 39 return 1;
frank26080115 0:bf7b9fba3924 40 }
frank26080115 0:bf7b9fba3924 41
frank26080115 0:bf7b9fba3924 42 /* Support required entry point for other toolchain */
frank26080115 0:bf7b9fba3924 43 int main (void)
frank26080115 0:bf7b9fba3924 44 {
frank26080115 0:bf7b9fba3924 45 return c_entry();
frank26080115 0:bf7b9fba3924 46 }
frank26080115 0:bf7b9fba3924 47
frank26080115 0:bf7b9fba3924 48 #ifdef DEBUG
frank26080115 0:bf7b9fba3924 49 /*******************************************************************************
frank26080115 0:bf7b9fba3924 50 * @brief Reports the name of the source file and the source line number
frank26080115 0:bf7b9fba3924 51 * where the CHECK_PARAM error has occurred.
frank26080115 0:bf7b9fba3924 52 * @param[in] file Pointer to the source file name
frank26080115 0:bf7b9fba3924 53 * @param[in] line assert_param error line source number
frank26080115 0:bf7b9fba3924 54 * @return None
frank26080115 0:bf7b9fba3924 55 *******************************************************************************/
frank26080115 0:bf7b9fba3924 56 void check_failed(uint8_t *file, uint32_t line)
frank26080115 0:bf7b9fba3924 57 {
frank26080115 0:bf7b9fba3924 58 /* User can add his own implementation to report the file name and line number,
frank26080115 0:bf7b9fba3924 59 ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
frank26080115 0:bf7b9fba3924 60
frank26080115 0:bf7b9fba3924 61 /* Infinite loop */
frank26080115 0:bf7b9fba3924 62 while(1);
frank26080115 0:bf7b9fba3924 63 }
frank26080115 0:bf7b9fba3924 64 #endif
frank26080115 0:bf7b9fba3924 65