mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-24 03:27:45 +08:00
添加了回调任务的支持,允许bsp将回调函数设置为在中断中唤醒任务而不是直接执行,有助于提高实时性
This commit is contained in:
13
bsp/bsp_tools.h
Normal file
13
bsp/bsp_tools.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#include "cmsis_os.h"
|
||||
#include "bsp_log.h"
|
||||
|
||||
/**
|
||||
* @brief 创建一个新的任务,该任务收到osSignalSet信号时会被唤醒,否则保持挂起状态
|
||||
*
|
||||
* @param name 任务名称,注意以'\0'结尾
|
||||
* @param cbk 回调函数指针
|
||||
* @param ins 回调函数的参数,bsp为实例指针
|
||||
* @param priority 任务优先级,决定了在中断结束后能否保证立刻执行
|
||||
* @return uint32_t 信号量,用于唤醒该任务
|
||||
*/
|
||||
uint32_t CreateCallbackTask(char *name, void *cbk, void *ins, osPriority priority);
|
||||
Reference in New Issue
Block a user