clean up, replace cprintf by std printf (with _write hook)

This commit is contained in:
hathach committed 2018-11-02 20:17:33 +07:00
1 parent ebbed82c5a
commit 123c3080c3
7 files changed
+63 -76

No files matched your search

@@ -255,14 +255,14 @@ void bond_print_list(uint8_t role)
char devname[len];
file.read(devname, len);
cprintf(" %s : %s (%d bytes)\n", file.name(), devname, file.size());
printf(" %s : %s (%d bytes)\n", file.name(), devname, file.size());
}
}
file.close();
}
cprintf("\n");
printf("\n");
file.close();
dir.close();
+3 -4
View File
@@ -41,7 +41,6 @@
#if !defined(LFS_NO_DEBUG) || !defined(LFS_NO_WARN) || !defined(LFS_NO_ERROR)
#include <stdio.h>
int cprintf (const char * format, ...);
#endif
#ifdef __cplusplus
@@ -57,21 +56,21 @@ extern "C"
// Logging functions
#ifndef LFS_NO_DEBUG
#define LFS_DEBUG(fmt, ...) \
cprintf("lfs debug:%d: " fmt "\n", __LINE__, __VA_ARGS__)
printf("lfs debug:%d: " fmt "\n", __LINE__, __VA_ARGS__)
#else
#define LFS_DEBUG(fmt, ...)
#endif
#ifndef LFS_NO_WARN
#define LFS_WARN(fmt, ...) \
cprintf("lfs warn:%d: " fmt "\n", __LINE__, __VA_ARGS__)
printf("lfs warn:%d: " fmt "\n", __LINE__, __VA_ARGS__)
#else
#define LFS_WARN(fmt, ...)
#endif
#ifndef LFS_NO_ERROR
#define LFS_ERROR(fmt, ...) \
cprintf("lfs error:%d: " fmt "\n", __LINE__, __VA_ARGS__)
printf("lfs error:%d: " fmt "\n", __LINE__, __VA_ARGS__)
#else
#define LFS_ERROR(fmt, ...)
#endif