mirror of
https://github.com/IcedRooibos/py32f0-template.git
synced 2025-10-28 00:12:05 -07:00
refactor: update default app
This commit is contained in:
parent
8813b261fa
commit
287cb3400c
11
User/main.c
11
User/main.c
@ -1,3 +1,9 @@
|
||||
/***
|
||||
* Demo: LED Toggle
|
||||
*
|
||||
* PA0 ------> LED+
|
||||
* GND ------> LED-
|
||||
*/
|
||||
#include "py32f0xx_bsp_printf.h"
|
||||
|
||||
|
||||
@ -8,8 +14,8 @@ int main(void)
|
||||
HAL_Init();
|
||||
APP_GPIO_Config();
|
||||
BSP_USART_Config();
|
||||
printf("SystemClk:%ld\r\n", SystemCoreClock);
|
||||
|
||||
printf("PY32F0xx LED Toggle Demo\r\nSystem Clock: %ld\r\n", SystemCoreClock);
|
||||
|
||||
while (1)
|
||||
{
|
||||
HAL_Delay(1000);
|
||||
@ -28,7 +34,6 @@ static void APP_GPIO_Config(void)
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
||||
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user