Refactor TMC-related macros and sanity checks (#16384)
This commit is contained in:
committed by
Scott Lahteine
parent
ac32ed74b4
commit
4e1f2f89f6
@ -55,3 +55,7 @@
|
||||
#if ENABLED(FAST_PWM_FAN)
|
||||
#error "FAST_PWM_FAN is not yet implemented for this platform."
|
||||
#endif
|
||||
|
||||
#if TMC_HAS_SW_SERIAL
|
||||
#error "TMC220x Software Serial is not supported on this platform."
|
||||
#endif
|
||||
|
@ -28,3 +28,7 @@
|
||||
#if ENABLED(FAST_PWM_FAN)
|
||||
#error "FAST_PWM_FAN is not yet implemented for this platform."
|
||||
#endif
|
||||
|
||||
#if TMC_HAS_SW_SERIAL
|
||||
#error "TMC220x Software Serial is not supported on this platform."
|
||||
#endif
|
||||
|
@ -33,3 +33,7 @@
|
||||
#if ENABLED(FAST_PWM_FAN)
|
||||
#error "FAST_PWM_FAN is not yet implemented for this platform."
|
||||
#endif
|
||||
|
||||
#if TMC_HAS_SW_SERIAL
|
||||
#error "TMC220x Software Serial is not supported on this platform."
|
||||
#endif
|
||||
|
@ -46,3 +46,7 @@
|
||||
#if ENABLED(EEPROM_SETTINGS) && NONE(SPI_EEPROM, I2C_EEPROM)
|
||||
#warning "Did you activate the SmartEEPROM? See https://github.com/GMagician/SAMD51-SmartEEprom-Activator"
|
||||
#endif
|
||||
|
||||
#if TMC_HAS_SW_SERIAL
|
||||
#error "TMC220x Software Serial is not supported on this platform."
|
||||
#endif
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -37,7 +37,7 @@
|
||||
#error "FAST_PWM_FAN is not yet implemented for this platform."
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_SW_SERIAL) && HAS_TMC220x
|
||||
#if !defined(HAVE_SW_SERIAL) && TMC_HAS_SW_SERIAL
|
||||
#warning "With TMC2208/9 consider using SoftwareSerialM with HAVE_SW_SERIAL and appropriate SS_TIMER."
|
||||
#error "Missing SoftwareSerial implementation."
|
||||
#endif
|
||||
|
@ -35,3 +35,7 @@
|
||||
#if ENABLED(FAST_PWM_FAN)
|
||||
#error "FAST_PWM_FAN is not yet implemented for this platform."
|
||||
#endif
|
||||
|
||||
#if TMC_HAS_SW_SERIAL
|
||||
#error "TMC220x Software Serial is not supported on this platform."
|
||||
#endif
|
||||
|
@ -32,3 +32,7 @@
|
||||
#if ENABLED(FAST_PWM_FAN)
|
||||
#error "FAST_PWM_FAN is not yet implemented for this platform."
|
||||
#endif
|
||||
|
||||
#if TMC_HAS_SW_SERIAL
|
||||
#error "TMC220x Software Serial is not supported on this platform."
|
||||
#endif
|
||||
|
@ -32,3 +32,7 @@
|
||||
#if ENABLED(FAST_PWM_FAN)
|
||||
#error "FAST_PWM_FAN is not yet implemented for this platform."
|
||||
#endif
|
||||
|
||||
#if TMC_HAS_SW_SERIAL
|
||||
#error "TMC220x Software Serial is not supported on this platform."
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user