lib/littlefs: Reuse existing CRC32 function to save space.

Getting this to work required fixing a small issue in `lfs2_util.h`, which
has been submitted upstream.

Signed-off-by: Daniël van de Giessen <daniel@dvdgiessen.nl>
This commit is contained in:
Daniël van de Giessen
2025-04-16 18:26:37 +02:00
committed by Damien George
parent 9287a1e6ea
commit 2b29b1b8f9
3 changed files with 15 additions and 3 deletions

View File

@@ -231,8 +231,8 @@ static inline uint32_t lfs2_tobe32(uint32_t a) {
// Calculate CRC-32 with polynomial = 0x04c11db7
#ifdef LFS2_CRC
uint32_t lfs2_crc(uint32_t crc, const void *buffer, size_t size) {
return LFS2_CRC(crc, buffer, size)
static inline uint32_t lfs2_crc(uint32_t crc, const void *buffer, size_t size) {
return LFS2_CRC(crc, buffer, size);
}
#else
uint32_t lfs2_crc(uint32_t crc, const void *buffer, size_t size);