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:
@@ -75,7 +75,7 @@ namespace FAT32 {
|
||||
bool hasExtension(const char* ext) const {
|
||||
const size_t len = strlen(ext);
|
||||
if (len > 3) {return false;}
|
||||
for (int i = 0; i < len; ++i) {
|
||||
for (size_t i = 0; i < len; ++i) {
|
||||
if (asciitolower(entry.ext[i]) != asciitolower(ext[i])) {return false;}
|
||||
}
|
||||
for (int i = len; i < 3; ++i) {
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
#include "Structs.h"
|
||||
#include "DirHandle.h"
|
||||
|
||||
#include "../../../Debug.h"
|
||||
|
||||
#include "../File.h"
|
||||
|
||||
// https://www.pjrc.com/tech/8051/ide/fat32.html
|
||||
namespace FAT32 {
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user