Browse Source

repair-software-spi

AnHardt 8 years ago
parent
commit
60ad365e21
2 changed files with 12 additions and 12 deletions
  1. 8
    8
      Marlin/Sd2Card.h
  2. 4
    4
      Marlin/SdFatConfig.h

+ 8
- 8
Marlin/Sd2Card.h View File

@@ -136,25 +136,25 @@ uint8_t const SD_CARD_TYPE_SDHC = 3;
136 136
 #if DISABLED(SOFTWARE_SPI)
137 137
   // hardware pin defs
138 138
   /** The default chip select pin for the SD card is SS. */
139
-  uint8_t const  SD_CHIP_SELECT_PIN = SS_PIN;
139
+  #define SD_CHIP_SELECT_PIN SS_PIN
140 140
   // The following three pins must not be redefined for hardware SPI.
141 141
   /** SPI Master Out Slave In pin */
142
-  uint8_t const  SPI_MOSI_PIN = MOSI_PIN;
142
+  #define SPI_MOSI_PIN MOSI_PIN
143 143
   /** SPI Master In Slave Out pin */
144
-  uint8_t const  SPI_MISO_PIN = MISO_PIN;
144
+  #define SPI_MISO_PIN MISO_PIN
145 145
   /** SPI Clock pin */
146
-  uint8_t const  SPI_SCK_PIN = SCK_PIN;
146
+  #define SPI_SCK_PIN SCK_PIN
147 147
 
148 148
 #else  // SOFTWARE_SPI
149 149
 
150 150
   /** SPI chip select pin */
151
-  uint8_t const SD_CHIP_SELECT_PIN = SOFT_SPI_CS_PIN;
151
+  #define SD_CHIP_SELECT_PIN SOFT_SPI_CS_PIN
152 152
   /** SPI Master Out Slave In pin */
153
-  uint8_t const SPI_MOSI_PIN = SOFT_SPI_MOSI_PIN;
153
+  #define SPI_MOSI_PIN SOFT_SPI_MOSI_PIN
154 154
   /** SPI Master In Slave Out pin */
155
-  uint8_t const SPI_MISO_PIN = SOFT_SPI_MISO_PIN;
155
+  #define SPI_MISO_PIN SOFT_SPI_MISO_PIN
156 156
   /** SPI Clock pin */
157
-  uint8_t const SPI_SCK_PIN = SOFT_SPI_SCK_PIN;
157
+  #define SPI_SCK_PIN SOFT_SPI_SCK_PIN
158 158
 #endif  // SOFTWARE_SPI
159 159
 //------------------------------------------------------------------------------
160 160
 /**

+ 4
- 4
Marlin/SdFatConfig.h View File

@@ -104,13 +104,13 @@
104 104
   #define USE_SOFTWARE_SPI 0
105 105
   // define software SPI pins so Mega can use unmodified 168/328 shields
106 106
   /** Software SPI chip select pin for the SD */
107
-  uint8_t const SOFT_SPI_CS_PIN = 10;
107
+  #define SOFT_SPI_CS_PIN 10
108 108
   /** Software SPI Master Out Slave In pin */
109
-  uint8_t const SOFT_SPI_MOSI_PIN = 11;
109
+  #define SOFT_SPI_MOSI_PIN 11
110 110
   /** Software SPI Master In Slave Out pin */
111
-  uint8_t const SOFT_SPI_MISO_PIN = 12;
111
+  #define SOFT_SPI_MISO_PIN 12
112 112
   /** Software SPI Clock pin */
113
-  uint8_t const SOFT_SPI_SCK_PIN = 13;
113
+  #define SOFT_SPI_SCK_PIN 13
114 114
   //------------------------------------------------------------------------------
115 115
   /**
116 116
   * The __cxa_pure_virtual function is an error handler that is invoked when

Loading…
Cancel
Save