prepare for LL
This commit is contained in:
parent
84d00d8178
commit
91beef5d0b
16 changed files with 0 additions and 0 deletions
27
myapps/OLD/first-hal/src/main.c
Normal file
27
myapps/OLD/first-hal/src/main.c
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
//#include "stm32g0xx_hal.h"
|
||||
#include "stm32g0xx_hal_msp.h"
|
||||
|
||||
#define LED_PIN 4
|
||||
|
||||
int main(void)
|
||||
{
|
||||
HAL_Init();
|
||||
SystemClock_Config();
|
||||
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||
|
||||
GPIO_InitTypeDef GPIO_InitStruct;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
||||
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_4;
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
|
||||
while(1)
|
||||
{
|
||||
HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_4);
|
||||
HAL_Delay(100);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue