Define HW serial ports needed for TMC UART (#21446)

This commit is contained in:
Scott Lahteine
2021-03-25 16:19:03 -05:00
committed by GitHub
parent 8bf6b190ff
commit 84b961cb20
10 changed files with 134 additions and 37 deletions

View File

@ -106,16 +106,16 @@ uint16_t HAL_adc_get_result() {
}
// Forward the default serial ports
#if ANY_SERIAL_IS(0)
#if USING_HW_SERIAL0
DefaultSerial1 MSerial0(false, Serial);
#endif
#if ANY_SERIAL_IS(1)
#if USING_HW_SERIAL1
DefaultSerial2 MSerial1(false, Serial1);
#endif
#if ANY_SERIAL_IS(2)
#if USING_HW_SERIAL2
DefaultSerial3 MSerial2(false, Serial2);
#endif
#if ANY_SERIAL_IS(3)
#if USING_HW_SERIAL3
DefaultSerial4 MSerial3(false, Serial3);
#endif

View File

@ -140,7 +140,7 @@ struct MarlinSerialCfg {
static constexpr bool MAX_RX_QUEUED = ENABLED(SERIAL_STATS_MAX_RX_QUEUED);
};
#if SERIAL_PORT >= 0
#if defined(SERIAL_PORT) && SERIAL_PORT >= 0
typedef Serial1Class< MarlinSerial< MarlinSerialCfg<SERIAL_PORT> > > MSerialT;
extern MSerialT customizedSerial1;
#endif