worked on FAT32 stuff

This commit is contained in:
2021-02-21 09:33:08 +01:00
parent da12992ae8
commit 4ac72c678f
13 changed files with 494 additions and 148 deletions

View File

@@ -25,18 +25,18 @@ struct TestDevice {
}
/** read a 512 byte block into dst */
bool readSingleBlock(LBA512 addr, uint8_t* dst) {
bool readBlock(LBA512 addr, uint8_t* dst) {
memcpy(dst, buf+addr*512, 512);
return true;
}
bool writeSingleBlock(LBA512 addr, const uint8_t* src) {
bool writeBlock(LBA512 addr, const uint8_t* src) {
memcpy(buf+addr*512, src, 512);
return true;
}
void reset(uint8_t val) {
for (int i = 0; i < sizeof(buf); ++i) {buf[i] = val;}
for (uint32_t i = 0; i < sizeof(buf); ++i) {buf[i] = val;}
}
};