many many small changes

switched to the new logging here and there
some cleanups
worked  on i2S
base class for files
id3 parsing
This commit is contained in:
2021-02-28 20:44:01 +01:00
parent df77490622
commit 422610c21c
18 changed files with 307 additions and 197 deletions

View File

@@ -1,4 +1,4 @@
class File {
class File : public ::File {
static constexpr const char* NAME = "FAT32_File";
static constexpr const uint32_t F_EOF = 0xFFFFFFFF;
@@ -20,7 +20,7 @@ public:
}
/** the file's USED size */
uint32_t getSize() const {return h.getSize();}
uint32_t size() const {return h.getSize();}
/** the file's ALLOCATED size */
uint32_t getAllocatedSize() const {return clusters.size() * fs.tmp.bytesPerCluster;}
@@ -124,7 +124,7 @@ private:
int32_t _read(uint32_t readSize, uint8_t* dst) {
// EOF reached?
if (curAbsPos >= getSize()) {
if (curAbsPos >= size()) {
return F_EOF;
}
@@ -185,7 +185,7 @@ private:
curAbsPos += written;
// adjust the number of bytes used
if (this->getSize() < curAbsPos) {this->setSize(curAbsPos);}
if (this->size() < curAbsPos) {this->setSize(curAbsPos);}
return written;