Created
November 6, 2013 20:52
-
-
Save oyvindrobertsen/7343857 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <stdbool.h> | |
#include "em_device.h" | |
#include "em_chip.h" | |
#include "em_cmu.h" | |
#include "em_emu.h" | |
#include "bsp.h" | |
#include "bsp_trace.h" | |
/**************************************************************************//** | |
* @brief Main function | |
*****************************************************************************/ | |
int main(void) | |
{ | |
/* Chip errata */ | |
CHIP_Init(); | |
/* If first word of user data page is non-zero, enable eA Profiler trace */ | |
BSP_TraceProfilerSetup(); | |
/* Setup SysTick Timer for 1 msec interrupts */ | |
if (SysTick_Config(CMU_ClockFreqGet(cmuClock_CORE) / 1000)) while (1) ; | |
/* Initialize LED driver */ | |
BSP_LedsInit(); | |
BSP_LedSet(0); | |
/* Infinite blink loop */ | |
while (1) | |
{ | |
BSP_LedToggle(0); | |
BSP_LedToggle(1); | |
Delay(1000); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment