/*****************************************************************************
 *   lcdtest.c:  main C entry file for NXP LPC23xx/24xx Family Microprocessors
 *
 *   Copyright(C) 2006, NXP Semiconductor
 *   All rights reserved.
 *
 *   History
 *   2006.07.13  ver 1.00    Prelimnary version, first Release
 *
******************************************************************************/
#include "LPC23xx.h"                        /* LPC23xx/24xx definitions */
#include "type.h"
#include "irq.h"
#include "extint.h"


 static void time_waste( DWORD dv )
 	{
 	volatile DWORD cnt;
 	for ( cnt=0; cnt<dv ; cnt++ ) { ; }
 	}
/*****************************************************************************
**   Main Function  main()
******************************************************************************/
void main (void)
{
int i;

  // Config Pin GPIO = P3[26:25] Drive LED
PINSEL7 &= 0xFFC3FFFF; // Config P3[26:25] = GPIO Function
PINMODE7 &= 0xFFC3FFFF; // Enable Pull-Up on P3[26:25]
FIO3DIR |= 0x02000000; // Set P3[25] = Output
FIO3DIR |= 0x04000000; // Set P3[26] = Output

/* blink leds to check program working */
for(i=0;i<5;i++)
{
time_waste(0x00090000);
FIO3CLR = 0x02000000; // LED(P3[25]) = ON
FIO3CLR = 0x04000000; // LED(P3[26]) = ON
time_waste(0x00090000);
FIO3SET = 0x02000000; // LED(P3[25]) = OFF
FIO3SET = 0x04000000; // LED(P3[26]) = OFF
}

/* initialize GPIO pins as external interrupts */
 EINTInit();

  while(1);	  /* Endless loop */

}
/******************************************************************************
**                            End Of File
******************************************************************************/
