1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

SPI: writePattern() should not call setDataBits(0)

resolves #8635
This commit is contained in:
Max Prokhorov 2022-07-14 14:55:10 +03:00 committed by GitHub
parent a2982f96a4
commit c3cd83ba12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -515,9 +515,11 @@ void SPIClass::writePattern(const uint8_t * data, uint8_t size, uint32_t repeat)
}
}
//End orig
if (repeatRem) {
setDataBits(repeatRem * 8);
SPI1CMD |= SPIBUSY;
while(SPI1CMD & SPIBUSY) {}
}
SPI1U = SPIUMOSI | SPIUDUPLEX | SPIUSSE;
}