2024-11-03 22:14:56 +08:00
|
|
|
|
|
|
|
|
#include "led.h"
|
2024-11-09 21:37:16 +08:00
|
|
|
#include "uart_log.h"
|
|
|
|
|
#include "stdio.h"
|
2024-11-03 22:14:56 +08:00
|
|
|
|
|
|
|
|
void system_init(void)
|
|
|
|
|
{
|
|
|
|
|
led_init(LED_PIN);
|
2024-11-09 21:37:16 +08:00
|
|
|
uart_log_init();
|
2024-11-03 22:14:56 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void led_blink(void)
|
|
|
|
|
{
|
2024-11-09 21:37:16 +08:00
|
|
|
led_on(LED_PIN);
|
|
|
|
|
led_off(LED_PIN);
|
2024-11-03 22:14:56 +08:00
|
|
|
}
|
|
|
|
|
|
2024-11-09 21:37:16 +08:00
|
|
|
extern UART_HandleTypeDef UartHandle;
|
|
|
|
|
|
2024-11-03 22:14:56 +08:00
|
|
|
int main(void)
|
|
|
|
|
{
|
|
|
|
|
system_init();
|
|
|
|
|
// NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
|
|
|
|
|
// __enable_irq();
|
2024-11-09 21:37:16 +08:00
|
|
|
printf("Run start ...\r\n");
|
|
|
|
|
while (1) {
|
|
|
|
|
static uint32_t count = 0;
|
|
|
|
|
printf("Hello World, count = %ld\r\n", count++);
|
|
|
|
|
led_blink();
|
|
|
|
|
}
|
|
|
|
|
|
2024-11-03 22:14:56 +08:00
|
|
|
return 0;
|
|
|
|
|
}
|