Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/littlefs-project/littlefs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Haster <chaster@utexas.edu>2017-04-22 21:30:40 +0300
committerChristopher Haster <chaster@utexas.edu>2017-04-23 00:00:40 +0300
commit7050922623d4596ffeb8d6f431fbd3d4e8d6d840 (patch)
tree6c12456f8a473c4831974035dca1f66fbcffc4b4 /lfs_util.h
parent789286a25748649f46afebec6566d00763a0074e (diff)
Added optional block-level caching
This adds caching of the most recent read/program blocks, allowing support of devices that don't have byte-level read+writes, along with reduced device access on devices that do support byte-level read+writes. Note: The current implementation is a bit eager to drop caches where it simplifies the cache layer. This layer is already complex enough. Note: It may be worthwhile to add a compile switch for caching to reduce code size, note sure. Note: This does add a dependency on malloc, which could have a porting layer, but I'm just using the functions from stdlib for now. These can be overwritten with noops if the user controls the system, and keeps things simple for now.
Diffstat (limited to 'lfs_util.h')
-rw-r--r--lfs_util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lfs_util.h b/lfs_util.h
index 83273a4..c20312c 100644
--- a/lfs_util.h
+++ b/lfs_util.h
@@ -8,6 +8,7 @@
#define LFS_UTIL_H
#include "lfs_config.h"
+#include <stdlib.h>
// Builtin functions
@@ -34,5 +35,4 @@ static inline int lfs_scmp(uint32_t a, uint32_t b) {
uint32_t lfs_crc(uint32_t crc, lfs_size_t size, const void *buffer);
-
#endif