- STM32F103
- build
- cmake
- Core
- main.c
- stm32f1xx_hal_msp.cstm32f1xx_it.csyscalls.csysmem.csystem_stm32f1xx.c
- Drivers
- CMakeLists.txtCMakePresets.jsonstartup_stm32f10xb.s
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- # include "stm32f10x.h"
- # include "key.h"
- voidKEY_Init ( void )
- {
- // Enable the clock for GPIOC (APB2)
- RCC_APB2PeriphClockCmd (RCC_APB2Periph_GPIOA, ENABLE);
- GPIO_InitTypeDef led_init;
- led_init.GPIO_Pin = GPIO_Pin_13;
- led_init.GPIO_Mode = GPIO_Mode_Out_PP;
- led_init.GPIO_Speed = GPIO_Speed_10MHz;
- // init
- GPIO_Init(GPIOC, &led_init);
