add uart tests

This commit is contained in:
Ajit Ananthadevan 2025-08-19 07:21:41 +10:00
parent 728c4925ea
commit 9f50648334
4 changed files with 398 additions and 0 deletions

View file

@ -0,0 +1,21 @@
// RXD3/TXD3: PA4/PA5
#include "CH59x_common.h"
#include <string.h>
int main()
{
char *s = "Hello world\r\n";
SetSysClock(CLK_SOURCE_PLL_60MHz);
GPIOA_ModeCfg(GPIO_Pin_5, GPIO_ModeOut_PP_5mA);
UART3_DefInit();
while (1) {
UART3_SendString((uint8_t *)s, strlen(s));
mDelaymS(1000);
}
}