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

A2DP API. More...

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

Go to the source code of this file.

Classes

struct  bt_a2dp_ops_s
 Bluetooth A2DP application callbacks. More...
 
struct  bt_a2dp_state_s
 Bluetooth A2DP context. More...
 

Functions

bool bt_a2dp_is_supported (void)
 Get A2DP support or not support. More...
 
int bt_a2dp_connect (struct bt_acl_state_s *bt_acl_state)
 Bluetooth A2DP connect Connect to peer device with A2DP. More...
 
int bt_a2dp_disconnect (struct bt_acl_state_s *bt_acl_state)
 Bluetooth A2DP disconnect Disconnect to peer device with A2DP. More...
 
int bt_a2dp_set_codec_capability (BT_AUDIO_CODEC_INFO *codec_capabilities, uint8_t num)
 Bluetooth A2DP set codec capability Set capability of audio codecs. More...
 
int bt_a2dp_register_callback (struct bt_a2dp_ops_s *bt_a2dp_ops)
 Register A2DP event packet callback. More...
 

Detailed Description

A2DP API.

Author
Sony Semiconductor Solutions Corporation

This API is for using A2DP and includes Function and Callback

Function Documentation

◆ bt_a2dp_is_supported()

bool bt_a2dp_is_supported ( void  )

Get A2DP support or not support.

Return values
Suppotor Not support

◆ bt_a2dp_connect()

int bt_a2dp_connect ( struct bt_acl_state_s bt_acl_state)

Bluetooth A2DP connect Connect to peer device with A2DP.

Parameters
[in]bt_acl_stateBluetooth context bt_acl_state_s
Return values
errorcode

◆ bt_a2dp_disconnect()

int bt_a2dp_disconnect ( struct bt_acl_state_s bt_acl_state)

Bluetooth A2DP disconnect Disconnect to peer device with A2DP.

Parameters
[in]bt_acl_stateBluetooth context bt_acl_state_s
Return values
errorcode

◆ bt_a2dp_set_codec_capability()

int bt_a2dp_set_codec_capability ( BT_AUDIO_CODEC_INFO codec_capabilities,
uint8_t  num 
)

Bluetooth A2DP set codec capability Set capability of audio codecs.

Parameters
[in]codec_capabilitiesBT_A2DP_CODEC_TYPE Codec type list(SBC/AAC) BT_AUDIO_CODEC_INFO
[in]numLength of codec capability
Return values
errorcode

◆ bt_a2dp_register_callback()

int bt_a2dp_register_callback ( struct bt_a2dp_ops_s bt_a2dp_ops)

Register A2DP event packet callback.

Parameters
[in]bt_a2dp_opsCallback function for event handler bt_a2dp_ops_s
Return values
errorcode