File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,22 @@ uint64_t SDFS::cardSize()
7575 return (uint64_t )sectors * sectorSize;
7676}
7777
78+ size_t SDFS::numSectors ()
79+ {
80+ if (_pdrv == 0xFF ) {
81+ return 0 ;
82+ }
83+ return sdcard_num_sectors (_pdrv);
84+ }
85+
86+ size_t SDFS::sectorSize ()
87+ {
88+ if (_pdrv == 0xFF ) {
89+ return 0 ;
90+ }
91+ return sdcard_sector_size (_pdrv);
92+ }
93+
7894uint64_t SDFS::totalBytes ()
7995{
8096 FATFS* fsinfo;
Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ class SDFS : public FS
3232 void end ();
3333 sdcard_type_t cardType ();
3434 uint64_t cardSize ();
35+ size_t numSectors ();
36+ size_t sectorSize ();
3537 uint64_t totalBytes ();
3638 uint64_t usedBytes ();
3739 bool readRAW (uint8_t * buffer, uint32_t sector);
You can’t perform that action at this time.
0 commit comments