mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
add thread class and mdelay
This commit is contained in:
parent
9a9d523309
commit
1c497ed44d
6
package/pikaRTThread/pikaRTThread.py
Normal file
6
package/pikaRTThread/pikaRTThread.py
Normal file
@ -0,0 +1,6 @@
|
||||
from PikaObj import *
|
||||
|
||||
|
||||
class Thread(TinyObj):
|
||||
def mdelay(ms: int):
|
||||
pass
|
15
package/pikaRTThread/pikaRTThread_Thread.c
Normal file
15
package/pikaRTThread/pikaRTThread_Thread.c
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-08 lyon the first version
|
||||
*/
|
||||
#include <rtthread.h>
|
||||
#include <pikaScript.h>
|
||||
|
||||
void pikaRTThread_Thread_mdelay(PikaObj *self, int ms){
|
||||
rt_thread_mdelay(ms);
|
||||
}
|
@ -5,12 +5,12 @@
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2021-12-07 lyon the first version
|
||||
* 2021-12-08 Meco Man reimplement init
|
||||
* 2021-12-07 lyon the first version
|
||||
*/
|
||||
#include <rtthread.h>
|
||||
#include <pikaScript.h>
|
||||
|
||||
|
||||
#define PIKASCRIPT_STACK_SIZE 4096
|
||||
#define PIKASCRIPT_STACK_PRIO 20
|
||||
|
||||
@ -38,4 +38,5 @@ static int rt_pika_init(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INIT_APP_EXPORT(rt_pika_init);
|
||||
|
Loading…
x
Reference in New Issue
Block a user