Teensy 4.1 Ethernet support (#19801)

This commit is contained in:
bilsef
2020-10-20 12:35:29 -07:00
committed by Scott Lahteine
parent 53a4b8fa33
commit c6f17ac01e
15 changed files with 478 additions and 11 deletions

View File

@ -23,6 +23,10 @@
#include "../inc/MarlinConfig.h"
#if HAS_ETHERNET
#include "../feature/ethernet.h"
#endif
/**
* Define debug bit-masks
*/
@ -56,8 +60,9 @@ extern uint8_t marlin_debug_flags;
#define SERIAL_OUT(WHAT, V...) (void)CAT(MYSERIAL,SERIAL_CATCHALL).WHAT(V)
#else
#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); \
const bool port2_open = TERN1(HAS_ETHERNET, ethernet.have_telnet_client); \
if ( serial_port_index == 0 || serial_port_index == SERIAL_BOTH) (void)MYSERIAL0.WHAT(V); \
if ((serial_port_index == 1 || serial_port_index == SERIAL_BOTH) && port2_open) (void)MYSERIAL1.WHAT(V); \
}while(0)
#endif