#include "board.h" #include <stdio.h> const uint32_t ExtRateIn = 0; const uint32_t OscRateIn = 12000000; #define TICKRATE_HZ1 (1000)/* 10 ticks per second */ void SysTick_Handler(void) { Chip_GPIO_SetPinState(LPC_GPIO_PORT, 0, 1, state); Chip_GPIO_SetPinState(LPC_GPIO_PORT, 1, 12, state); state = !state; } int main(void) { SystemCoreClockUpdate(); Chip_GPIO_SetPinDIROutput(LPC_GPIO_PORT, 1, 12); Chip_GPIO_SetPinDIROutput(LPC_GPIO_PORT, 0, 1); /* Enable and setup SysTick Timer at a periodic rate */ SysTick_Config(SystemCoreClock / TICKRATE_HZ1); while (1) { __WFI(); } return 0; } |