stm32TestTempl/Src/main.cpp
2025-04-06 14:30:52 +00:00

18 lines
507 B
C++

#include "Delay.hpp"
#include "stm32f10x_gpio.h"
#include "stm32f10x_rcc.h"
#include "stm32f10x.h" // Device header
int main(void){
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE);
GPIO_InitTypeDef gpioInitStructure = {GPIO_Pin_13,GPIO_Speed_50MHz,GPIO_Mode_Out_PP};
GPIO_Init(GPIOC, &gpioInitStructure);
u16 delayTime = 100;
while(true){
delayTime+=1;
GPIO_ResetBits(GPIOC, GPIO_Pin_13);
delay_ms(delayTime);
GPIO_SetBits(GPIOC, GPIO_Pin_13);
delay_ms(delayTime);
}
}