int LOG_DEBUG(const char *fmt, ...)
{
int printed;
va_list args;
char send_buff[100]; //最大100个字符
memset(send_buff,'\0',100);
va_start(args, fmt);
printed = vsprintf(send_buff, fmt, args);
va_end(args);
SendStr_UARTx(send_buff);
SendStr_UARTx("\n");
return printed;
}x
SendStr_UARTx 是你自己的单片机的串口驱动程序
原型为 void SendStr_UARTx(char* str);