TWS Profile Control Functions

[English]

TWS_PROFILE_CTRL API Brief

Application

Brief

tws_profile_is_reconnecting()

check that tws profile is reconnecting

tws_profile_clear_reconnecting()

clear tws profile reconnecting

tws_profile_connect()

connect mobile profile

tws_profile_sync()

sync profile

tws_profile_sync_cmd_handle()

handle tws profile sync command

tws_sync_done_cmd_handle()

handle tws sync done command

tws_profile_sync_single_profile()

sync single profile

TWS_PROFILE_CTRL API Reference

Header File

Functions

bool tws_profile_is_reconnecting(btif_bd_addr_t *p_addr)

check that tws profile is reconnecting

check if TWS APP’s reconnecting profile action is on going

参数:

*p_addr[in] pointer to address of type btif_bd_addr_t

返回值:
  • true – on going

  • false – no action

返回:

result

void tws_profile_clear_reconnecting(btif_bd_addr_t *p_addr)

clear tws profile reconnecting

Clear the reconnecting flag

参数:

*p_addr[in] pointer to address of type btif_bd_addr_t

返回:

N/A

btif_ret_t tws_profile_connect(btif_bd_addr_t addr)

connect mobile profile

reconnect mobile profile trigger function

参数:

addr[in] address of type btif_bd_addr_t

返回值:
  • 0 – success

  • other – fail

返回:

result

btif_ret_t tws_profile_sync(btif_bd_addr_t *p_addr, bool force_sync)

sync profile

sync host stack with peer device

参数:
  • p_addr[in] pointer to address of type btif_bd_addr_t

  • force_sync[in] force sync profile

返回值:
  • 0 – success

  • other – fail

返回:

result

void tws_profile_sync_cmd_handle(const uint8_t *p_data, uint16_t length)

handle tws profile sync command

tws sync profile command handler

参数:
  • p_data[in] pointer to profile sync command data

  • length[in] length of profile sync command data

返回:

N/A

void tws_sync_done_cmd_handle(const uint8_t *p_data, uint16_t length)

handle tws sync done command

TWS slave used to notify TWS master that profile sync has been done

参数:
  • p_data[in] pointer to profile sync done command data

  • length[in] length of profile sync done command data

返回:

N/A

btif_ret_t tws_profile_sync_single_profile(btif_bd_addr_t *p_addr, bool ended, profile_type_t profile_type)

sync single profile

only sync [profile_type] profile for the mobile phone with address [p_addr].

参数:
  • p_addr[in] pointer to address of type btif_bd_addr_t

  • ended[in] ended status of type bool

  • profile_type[in] profile type of type profile_type_t

返回值:
  • 0 – success

  • other – fail TWS_PROFILE_CTRL_H EOF

返回:

result

Structures

struct profile_sync_t

profile sync structure definition.

struct sync_done_t

profile sync done structure definition.

Macros

PROFILE_SYNC_BASIC
HCI_CONN_PROFILE
A2DP_PROFILE
HFP_HF_PROFILE
AVRCP_PROFILE
SPP_PROFILE
A2DP_PROFILE_ONLY
HFP_HF_PROFILE_ONLY
AVRCP_PROFILE_ONLY
SPP_PROFILE_ONLY
INVALID_PROFILE

Type Definitions

typedef uint8_t profile_type_t

profile type definition.