1.12 如何新建用户任务模块?
1.12.1 新建任务步骤
1)新建2个文件 user_task.c 和user_task.h
调用模块user_task.h文件,如:
#if (!EXCLUDE_DLG_USER_APP)
#include “user_task.h”
#endif
2)在app_process_handlers中注册如下:
const process_event_func_t app_process_handlers[] = {
…
#if (!EXCLUDE_DLG_USER_APP)
(process_event_func_t) app_user_process_handler,
#endif
…
}
3)user_task.c中做任务处理接口 app_user_process_handler 和 任务发送 user_task_Button_message
1.12.2代码展示
/**
- @brief The actual timer handler that calls the user callback.
- @param[in] msgid Id of the message received
- @param[in] param No parameters are required <