Esempio n. 1
0
void WriteSDSector(unsigned long SDS, byte *fileBuffer) {
#ifdef HW_DISK_LED_ENABLE
    digitalWrite(HW_DISK_LED, HIGH);
#endif  // HW_DISK_LED_ENABLE

    if (int error = card.writeBlock(SDS, fileBuffer) == 0) {
        SerialUSB.print("SD Card write error: ");
        SerialUSB.println(error, HEX);
    }

#ifdef HW_DISK_LED_ENABLE
    digitalWrite(HW_DISK_LED, LOW);
#endif  // HW_DISK_LED_ENABLE
}
Esempio n. 2
0
//------------------------------------------------------------------------------
// write cached block to the card
uint8_t writeCache(uint32_t lbn) {
  return card.writeBlock(lbn, cache.data);
}