update template
This commit is contained in:
24
Src/main.c
24
Src/main.c
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user