mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
add rtThreadBooter
This commit is contained in:
parent
e49aca9059
commit
0d4afb2f31
27
package/RTthreadBooter/pika_config.c
Normal file
27
package/RTthreadBooter/pika_config.c
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2021-12-07 lyon the first version
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include "pikaPlatform.h"
|
||||
|
||||
/* sprintf support */
|
||||
int __platform_sprintf(char* buff, char* fmt, ...) {
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
int res = rt_vsprintf(buff, fmt, args);
|
||||
va_end(args);
|
||||
return res;
|
||||
}
|
||||
int __platform_vsprintf(char* buff, char* fmt, va_list args){
|
||||
return rt_vsprintf(buff, fmt, args);
|
||||
}
|
||||
int __platform_vsnprintf(char* buff, size_t size, const char* fmt, va_list args){
|
||||
return rt_vsnprintf(buff, size, fmt, args);
|
||||
}
|
15
package/RTthreadBooter/pika_config.h
Normal file
15
package/RTthreadBooter/pika_config.h
Normal file
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2021-12-07 lyon the first version
|
||||
*/
|
||||
#ifndef PACKAGES_PIKASCRIPT_LATEST_PIKASCRIPT_LIB_RTBOOTER_PIKA_CONFIG_H_
|
||||
#define PACKAGES_PIKASCRIPT_LATEST_PIKASCRIPT_LIB_RTBOOTER_PIKA_CONFIG_H_
|
||||
#include <rtthread.h>
|
||||
|
||||
|
||||
#endif /* PACKAGES_PIKASCRIPT_LATEST_PIKASCRIPT_LIB_RTBOOTER_PIKA_CONFIG_H_ */
|
22
package/RTthreadBooter/rt_main.c
Normal file
22
package/RTthreadBooter/rt_main.c
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2021-12-07 lyon the first version
|
||||
*/
|
||||
#include <rtthread.h>
|
||||
#include <pikaScript.h>
|
||||
|
||||
static int rt_pika_main(void)
|
||||
{
|
||||
PikaObj * pikaMain = pikaScriptInit();
|
||||
printf(">>>\r\n");
|
||||
while(1){
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
INIT_APP_EXPORT(rt_pika_main);
|
Loading…
x
Reference in New Issue
Block a user