单片机解密STC12系列的封装库 HML_FwLib_STC12 时间:2025-11-24 来源: 芯片解密 浏览:2次 字号:大 中 小 串口的示例代码单片机解密#include "hml/hml.h"void sys_init(void){ UART_configTypeDef uc; uc.baudrate = 115200; /* baud rate is 115200bps */ uc.baudrateGenerator = UART_baudrateGenerator_brt; /* select timer-1 as baud rate generator */ uc.baudGeneratorPrescalerState = DISABLE; /* 1T mode */ uc.interruptState = ENABLE; uc.interruptPriority = DISABLE; uc.mode = UART_mode_1; uc.multiBaudrate = DISABLE; uc.pinmap = UART_pinmap_0; uc.receiveState = ENABLE; UART_config(&uc);}void main(void){ sys_init(); while (true) { /* send per 500ms */ sleep(500); UART_sendString("Hello, world!\r\n"); }} 下一篇:单片机解密STC15F2K60S2单片机内部自带AD转换