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