From c2fc78c3a854c06e6e65ae95cbbd2693c7a84e75 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 22 Nov 2017 16:28:40 -0600 Subject: [PATCH] #ifndef => #if !PIN_EXISTS --- Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp | 2 +- Marlin/src/HAL/HAL_TEENSY35_36/HAL_spi_Teensy.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp b/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp index fc1bfb7550..cfada2f615 100644 --- a/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp +++ b/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp @@ -76,7 +76,7 @@ static SPISettings spiConfig; * @details Only configures SS pin since libmaple creates and initialize the SPI object */ void spiBegin() { - #ifndef SS_PIN + #if !PIN_EXISTS(SS) #error "SS_PIN not defined!" #endif SET_OUTPUT(SS_PIN); diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_spi_Teensy.cpp b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_spi_Teensy.cpp index 083282ce0c..17239df47d 100644 --- a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_spi_Teensy.cpp +++ b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_spi_Teensy.cpp @@ -11,7 +11,7 @@ static SPISettings spiConfig; // Standard SPI functions /** Initialise SPI bus */ void spiBegin(void) { - #ifndef SS_PIN + #if !PIN_EXISTS(SS) #error SS_PIN not defined! #endif SET_OUTPUT(SS_PIN); @@ -21,7 +21,7 @@ void spiBegin(void) { SET_OUTPUT(MOSI_PIN); //#if DISABLED(SOFTWARE_SPI) - #if false + #if 0 // set SS high - may be chip select for another SPI device #if SET_SPI_SS_HIGH WRITE(SS_PIN, HIGH);