Spresense SDK Library v3.4.5-e9a4f17
Loading...
Searching...
No Matches
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.
 
int bt_hfp_connect (struct bt_acl_state_s *bt_acl_state)
 Bluetooth HFP connect Connect to peer device with HFP.
 
int bt_hfp_disconnect (struct bt_acl_state_s *bt_acl_state)
 Bluetooth HFP disconnect Disconnect to peer device with HFP.
 
int bt_hfp_audio_connect (struct bt_acl_state_s *bt_acl_state)
 Bluetooth HFP Audio connect Connect to peer device with HFP Audio.
 
int bt_hfp_audio_disconnect (struct bt_acl_state_s *bt_acl_state)
 Bluetooth HFP Audio disconnect Disconnect to peer device with HFP Audio.
 
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.
 
int bt_hfp_press_button (struct bt_acl_state_s *bt_acl_state)
 Bluetooth press button Press button.
 
int bt_hfp_set_feature (BT_HFP_HF_FEATURE_FLAG flag)
 Bluetooth set feature Set feature.
 
int bt_hfp_register_cb (struct bt_hfp_ops_s *bt_hfp_ops)
 Bluetooth HFP Register callbacks Set callback about HFP.
 

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