예제 #1
0
파일: Z80IO.cpp 프로젝트: cbmeeks/CPM_Due
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
}
예제 #2
0
//------------------------------------------------------------------------------
// write cached block to the card
uint8_t writeCache(uint32_t lbn) {
  return card.writeBlock(lbn, cache.data);
}