Developer World
Spresense SDK Library v3.2.0-ebc0364
bt_hfp.h File Reference

HFP API. More...

#include <stdint.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/bt_hfp_features.h>
#include <bluetooth/bt_common.h>

Go to the source code of this file.

Classes

struct  bt_hfp_ops_s
 Bluetooth HFP application callbacks. More...
 
struct  bt_hfp_state_s
 Bluetooth HFP context. More...
 

Functions

bool bt_hfp_is_supported (void)
 Get HFP support or not support. More...
 
int bt_hfp_connect (struct bt_acl_state_s *bt_acl_state)
 Bluetooth HFP connect Connect to peer device with HFP. More...
 
int bt_hfp_disconnect (struct bt_acl_state_s *bt_acl_state)
 Bluetooth HFP disconnect Disconnect to peer device with HFP. More...
 
int bt_hfp_audio_connect (struct bt_acl_state_s *bt_acl_state)
 Bluetooth HFP Audio connect Connect to peer device with HFP Audio. More...
 
int bt_hfp_audio_disconnect (struct bt_acl_state_s *bt_acl_state)
 Bluetooth HFP Audio disconnect Disconnect to peer device with HFP Audio. More...
 
int bt_hfp_send_at_command (struct bt_acl_state_s *bt_acl_state, char *at_cmd_str)
 Bluetooth send HFP command Send HFP command. More...
 
int bt_hfp_press_button (struct bt_acl_state_s *bt_acl_state)
 Bluetooth press button Press button. More...
 
int bt_hfp_set_feature (BT_HFP_HF_FEATURE_FLAG flag)
 Bluetooth set feature Set feature. More...
 
int bt_hfp_register_cb (struct bt_hfp_ops_s *bt_hfp_ops)
 Bluetooth HFP Register callbacks Set callback about HFP. More...
 

Detailed Description

HFP API.

Author
Sony Semiconductor Solutions Corporation

This API is for using HFP and includes Function and Callback

Function Documentation

◆ bt_hfp_is_supported()

bool bt_hfp_is_supported ( void  )

Get HFP support or not support.

Return values
Suppotor Not support

◆ bt_hfp_connect()

int bt_hfp_connect ( struct bt_acl_state_s bt_acl_state)

Bluetooth HFP connect Connect to peer device with HFP.

Parameters
[in]bt_acl_stateBluetooth context bt_acl_state_s
Return values
errorcode

◆ bt_hfp_disconnect()

int bt_hfp_disconnect ( struct bt_acl_state_s bt_acl_state)

Bluetooth HFP disconnect Disconnect to peer device with HFP.

Parameters
[in]bt_acl_stateBluetooth context bt_acl_state_s
Return values
errorcode

◆ bt_hfp_audio_connect()

int bt_hfp_audio_connect ( struct bt_acl_state_s bt_acl_state)

Bluetooth HFP Audio connect Connect to peer device with HFP Audio.

Parameters
[in]bt_acl_stateBluetooth context bt_acl_state_s
Return values
errorcode

◆ bt_hfp_audio_disconnect()

int bt_hfp_audio_disconnect ( struct bt_acl_state_s bt_acl_state)

Bluetooth HFP Audio disconnect Disconnect to peer device with HFP Audio.

Parameters
[in]bt_acl_stateBluetooth context bt_acl_state_s
Return values
errorcode

◆ bt_hfp_send_at_command()

int bt_hfp_send_at_command ( struct bt_acl_state_s bt_acl_state,
char *  at_cmd_str 
)

Bluetooth send HFP command Send HFP command.

Parameters
[in]bt_acl_stateBluetooth context bt_acl_state_s
[in]at_cmd_strAT command string(Need to end with '\0')
Return values
errorcode

◆ bt_hfp_press_button()

int bt_hfp_press_button ( struct bt_acl_state_s bt_acl_state)

Bluetooth press button Press button.

Parameters
[in]bt_acl_stateBluetooth context bt_acl_state_s
Return values
errorcode

◆ bt_hfp_set_feature()

int bt_hfp_set_feature ( BT_HFP_HF_FEATURE_FLAG  flag)

Bluetooth set feature Set feature.

Parameters
[in]flagBluetooth feature flag BT_HFP_HF_FEATURE_FLAG
Return values
errorcode

◆ bt_hfp_register_cb()

int bt_hfp_register_cb ( struct bt_hfp_ops_s bt_hfp_ops)

Bluetooth HFP Register callbacks Set callback about HFP.

Parameters
[in]bt_hfp_opsHFP callbacks bt_hfp_ops_s
Return values
errorcode