first commit

This commit is contained in:
Ajit Ananthadevan 2025-08-23 02:26:08 +10:00
commit fba966056a
11 changed files with 1045 additions and 0 deletions

17
myapps/first/src/main.c Normal file
View 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++);
}
}