Refactor TMC-related macros and sanity checks (#16384)
This commit is contained in:
committed by
Scott Lahteine
parent
ac32ed74b4
commit
4e1f2f89f6
@ -28,13 +28,7 @@
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "../shared/Delay.h"
|
||||
|
||||
#if (__cplusplus == 201703L) && defined(__has_include)
|
||||
#define HAS_SWSERIAL __has_include(<SoftwareSerial.h>)
|
||||
#else
|
||||
#define HAS_SWSERIAL HAS_TMC220x
|
||||
#endif
|
||||
|
||||
#if HAS_SWSERIAL
|
||||
#if TMC_HAS_SW_SERIAL
|
||||
#include "SoftwareSerial.h"
|
||||
#endif
|
||||
|
||||
@ -93,7 +87,7 @@ void HAL_init() {
|
||||
while (!LL_PWR_IsActiveFlag_BRR());
|
||||
#endif // EEPROM_EMULATED_SRAM
|
||||
|
||||
#if HAS_SWSERIAL
|
||||
#if TMC_HAS_SW_SERIAL
|
||||
SoftwareSerial::setInterruptPriority(SWSERIAL_TIMER_IRQ_PRIO, 0);
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user