add prj debug print

This commit is contained in:
Ajit Ananthadevan 2025-08-21 07:35:57 +10:00
parent 5db0144d4c
commit 4cdd9a24c4
2 changed files with 191 additions and 0 deletions

View file

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