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>2018-08-07 22:59:44 +0300
committerChristopher Haster <chaster@utexas.edu>2018-10-17 04:53:19 +0300
commit10f45ac02f246c44b066d85dacd7cb43c0b7a521 (patch)
tree1c4b9d90b7321ce02cf59872b8ae401d54185eb6 /lfs_util.h
parent3b3981eb7468714d1c938b52a13a20f003d8ae1d (diff)
Changed lfs_crc to match more common API
In looking at the common CRC APIs out there, this seemed the most common. At least more common than the current modified-in-place pointer API. It also seems to have a slightly better code footprint. I'm blaming pointer optimization issues. One downside is that lfs_crc can't report errors, however it was already assumed that lfs_crc can not error.
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 ed55a1c..80b4002 100644
--- a/lfs_util.h
+++ b/lfs_util.h
@@ -187,7 +187,7 @@ static inline uint32_t lfs_alignup(uint32_t a, uint32_t alignment) {
}
// Calculate CRC-32 with polynomial = 0x04c11db7
-void lfs_crc(uint32_t *crc, const void *buffer, size_t size);
+uint32_t lfs_crc(uint32_t crc, const void *buffer, size_t size);
// Allocate memory, only used if buffers are not provided to littlefs
static inline void *lfs_malloc(size_t size) {