Skip to content

Instantly share code, notes, and snippets.

@monpetit
Created May 12, 2016 06:14
Show Gist options
  • Select an option

  • Save monpetit/9a62efb7dc0ba3f0bc69d2bc83fde741 to your computer and use it in GitHub Desktop.

Select an option

Save monpetit/9a62efb7dc0ba3f0bc69d2bc83fde741 to your computer and use it in GitHub Desktop.
main function of example project
#include "em_device.h"
#include "em_chip.h"
#include "em_gpio.h"
#include "InitDevice.h"
#include "systick_util.h"
/**************************************************************************//**
* @brief Main function
*****************************************************************************/
int main(void)
{
/* Chip errata */
CHIP_Init();
/* Initialzie Device */
enter_DefaultMode_from_RESET();
/* Activate Systick Handler */
setup_systick_timer();
/* Infinite loop */
while (1) {
GPIO_PinOutToggle(LED_PORT, LED_PIN);
__delay_ms(1000);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment