update template

This commit is contained in:
2026-02-18 17:44:38 +08:00
parent d324d5f92a
commit 7419dec1b5
14 changed files with 1076 additions and 281 deletions

View File

@@ -35,6 +35,7 @@ OF SUCH DAMAGE.
#include "gd32e23x.h"
#include "systick.h"
#include "uart.h"
#include "uart_ring_buffer.h"
#include "led.h"
#include "command.h"
#include <stdio.h>
@@ -52,26 +53,31 @@ int main(void)
led_init();
mcu_detect_and_config();
setbuf(stdout, NULL);
// delay_ms(1000);
systick_config();
rs485_init();
printf("Flash size: %d Kbytes\n", get_flash_size());
#ifdef DEBUG_VERBOSE
printf("Hello World!\r\n");
#endif
uart_ring_buffer_init();
uart_init();
i2c_config();
#ifdef DEBUG_MODE
printf("Hello World!\r\n");
#endif
#ifdef DEBUG_VERBOSE
i2c_scan();
i2c_bus_reset();
#endif
/* ========== Command Testing ========== */
/* ========== */
while(1){
command_process();
delay_ms(10);
command_process(); /* Process UART commands */
delay_ms(10);
}
}