mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
commit
af40a2e885
@ -11,11 +11,11 @@
|
||||
#include <rtthread.h>
|
||||
#include "pikaPlatform.h"
|
||||
|
||||
/* sprintf support */
|
||||
int __platform_sprintf(char* buff, char* fmt, ...) {
|
||||
va_list args;
|
||||
int res;
|
||||
va_start(args, fmt);
|
||||
int res = rt_vsprintf(buff, fmt, args);
|
||||
res = rt_vsprintf(buff, fmt, args);
|
||||
va_end(args);
|
||||
return res;
|
||||
}
|
||||
|
@ -11,5 +11,6 @@
|
||||
#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_ */
|
||||
|
@ -56,12 +56,15 @@ PIKA_WEAK void __quick_malloc_disable(void) {}
|
||||
PIKA_WEAK uint8_t __is_locked_pikaMemory(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef __platform_printf
|
||||
PIKA_WEAK void __platform_printf(char* fmt, ...) {
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
vprintf(fmt, args);
|
||||
va_end(args);
|
||||
}
|
||||
#endif
|
||||
|
||||
PIKA_WEAK int __platform_sprintf(char* buff, char* fmt, ...) {
|
||||
va_list args;
|
||||
|
Loading…
x
Reference in New Issue
Block a user