1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

SD: remove any reference to pinMode(10, OUTPUT) in the examples

correct SS pin setup is already handled by SPI subsystem.
this should prevent future issues like #2868

current implementation assures that:
* pin10 is OUTPUT HIGH if SPI.begin() is called and the pin was unconfigured
* pin10 state is not modified if pinMode(10, OUTPUT) is called before SPI.begin()
* pin10 is INPUT HI-Z if nor pinMode(10, OUTPUT) nor SPI.begin() are called
This commit is contained in:
Martino Facchin
2015-04-13 17:33:01 +02:00
parent ae6a5d887d
commit a57d390499
6 changed files with 0 additions and 35 deletions

View File

@ -33,11 +33,6 @@ void setup()
Serial.print("Initializing SD card...");
// On the Ethernet Shield, CS is pin 4. It's set as an output by default.
// Note that even if it's not used as the CS pin, the hardware SS pin
// (10 on most Arduino boards, 53 on the Mega) must be left as an output
// or the SD library functions will not work.
pinMode(10, OUTPUT);
if (!SD.begin(4)) {
Serial.println("initialization failed!");