|
int | luat_rtos_task_create (luat_rtos_task_handle *task_handle, uint32_t stack_size, uint8_t priority, const char *task_name, luat_rtos_task_entry task_fun, void *user_data, uint16_t event_cout) |
| 创建一个可以带mailbox机制的task,mailbox是message和event的基础,但是和queue无关
|
|
int | luat_rtos_task_delete (luat_rtos_task_handle task_handle) |
| 删除task
|
|
int | luat_rtos_task_suspend (luat_rtos_task_handle task_handle) |
| 挂起某个task
|
|
int | luat_rtos_task_resume (luat_rtos_task_handle task_handle) |
| 恢复挂起的task
|
|
void | luat_rtos_task_suspend_all (void) |
| 挂起全部task
|
|
void | luat_rtos_task_resume_all (void) |
| 恢复全部task
|
|
void | luat_rtos_task_sleep (uint32_t ms) |
| task休眠一段时间
|
|
luat_rtos_task_handle | luat_rtos_get_current_handle (void) |
| 获取当前task的句柄
|
|
uint32_t | luat_rtos_task_get_high_water_mark (luat_rtos_task_handle task_handle) |
| 获取task堆栈剩余的最小值,叫做“高水位线”
|
|
void | luat_rtos_task_run_time_record_enable (void) |
| 启动task运行时间记录功能,必须在task调度前启用
|
|
void | luat_rtos_task_run_time_record_print (uint8_t print_ticks) |
| 打印所有task运行时间和占用百分比
|
|
int | luat_rtos_event_send (luat_rtos_task_handle task_handle, uint32_t id, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t timeout) |
| 发送一个event给task的mailbox,只有设置了mailbox启用的task能接收,如果缓存了超过1024个event会断言
|
|
int | luat_rtos_event_recv (luat_rtos_task_handle task_handle, uint32_t wait_event_id, luat_event_t *out_event, luat_rtos_event_wait_callback_t *callback_fun, uint32_t timeout) |
| 接收一个event,只能在task里接收
|
|
int | luat_rtos_message_send (luat_rtos_task_handle task_handle, uint32_t message_id, void *p_message) |
| 发送一个message给task的mailbox,只有设置了mailbox启用的task能接收,message可以动态创建的,可以任意大小,如果缓存了超过1024个message会断言
|
|
int | luat_rtos_message_recv (luat_rtos_task_handle task_handle, uint32_t *message_id, void **p_p_message, uint32_t timeout) |
| 接收一个message,只能在task里接收
|
|
int | luat_rtos_semaphore_create (luat_rtos_semaphore_t *semaphore_handle, uint32_t init_count) |
| 信号量创建,可以在中断中release
|
|
int | luat_rtos_semaphore_delete (luat_rtos_semaphore_t semaphore_handle) |
| 删除信号量
|
|
int | luat_rtos_semaphore_take (luat_rtos_semaphore_t semaphore_handle, uint32_t timeout) |
| 信号量等待获取
|
|
int | luat_rtos_semaphore_release (luat_rtos_semaphore_t semaphore_handle) |
| 信号量释放发送
|
|
int | luat_rtos_mutex_create (luat_rtos_mutex_t *mutex_handle) |
| 互斥锁创建,不能在中断中unlock
|
|
int | luat_rtos_mutex_lock (luat_rtos_mutex_t mutex_handle, uint32_t timeout) |
| 获得锁
|
|
int | luat_rtos_mutex_unlock (luat_rtos_mutex_t mutex_handle) |
| 释放锁
|
|
int | luat_rtos_mutex_delete (luat_rtos_mutex_t mutex_handle) |
| 删除互斥锁
|
|
int | luat_rtos_queue_create (luat_rtos_queue_t *queue_handle, uint32_t item_count, uint32_t item_size) |
| 创建队列
|
|
int | luat_rtos_queue_delete (luat_rtos_queue_t queue_handle) |
| 删除队列
|
|
int | luat_rtos_queue_send (luat_rtos_queue_t queue_handle, void *item, uint32_t item_size, uint32_t timeout) |
| 往队列里发送一个元素
|
|
int | luat_rtos_queue_recv (luat_rtos_queue_t queue_handle, void *item, uint32_t item_size, uint32_t timeout) |
| 从队列里取出一个元素
|
|
int | luat_rtos_queue_get_cnt (luat_rtos_queue_t queue_handle, uint32_t *item_cnt) |
| 查询队列中剩余未处理的元素数量
|
|
int | luat_rtos_flag_create (luat_rtos_flag_t *flag_handle) |
| 创建事件
|
|
int | luat_rtos_flag_wait (luat_rtos_flag_t flag_handle, uint32_t mask, LUAT_FLAG_OP_E operation, uint32_t *flags, uint32_t timeout) |
| 等待事件
|
|
int | luat_rtos_flag_release (luat_rtos_flag_t flag_handle, uint32_t mask, LUAT_FLAG_OP_E operation) |
| 设置事件
|
|
int | luat_rtos_flag_delete (luat_rtos_flag_t flag_handle) |
| 删除事件
|
|
int | luat_rtos_timer_create (luat_rtos_timer_t *timer_handle) |
| 创建软件定时器
|
|
int | luat_rtos_timer_delete (luat_rtos_timer_t timer_handle) |
| 删除软件定时器
|
|
int | luat_rtos_timer_start (luat_rtos_timer_t timer_handle, uint32_t timeout, uint8_t repeat, luat_rtos_timer_callback_t callback_fun, void *user_param) |
| 启动软件定时器
|
|
int | luat_rtos_timer_stop (luat_rtos_timer_t timer_handle) |
| 停止软件定时器
|
|
int | luat_rtos_timer_is_active (luat_rtos_timer_t timer_handle) |
| 检测软件定时器是否处于激活状态
|
|
uint32_t | luat_rtos_entry_critical (void) |
| 进入临界保护
|
|
void | luat_rtos_exit_critical (uint32_t critical) |
| 退出临界保护
|
|
uint32_t | luat_rtos_get_ipsr (void) |
| 获取是否为中断
|
|