Просмотр исходного кода

Fix QuickStart for ESP8266

main
Bill Greiman 9 лет назад
Родитель
Сommit
d364951eb2
2 измененных файлов: 4 добавлений и 2 удалений
  1. +3
    -1
      SdFat/examples/QuickStart/QuickStart.ino
  2. +1
    -1
      SdFat/src/SdSpiCard/SdSpiESP8266.cpp

+ 3
- 1
SdFat/examples/QuickStart/QuickStart.ino Просмотреть файл

// read any existing Serial data // read any existing Serial data
while (Serial.read() >= 0) {} while (Serial.read() >= 0) {}
cout << F("\nSuccess! Type any character to restart.\n"); cout << F("\nSuccess! Type any character to restart.\n");
while (Serial.read() < 0) {}
while (Serial.read() < 0) {
SysCall::yield();
}
} }

+ 1
- 1
SdFat/src/SdSpiCard/SdSpiESP8266.cpp Просмотреть файл

* \param[in] n Number of bytes to send. * \param[in] n Number of bytes to send.
*/ */
void SdSpi::send(const uint8_t* buf , size_t n) { void SdSpi::send(const uint8_t* buf , size_t n) {
// Adjust to 32-bit alignmented.
// Adjust to 32-bit alignment.
while ((reinterpret_cast<uintptr_t>(buf) & 0X3) && n) { while ((reinterpret_cast<uintptr_t>(buf) & 0X3) && n) {
SPI.transfer(*buf++); SPI.transfer(*buf++);
n--; n--;

Загрузка…
Отмена
Сохранить