Merge pull request #13 from mysterywolf/master

replace printf for rt-thread
This commit is contained in:
Lyon 2021-12-09 00:22:06 +08:00 committed by GitHub
commit b13d91510e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -11,6 +11,4 @@
#define PACKAGES_PIKASCRIPT_LATEST_PIKASCRIPT_LIB_RTBOOTER_PIKA_CONFIG_H_
#include <rtthread.h>
#define __platform_printf(...) rt_kprintf(__VA_ARGS__)
#endif /* PACKAGES_PIKASCRIPT_LATEST_PIKASCRIPT_LIB_RTBOOTER_PIKA_CONFIG_H_ */

View File

@ -40,6 +40,10 @@
#define PIKA_WEAK __attribute__((weak))
#endif
#ifdef __RTTHREAD__
#define __platform_printf(...) rt_kprintf(__VA_ARGS__)
#endif
/* The following functions are can be
overrided to config pikaScript. */
@ -53,8 +57,10 @@ uint8_t __platform_Asm_is_to_flash(char* pyMultiLine);
int32_t __platform_save_pikaAsm_EOF(void);
char* __platform_load_pikaAsm(void);
/* printf */
/* printf family */
#ifndef __platform_printf
void __platform_printf(char* fmt, ...);
#endif
int __platform_sprintf(char* buff, char* fmt, ...);
int __platform_vsprintf(char* buff, char* fmt, va_list args);
int __platform_vsnprintf(char* buff,