ZoneStar Z6FB (#18918)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
wmariz
2020-08-07 19:03:59 -03:00
committed by Scott Lahteine
parent cd977c70ca
commit cb18b858d4
12 changed files with 340 additions and 68 deletions

View File

@ -240,8 +240,15 @@ bool Sd2Card::init(const uint8_t sckRateID, const pin_t chipSelectPin) {
watchdog_refresh(); // In case init takes too long
// Set pin modes
extDigitalWrite(chipSelectPin_, HIGH); // For some CPUs pinMode can write the wrong data so init desired data value first
pinMode(chipSelectPin_, OUTPUT); // Solution for #8746 by @benlye
#if ENABLED(ZONESTAR_12864OLED)
if (chipSelectPin_ != DOGLCD_CS) {
SET_OUTPUT(DOGLCD_CS);
WRITE(DOGLCD_CS, HIGH);
}
#else
extDigitalWrite(chipSelectPin_, HIGH); // For some CPUs pinMode can write the wrong data so init desired data value first
pinMode(chipSelectPin_, OUTPUT); // Solution for #8746 by @benlye
#endif
spiBegin();
// Set SCK rate for initialization commands