mirror of
https://github.com/micropython/micropython.git
synced 2026-01-08 05:00:26 +01:00
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:
committed by
Damien George
parent
9287a1e6ea
commit
2b29b1b8f9
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user