CH32V307_Template/src/main.c

29 lines
529 B
C

// SPDX-License-Identifier: MIT
#include <stdio.h>
#include "debug.h"
#include "board.h"
int main(void) {
/* Initialize board components. */
BOARD_SystemClock_Config();
BOARD_IOMUX_Init();
BOARD_Peripheral_Init();
/* Initialize UART for libc function calls. */
USART_Printf_Init(115200);
Delay_Init(); /* Silly function, will be replaced next time. */
printf("Hello world?\r\n");
uint32_t i = 0;
for(;;) {
Delay_Ms(500);
printf("Dead loop @%lu\r\n", i++);
}
}