Task Application Functions
APP_TASK API Brief
Application |
Brief |
|---|---|
app task thread create |
|
send message to app_msg_q |
|
app task call back register |
APP_TASK API Reference
Header File
Functions
-
void app_task_init(void)
app_task_init brief description
application task inititial
- 返回:
N/A
-
int32_t app_task_send_msg(app_msg_type_t msg_type, uint16_t sub_type, void *p_hdl, uint32_t arg1, uint32_t arg2)
app_task_send_msg brief description
Send application message to app_task
- 参数:
msg_type – [in] message type see@app_msg_type_t
sub_type – [in] Sub type that is defined in the application module
p_hdl – [in] pointer to data buffer which pass to specific module
arg1 – [in] argument_1 which pass to specific module
arg2 – [in] argument_2 which pass to specific module
- 返回值:
0 – success
other – fail
- 返回:
result
-
int32_t app_task_register_task_cb_handler(app_task_cb_handler_t *p_cb_handler)
app_task_register_task_cb_handler brief description
Register application module callback handler that process to the app task.
- 参数:
p_cb_handler – [in] dedicated module task handler
- 返回值:
0 – success
other – fail
- 返回:
result
Structures
-
struct app_msg_env_t
application task message struct definition
Public Members
-
app_msg_type_t msg_type
message index of modules @app_msg_type_t
-
uint16_t sub_type
sub message event types
-
void *p_hdl
pointer to data buffer which pass to specific module
-
uint32_t arg1
argument_1 which pass to specific module
-
uint32_t arg2
argument_2 which pass to specific module
-
app_msg_type_t msg_type
-
struct app_task_cb_handler_t
module task handler struct definition
Public Members
-
dl_list_t dlst_node
node for appliction handler will be linked with others
-
app_msg_type_t msg_type
message index of modules @app_msg_type_t
-
app_task_cb_handler_pfn callback
function pointer for callback function
-
dl_list_t dlst_node
Macros
-
APP_MSG_BUTTON
-
APP_MSG_LED
-
APP_MSG_BT
-
APP_MSG_BLE
-
APP_FLASH_WR_DONE_MSG
-
APP_MSG_DLP
-
APP_MSG_UART_LOG_RX
-
APP_MSG_AURACAST_SRC
Type Definitions
-
typedef uint8_t app_msg_type_t
application task message definition
-
typedef void (*app_task_cb_handler_pfn)(uint16_t msg_type, void *p_hdl, uint32_t arg1, uint32_t arg2)