Marlin 2.0 for Flying Bear 4S/5
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#include "debug_to_uart.h"
|
|
|
|
|
|
|
|
#ifdef DEBUG_TO_UART
|
|
|
|
|
|
|
|
void debug_to_uart(char *fmt,...){
|
|
|
|
|
|
|
|
char buffer[200];
|
|
|
|
va_list ParamList;
|
|
|
|
char *ptr = (char *)buffer;
|
|
|
|
|
|
|
|
buffer[0] = ';';
|
|
|
|
buffer[1] = ' ';
|
|
|
|
|
|
|
|
va_start(ParamList, fmt);
|
|
|
|
vsnprintf (buffer+2, 199, fmt, ParamList);
|
|
|
|
va_end(ParamList);
|
|
|
|
|
|
|
|
//SERIAL_ECHOLN((char *)&buffer);
|
|
|
|
|
|
|
|
while(*ptr){
|
|
|
|
while(MYSERIAL0.availableForWrite()==0){
|
|
|
|
safe_delay(10);
|
|
|
|
}
|
|
|
|
MYSERIAL0.write(*ptr++);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
#endif
|