int8_t STORAGE_Read (uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len) { #if defined(BOOT) if (lun == 1) { if (fat12Read(buf, blk_addr, blk_len) != 0) return -1; } else #endif { if (SD_ReadSectors(buf, blk_addr, blk_len) != 0) { return -1; } } return 0; }
int8_t STORAGE_Read (uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len) { if (lun == 1) { if (fat12Read(buf, blk_addr, blk_len) != 0) { return -1; } } else { if (SD_ReadSectors(buf, blk_addr, blk_len) != 0) { return -1; } } return 0; }