TWS Task Functions
TWS_TASK API Brief
Application |
Brief |
|---|---|
Send message to TWS task |
|
Get TWS task handle |
|
Initialize TWS task |
TWS_TASK API Reference
Header File
Functions
-
int32_t tws_task_send_msg(void *p_buff, tws_msg_type_t msg_type, uint32_t msg_len)
Send message to TWS task.
Send the message data [p_buff] to the TWS task by osi_msgq_send().
- 参数:
p_buff – [in] pointer to message data
msg_type – [in] message type of type tws_msg_type_t
msg_len – [in] message length
- 返回值:
0 – success [BK_RET_OK]
other – fail
- 返回:
result
-
uint32_t tws_task_get_handle(void)
Get TWS task handle.
Get the TWS task thread handle returned by osi_thread_create().
- 返回值:
0 – fail
other – success
- 返回:
thread handle
-
void tws_init(tws_ux_info_t *p_tws_ux_info)
Initialize TWS task.
Create a TWS task and set the task parameters to [p_tws_ux_info].
- 参数:
p_tws_ux_info – [in] pointer to TWS information of type tws_ux_info_t.
- 返回:
N/A TWS_THREAD_H EOF
Structures
-
struct tws_msg_t
TWS message structure definition.
-
struct tws_msg_tbl_t
TWS message table structure definition.
Macros
-
TWS_MSG_START
-
TX_TWS_DATA_MSG
-
RX_TWS_DATA_MSG
-
TWS_FSM_GEN_MSG
-
TWS_RPC_MSG
-
TWS_TX_PENDING_MSG
-
TWS_TEST_MSG
-
TWS_RX_HOST_EVT
-
TWS_MSG_END
-
IS_VALID_TWS_MSG(msg)
Check that the TWS message is valid macro.
Type Definitions
-
typedef uint32_t tws_msg_type_t
TWS message type definition.