add thread class and mdelay

This commit is contained in:
pikastech 2021-12-08 21:41:39 +08:00
parent 9a9d523309
commit 1c497ed44d
3 changed files with 24 additions and 2 deletions

View File

@ -0,0 +1,6 @@
from PikaObj import *
class Thread(TinyObj):
def mdelay(ms: int):
pass

View 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);
}

View File

@ -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);