Removed backup file, continue work on main.c
This commit is contained in:
parent
00e45fdb63
commit
db42d4f87c
|
@ -1,4 +1,4 @@
|
||||||
#include "stm32f0xx_conf.h"
|
//#include "stm32f0xx_conf.h"
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
@ -14,6 +14,8 @@ int main(void)
|
||||||
//#define LED_ORANGE 0
|
//#define LED_ORANGE 0
|
||||||
//#define LED_RED 0
|
//#define LED_RED 0
|
||||||
|
|
||||||
|
RCC->AHBENR |= RCC_AHBENR_IOPCEN; // enable the clock to GPIOC
|
||||||
|
|
||||||
GPIOC->MODER = (1 << 16);
|
GPIOC->MODER = (1 << 16);
|
||||||
|
|
||||||
while(1) GPIOC->ODR ^= (1 << 16);
|
while(1) GPIOC->ODR ^= (1 << 16);
|
||||||
|
|
21
src/main.c~
21
src/main.c~
|
@ -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);
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue