#include "LPC8xx.h"
//#include <cr_section_macros.h>
#include <stdio.h>
#include "lpc8xx_gpio.h"
#include "lpc8xx_syscon.h"
#include "utilities.h"
extern void setup_debug_uart(void);
static void delay(void)
{
volatile uint32_t cntr= 0x80000;
while(cntr>0)
{
cntr--;
}
}
int main(void)
{
// Configure the debug uart (see Serial.c)
setup_debug_uart();
// Reset the GPIO module and enable its clock. See peripherals_lib
GPIOInit();
// Config. ports (red LED), (blue LED), (green LED) as outputs,
// with LEDs off ('1' = off). See utilities_lib
Config_LEDs(RED | BLUE | GREEN);
while (1)
{
printf("Hello\r\n");
LEDs_On(RED);
delay();
LEDs_Off(RED);
delay();
LEDs_On(BLUE);
delay();
LEDs_Off(BLUE);
delay();
LEDs_On(GREEN);
delay();
LEDs_Off(GREEN);
delay();
}
} // end of main
|