From 0b4603d581f5d9f16666f0ebc1a28f2db11c70db Mon Sep 17 00:00:00 2001 From: Jackistang Date: Sat, 14 Aug 2021 11:10:43 +0800 Subject: [workqueue] 添加了 workqueue 接口的注释 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/drivers/include/ipc/workqueue.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'components/drivers/include') diff --git a/components/drivers/include/ipc/workqueue.h b/components/drivers/include/ipc/workqueue.h index 03904d852e..8cd86896d0 100644 --- a/components/drivers/include/ipc/workqueue.h +++ b/components/drivers/include/ipc/workqueue.h @@ -67,6 +67,13 @@ rt_err_t rt_work_submit(struct rt_work *work, rt_tick_t time); rt_err_t rt_work_cancel(struct rt_work *work); #endif /* RT_USING_SYSTEM_WORKQUEUE */ +/** + * @brief Init a work item, and bind it with a callback function. + * + * @param work A pointer to work item object. + * @param work_func A callback function will be called when this work item is being executed. + * @param work_data A user data passed to the callback function as it's second parameter. + */ rt_inline void rt_work_init(struct rt_work *work, void (*work_func)(struct rt_work *work, void *work_data), void *work_data) { -- cgit v1.3.1