1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-13 13:01:55 +03:00
- optimize SPI usage 148% write speed (24kB/s -> 37kB/s) and 127% read speed (121kB/s -> 155kB/s) at 8MHz
 - add clock frequency as parameter for begin(csPin, frequency)
 - SD @80MHz write: 84kB/s read: 231kB/s

SPI add functions:
 - void write32(uint32_t data);
 - void write32(uint32_t data, bool msb);
 - void transferBytes(uint8_t * out, uint8_t * in, uint32_t size);

Adafruit_ILI9341:
 - code clean
This commit is contained in:
Markus Sattler
2015-05-10 17:34:16 +02:00
parent 539aa19305
commit 27f45a205a
5 changed files with 135 additions and 20 deletions

View File

@ -326,13 +326,7 @@ boolean callback_rmdir(SdFile& parentDir, char *filePathComponent,
return true;
}
/* Implementation of class used to create `SDCard` object. */
boolean SDClass::begin(uint8_t csPin) {
boolean SDClass::begin(uint8_t csPin, uint32_t sckRateID) {
/*
Performs the initialisation required by the sdfatlib library.
@ -340,13 +334,11 @@ boolean SDClass::begin(uint8_t csPin) {
Return true if initialization succeeds, false otherwise.
*/
return card.init(SPI_HALF_SPEED, csPin) &&
return card.init(sckRateID, csPin) &&
volume.init(card) &&
root.openRoot(volume);
}
// this little helper is used to traverse paths
SdFile SDClass::getParentDir(const char *filepath, int *index) {
// get parent directory