Browse Source

SD2Card cleanup (#14571)

Giuliano Zaro 4 years ago
parent
commit
caa87d5fe1
2 changed files with 2 additions and 6 deletions
  1. 1
    1
      Marlin/src/sd/Sd2Card.cpp
  2. 1
    5
      Marlin/src/sd/Sd2Card.h

+ 1
- 1
Marlin/src/sd/Sd2Card.cpp View File

@@ -227,7 +227,7 @@ bool Sd2Card::eraseSingleBlockEnable() {
227 227
  * \return true for success, false for failure.
228 228
  * The reason for failure can be determined by calling errorCode() and errorData().
229 229
  */
230
-bool Sd2Card::init(const uint8_t sckRateID/*=0*/, const pin_t chipSelectPin/*=SD_CHIP_SELECT_PIN*/) {
230
+bool Sd2Card::init(const uint8_t sckRateID, const pin_t chipSelectPin) {
231 231
   errorCode_ = type_ = 0;
232 232
   chipSelectPin_ = chipSelectPin;
233 233
   // 16-bit init start time allows over a minute

+ 1
- 5
Marlin/src/sd/Sd2Card.h View File

@@ -85,10 +85,6 @@ uint8_t const SD_CARD_TYPE_SD1  = 1,                    // Standard capacity V1
85 85
 #elif USE_SOFTWARE_SPI
86 86
   #define SOFTWARE_SPI
87 87
 #endif  // MEGA_SOFT_SPI
88
-//------------------------------------------------------------------------------
89
-// SPI pin definitions - do not edit here - change in SdFatConfig.h
90
-//
91
-#define SD_CHIP_SELECT_PIN SS_PIN
92 88
 
93 89
 /**
94 90
  * \class Sd2Card
@@ -123,7 +119,7 @@ public:
123 119
    *
124 120
    * \return true for success or false for failure.
125 121
    */
126
-  bool init(const uint8_t sckRateID=SPI_FULL_SPEED, const pin_t chipSelectPin=SD_CHIP_SELECT_PIN);
122
+  bool init(const uint8_t sckRateID, const pin_t chipSelectPin);
127 123
 
128 124
   bool readBlock(uint32_t block, uint8_t* dst);
129 125
 

Loading…
Cancel
Save