Created
August 14, 2016 04:24
-
-
Save hocarm/adf2cdf4bd3e79e1ab88f0a9a689495d 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 <stm32f10x_rcc.h> | |
#include <stm32f10x_gpio.h> | |
void Delay(uint32_t nTime); | |
int main(void) | |
{ | |
GPIO_InitTypeDef GPIO_InitStructure; | |
// Enable Peripheral Clocks | |
... (1) ... | |
// Configure Pins | |
... (2) ... | |
// Configure SysTick Timer | |
... (3) ... | |
while (1) { | |
static int ledval = 0; | |
// toggle led | |
... (4) ... | |
Delay (250); // wait 250ms | |
} | |
} | |
// Timer code | |
... (5) ... | |
#ifdef USE_FULL_ASSERT | |
void assert_failed(uint8_t* file , uint32_t line) | |
{ | |
/* Infinite loop */ | |
/* Use GDB to find out why we're here */ | |
while (1); | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment