小蜜蜂单片机串口发送字符串

2019-04-15 12:03发布

void UART0_SendString(unsigned char *String, int start, int stop) { int i = 0; if (stop <= start) { stop = start; } for (i = start; i <= stop; i++) { SCON0_TI = 0; SBUF0 = String[i]; while (!SCON0_TI) ; } }