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-24 05:40:03 +0300
committerChristopher Haster <chaster@utexas.edu>2017-04-24 05:40:03 +0300
commit5790ec2ce4279f2ca805e33f6f514fbe9e06aeb0 (patch)
tree6fbef93dd176699e77aac2052fb2a90cc3e6c7c7 /lfs_util.h
parentba8afb9d924ff40054c73f8430aa16b6eb7b1bac (diff)
Structured some of the bulk of the codebase
- Removed lfs_config.h, distributed between lfs.h and lfs_util.h - Moved some functions that felt out of place
Diffstat (limited to 'lfs_util.h')
-rw-r--r--lfs_util.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/lfs_util.h b/lfs_util.h
index c20312c..533ef11 100644
--- a/lfs_util.h
+++ b/lfs_util.h
@@ -7,8 +7,9 @@
#ifndef LFS_UTIL_H
#define LFS_UTIL_H
-#include "lfs_config.h"
#include <stdlib.h>
+#include <stdint.h>
+#include <stdio.h>
// Builtin functions
@@ -32,7 +33,13 @@ static inline int lfs_scmp(uint32_t a, uint32_t b) {
return (int)(unsigned)(a - b);
}
-uint32_t lfs_crc(uint32_t crc, lfs_size_t size, const void *buffer);
+uint32_t lfs_crc(uint32_t crc, size_t size, const void *buffer);
+
+
+// Logging functions
+#define LFS_DEBUG(fmt, ...) printf("lfs debug: " fmt "\n", __VA_ARGS__)
+#define LFS_WARN(fmt, ...) printf("lfs warn: " fmt "\n", __VA_ARGS__)
+#define LFS_ERROR(fmt, ...) printf("lfs error: " fmt "\n", __VA_ARGS__)
#endif