worked on FileSystem, started to migrate logging class

This commit is contained in:
2021-02-14 15:29:21 +01:00
parent faf6e55bc5
commit 6aa951190e
19 changed files with 612 additions and 241 deletions

26
ext/sd/tests/Helper.h Normal file
View File

@@ -0,0 +1,26 @@
#pragma once
#define PLATFORM DESKTOP
#include "../Types.h"
struct TestDevice {
uint8_t buf[4096];
/** read a 512 byte block into dst */
bool readSingleBlock(LBA512 addr, uint8_t* dst) {
memcpy(dst, buf+addr*512, 512);
return true;
}
bool writeSingleBlock(LBA512 addr, 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;}
}
};