#include "LPC13xx.h"
#include <cr_section_macros.h>
/*----------------------------------------------------*/
int main(void) {
LPC_SYSCON->SYSAHBCLKCTRL |= (1 << 6); /* Enable clock to the GPIO peripheral */
LPC_GPIO1->DIR |= (1 << 5); /* Set pin direction of PIO1_5 as output */
int i;
while(1) { /* Until power is available */
LPC_GPIO1->DATA |= (1 << 5); /* Set the output of PIO1_5 as one */
for(i = 0; i < 1000000; i++) { /* Wait (500ms approx.) */
}
LPC_GPIO1->DATA &= ~(1 << 5); /* Set the output of PIO1_5 as zero */
for(i = 0; i < 1000000; i++) { /* Wait (500ms approx.) */
}
}
return 0 ;
}
/*----------------------------------------------------*/