first commit
This commit is contained in:
commit
fba966056a
11 changed files with 1045 additions and 0 deletions
17
myapps/first/src/main.c
Normal file
17
myapps/first/src/main.c
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
//#include <stdint.h>
|
||||
#include "stm32g0xx.h"
|
||||
|
||||
#define LED_PIN 4
|
||||
|
||||
int main(void)
|
||||
{
|
||||
RCC->IOPENR |= RCC_IOPENR_GPIOAEN;
|
||||
GPIOA->MODER |= GPIO_MODER_MODE5_0;
|
||||
|
||||
while(1)
|
||||
{
|
||||
GPIOA->ODR ^= (1<<LED_PIN); // toggle diodes
|
||||
for (uint32_t i = 0; i < 1000000; i++);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue