
/*==================[inclusions]=============================================*/
#include "main.h"       /* <= own header */
#include "led.h"

#ifndef CPU
#error CPU shall be defined
#endif
#if (lpc4337 == CPU)
#include "chip.h"
#elif (mk60fx512vlq15 == CPU)
#else
#endif


int main(void)
{  GPIO_Init();
   Chip_SCU_PinMux(7,1,0,FUNC6); /* P7_1: UART2 TXD */
   Chip_SCU_PinMux(7,2,0,FUNC6); /* P7_2: UART2 RXD */
   Chip_UART_Init(LPC_USART2);
   Chip_UART_SetBaud(LPC_USART2,115200);
   Chip_UART_SetupFIFOS(LPC_USART2, UART_FCR_FIFO_EN | UART_FCR_TRG_LEV0 );
   Chip_UART_TXEnable(LPC_USART2);
   int led;

   Led_Color_Init();
   led = LED_1;
   while(1) {
	  int i=0;
	  for(i=0;i<5000000;i++) {

	     asm("nop");
	  }
	  Chip_UART_SendByte (LPC_USART2, "1");
//	  Chip_UART_SendByte (LPC_USART2,10);

	  Led_Color_Toggle(led);
   }

   return 0;


}

void Timer_IRQ(void) {
	//Timer_Clear_IRQ();
}

void ADC0_IRQ(void) {

}


