|
|
@ -53,8 +53,8 @@ extern uint8_t marlin_debug_flags; |
|
|
|
#define _PORT_REDIRECT(n,p) REMEMBER(n,serial_port_index,p) |
|
|
|
#define _PORT_RESTORE(n) RESTORE(n) |
|
|
|
#define SERIAL_OUT(WHAT, V...) do{ \ |
|
|
|
if (!serial_port_index || serial_port_index == SERIAL_BOTH) (void)MYSERIAL0.WHAT(V); \ |
|
|
|
if ( serial_port_index) (void)MYSERIAL1.WHAT(V); \ |
|
|
|
if (!serial_port_index || serial_port_index == SERIAL_BOTH || serial_port_index == -1) (void)MYSERIAL0.WHAT(V); \ |
|
|
|
if ( serial_port_index ) (void)MYSERIAL1.WHAT(V); \ |
|
|
|
}while(0) |
|
|
|
#define SERIAL_ASSERT(P) if(serial_port_index!=(P)){ debugger(); } |
|
|
|
#else |
|
|
@ -69,7 +69,7 @@ extern uint8_t marlin_debug_flags; |
|
|
|
|
|
|
|
#if ENABLED(MKS_WIFI) |
|
|
|
#define SERIAL_ECHO(x) do{ \ |
|
|
|
if (!serial_port_index || serial_port_index == SERIAL_BOTH) SERIAL_OUT(print, x); \ |
|
|
|
if (!serial_port_index || serial_port_index == SERIAL_BOTH || serial_port_index == -1 ) SERIAL_OUT(print, x); \ |
|
|
|
if ( serial_port_index) mks_wifi_print(x); \ |
|
|
|
}while(0) |
|
|
|
#else |
|
|
@ -80,7 +80,7 @@ extern uint8_t marlin_debug_flags; |
|
|
|
|
|
|
|
#if ENABLED(MKS_WIFI) |
|
|
|
#define SERIAL_ECHOLN(x) do{ \ |
|
|
|
if (!serial_port_index || serial_port_index == SERIAL_BOTH) SERIAL_OUT(println, x); \ |
|
|
|
if (!serial_port_index || serial_port_index == SERIAL_BOTH || serial_port_index == -1) SERIAL_OUT(println, x); \ |
|
|
|
if ( serial_port_index) mks_wifi_println(x); \ |
|
|
|
}while(0) |
|
|
|
#else |
|
|
@ -116,7 +116,7 @@ extern uint8_t marlin_debug_flags; |
|
|
|
|
|
|
|
#if ENABLED(MKS_WIFI) |
|
|
|
#define SERIAL_CHAR(V...) do{ \ |
|
|
|
if (!serial_port_index || serial_port_index == SERIAL_BOTH) _CHAR_N(NUM_ARGS(V),V); \ |
|
|
|
if (!serial_port_index || serial_port_index == SERIAL_BOTH || serial_port_index == -1) _CHAR_N(NUM_ARGS(V),V); \ |
|
|
|
if ( serial_port_index) mks_wifi_print_var(NUM_ARGS(V),V); \ |
|
|
|
}while(0) |
|
|
|
#else |
|
|
|