diff --git a/src/main.c b/src/main.c index 19fa07c..c7c2cce 100755 --- a/src/main.c +++ b/src/main.c @@ -1,4 +1,4 @@ -#include "stm32f0xx_conf.h" +//#include "stm32f0xx_conf.h" int main(void) { @@ -14,6 +14,8 @@ int main(void) //#define LED_ORANGE 0 //#define LED_RED 0 + RCC->AHBENR |= RCC_AHBENR_IOPCEN; // enable the clock to GPIOC + GPIOC->MODER = (1 << 16); while(1) GPIOC->ODR ^= (1 << 16); diff --git a/src/main.c~ b/src/main.c~ deleted file mode 100755 index ccf938b..0000000 --- a/src/main.c~ +++ /dev/null @@ -1,21 +0,0 @@ -#include "stm32f4xx_conf.h" - -int main(void) -{ - -//#elif CONFIG_STM32F0_DISCOVERY -// -//#define GPIOC 0x48000800 /* port C */ -//#define GPIOC_MODER (GPIOC + 0x00) /* port mode register */ -//#define LED_PORT_ODR (GPIOC + 0x14) /* port output data register */ -// -//#define LED_BLUE (1 << 8) /* port C, pin 8 */ -//#define LED_GREEN (1 << 9) /* port C, pin 9 */ -//#define LED_ORANGE 0 -//#define LED_RED 0 - - GPIOC->MODER = (1 << 16); - - while(1) GPIOC->ODR ^= (1 << 16); - -}