Merge pull request #109 from mysterywolf/master

update for RT-Thread v4.1.0
This commit is contained in:
朱天龙 (Armink) 2021-12-04 14:08:19 +08:00 committed by GitHub
commit bf3ac9ecaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 10 deletions

View File

@ -30,6 +30,15 @@
#define FAL_SW_VERSION "0.5.0"
#ifdef __RTTHREAD__ /* for RT-Thread platform */
#include <rtthread.h>
#define FAL_PRINTF rt_kprintf
#define FAL_MALLOC rt_malloc
#define FAL_CALLOC rt_calloc
#define FAL_REALLOC rt_realloc
#define FAL_FREE rt_free
#endif
#ifndef FAL_MALLOC
#define FAL_MALLOC malloc
#endif
@ -46,20 +55,14 @@
#define FAL_FREE free
#endif
#ifndef FAL_PRINTF
#define FAL_PRINTF printf
#endif
#ifndef FAL_DEBUG
#define FAL_DEBUG 0
#endif
#ifndef FAL_PRINTF
#ifdef RT_VER_NUM
/* for RT-Thread platform */
extern void rt_kprintf(const char *fmt, ...);
#define FAL_PRINTF rt_kprintf
#else
#define FAL_PRINTF printf
#endif /* RT_VER_NUM */
#endif /* FAL_PRINTF */
#if FAL_DEBUG
#ifdef assert
#undef assert