Projectkk2glider/fatfs 0.12 (#3925)

* Re #3815: Disk cache: Write statistic added. Bigger disk cache. Show disk cache misses in CLI.

* Update to the latest FatFS R0.12b (all existing OpenTX patches have been already applied in upstream, only few ff.h modifications needed for simulator)

* Missing file

* SD card manager: do not show parent dir [..] for root directory
This commit is contained in:
Damjan Adamic
2016-10-18 18:14:17 +02:00
committed by Bertrand Songis
parent eb24bbacbb
commit 4513cf89f2
29 changed files with 8322 additions and 6633 deletions
+3 -2
View File
@@ -25,7 +25,7 @@
#include "sdio_sd.h"
// tunable parameters
#define DISK_CACHE_BLOCKS_NUM 8 // no cache blocks
#define DISK_CACHE_BLOCKS_NUM 32 // no cache blocks
#define DISK_CACHE_BLOCK_SECTORS 16 // no sectors
#define DISK_CACHE_BLOCK_SIZE (DISK_CACHE_BLOCK_SECTORS * BLOCK_SIZE)
@@ -50,6 +50,7 @@ struct DiskCacheStats
{
uint32_t noHits;
uint32_t noMisses;
uint32_t noWrites;
};
class DiskCache
@@ -61,7 +62,7 @@ class DiskCache
const DiskCacheStats & getStats() const;
int getHitRate() const;
void clear();
private:
DiskCacheStats stats;
uint32_t lastBlock;