Browse Source

#ifndef => #if !PIN_EXISTS

Scott Lahteine 6 years ago
parent
commit
c2fc78c3a8

+ 1
- 1
Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp View File

@@ -76,7 +76,7 @@ static SPISettings spiConfig;
76 76
  * @details Only configures SS pin since libmaple creates and initialize the SPI object
77 77
  */
78 78
 void spiBegin() {
79
-  #ifndef SS_PIN
79
+  #if !PIN_EXISTS(SS)
80 80
     #error "SS_PIN not defined!"
81 81
   #endif
82 82
   SET_OUTPUT(SS_PIN);

+ 2
- 2
Marlin/src/HAL/HAL_TEENSY35_36/HAL_spi_Teensy.cpp View File

@@ -11,7 +11,7 @@ static SPISettings spiConfig;
11 11
 // Standard SPI functions
12 12
 /** Initialise SPI bus */
13 13
 void spiBegin(void) {
14
-  #ifndef SS_PIN
14
+  #if !PIN_EXISTS(SS)
15 15
     #error SS_PIN not defined!
16 16
   #endif
17 17
   SET_OUTPUT(SS_PIN);
@@ -21,7 +21,7 @@ void spiBegin(void) {
21 21
   SET_OUTPUT(MOSI_PIN);
22 22
 
23 23
   //#if DISABLED(SOFTWARE_SPI)
24
-  #if false
24
+  #if 0
25 25
     // set SS high - may be chip select for another SPI device
26 26
     #if SET_SPI_SS_HIGH
27 27
       WRITE(SS_PIN, HIGH);

Loading…
Cancel
Save