update for RT-Thread v4.1.0

This commit is contained in:
Man, Jianting (Meco) 2021-12-04 00:33:10 -05:00 committed by GitHub
parent fad201a4d8
commit feb5ed4cb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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