Developer World
Spresense SDK Library v3.3.0-375c679
bt_event.h File Reference

Bluetooth HAL I/F for event handler. More...

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

Go to the source code of this file.

Classes

struct  bt_event_t
 Bluetooth parent event data type. More...
 
struct  bt_event_cmd_stat_t
 Bluetooth command status event data type. More...
 
struct  bt_event_pair_cmplt_t
 Bluetooth pairing complete event data type. More...
 
struct  bt_event_inquiry_rslt_t
 Bluetooth inquiry result event data type. More...
 
struct  bt_event_conn_stat_t
 Bluetooth connection status change event data type. More...
 
struct  bt_event_dev_name_t
 Bluetooth change device name event data type. More...
 
struct  bt_event_bond_info_t
 Bluetooth new bonding information event data type. More...
 
struct  bt_a2dp_event_connect_t
 Bluetooth A2DP connection event data type. More...
 
struct  bt_a2dp_event_recv_t
 Bluetooth A2DP receive data event data type. More...
 
struct  bt_avrcp_event_connect_t
 Bluetooth AVRCP connection event data type. More...
 
struct  bt_avrcp_event_play_position_t
 Bluetooth AVRCP play position event data type. More...
 
struct  bt_hfp_event_connect_t
 Bluetooth HFP connection event data type. More...
 
struct  bt_hfp_event_ag_feature_t
 Bluetooth HFP ag feature event data type. More...
 
struct  bt_hfp_event_at_cmd_t
 Bluetooth HFP at command event data type. More...
 
struct  bt_spp_event_connect_t
 Bluetooth SPP connection event data type. More...
 
struct  bt_spp_event_recv_data_t
 Bluetooth SPP Rx event data type. More...
 
struct  ble_event_conn_stat_t
 Bluetooth LE connection status change event data type. More...
 
struct  ble_event_dev_name_t
 
struct  ble_gatt_event_write_req_t
 Bluetooth LE GATT Write request event. More...
 
struct  ble_gatt_event_read_req_t
 Bluetooth LE GATT Read request event. More...
 
struct  ble_gatt_event_notify_req_t
 Bluetooth LE GATT Notify request event. More...
 
struct  ble_gatt_event_write_rsp_t
 Bluetooth LE GATT Write response event. More...
 
struct  ble_gatt_event_read_rsp_t
 Bluetooth LE GATT Read response event. More...
 
struct  ble_gatt_event_notification_t
 Bluetooth LE GATT notification event. More...
 
struct  ble_event_adv_rept_t
 Bluetooth LE advertise report event. More...
 
struct  ble_event_mtusize_t
 
struct  ble_event_bondinfo_t
 
struct  ble_event_encryption_result_t
 Bluetooth LE encryption result event. More...
 
struct  BT_AVRC_SUPPORT_NOTIFY_EVENT
 BT avrc supported notify event. More...
 

Macros

Max event data length
#define BT_MAX_EVENT_DATA_LEN   1024
 
address type length of advertise data
#define BT_ADV_DATA_ADDRTYPE_LEN   (1)
 
rssi length of advertise data
#define BT_ADV_DATA_RSSI_LEN   (1)
 
Max ble advertise data length
#define BLE_MAX_ADV_DATA_LEN
 
Max ble GATT data length
#define BLE_MAX_GATT_DATA_LEN   244
 

Enumerations

enum  BT_GROUP_ID {
  BT_GROUP_COMMON = 0 , BT_GROUP_A2DP , BT_GROUP_AVRCP , BT_GROUP_HFP ,
  BT_GROUP_SPP , BT_GROUP_RFCOMM , BLE_GROUP_COMMON , BLE_GROUP_GATT
}
 Bluetooth profile and protocol ID. More...
 
enum  BT_COMMON_EVENT_ID {
  BT_COMMON_EVENT_CMD_STATUS = 0 , BT_COMMON_EVENT_PAIRING_COMPLETE , BT_COMMON_EVENT_INQUIRY_RESULT , BT_COMMON_EVENT_INQUIRY_COMPLETE ,
  BT_COMMON_EVENT_CONN_STAT_CHANGE , BT_COMMON_EVENT_CONN_DEV_NAME , BT_COMMON_EVENT_BOND_INFO
}
 Bluetooth event ID for common function. More...
 
enum  BT_A2DP_EVENT_ID { BT_A2DP_EVENT_CMD_STATUS = 0 , BT_A2DP_EVENT_CONNECT , BT_A2DP_EVENT_DISCONNECT , BT_A2DP_EVENT_MEDIA_PACKET }
 Bluetooth event ID for A2DP. More...
 
enum  BT_AVRCP_EVENT_ID {
  BT_AVRCP_EVENT_CMD_STATUS = 0 , BT_AVRCC_EVENT_CONNECT , BT_AVRCC_EVENT_DISCONNECT , BT_AVRCT_EVENT_CONNECT ,
  BT_AVRCT_EVENT_DISCONNECT , BT_AVRCP_EVENT_PLAY_STAT_CHANGE , BT_AVRCP_EVENT_TRACK_CHANGE , BT_AVRCP_EVENT_TRACK_REACH_END ,
  BT_AVRCP_EVENT_TRACK_REACH_START , BT_AVRCP_EVENT_PLAY_POS_CHANGE , BT_AVRCP_EVENT_BATT_STAT_CHANGE , BT_AVRCP_EVENT_SYS_STATUS_CHANGE ,
  BT_AVRCP_EVENT_APP_SETT_CHANGE , BT_AVRCP_EVENT_NOW_PLAY_CHANGE , BT_AVRCP_EVENT_AVAI_PLAYER_CHANGE , BT_AVRCP_EVENT_ADDR_PLAYER_CHANGE ,
  BT_AVRCP_EVENT_UIDS_CHANGE , BT_AVRCP_EVENT_VOLUME_CHANGE
}
 Bluetooth event ID for A2DP. More...
 
enum  BT_HFP_EVENT_ID {
  BT_HFP_EVENT_CMD_STATUS = 0 , BT_HFP_EVENT_HF_CONNECT , BT_HFP_EVENT_HF_DISCONNECT , BT_HFP_EVENT_AUDIO_CONNECT ,
  BT_HFP_EVENT_AUDIO_DISCONNECT , BT_HFP_EVENT_AG_FEATURE_RESP , BT_HFP_EVENT_AT_CMD_RESP
}
 Bluetooth event ID for HFP. More...
 
enum  BT_SPP_EVENT_ID { BT_SPP_EVENT_CONNECT = 0 , BT_SPP_EVENT_DISCONNECT , BT_SPP_EVENT_CONNECT_FAIL , BT_SPP_EVENT_RX_DATA }
 Bluetooth event ID for SPP. More...
 
enum  BLE_COMMON_EVENT_ID {
  BLE_COMMON_EVENT_CONN_STAT_CHANGE = 0 , BLE_COMMON_EVENT_CONN_DEV_NAME , BLE_COMMON_EVENT_SCAN_RESULT , BLE_COMMON_EVENT_MTUSIZE ,
  BLE_COMMON_EVENT_SAVE_BOND , BLE_COMMON_EVENT_LOAD_BOND , BLE_COMMON_EVENT_ENCRYPTION_RESULT
}
 Bluetooth LE event ID for common function. More...
 
enum  BLE_GATT_EVENT_ID {
  BLE_GATT_EVENT_WRITE_REQ = 0 , BLE_GATT_EVENT_READ_REQ , BLE_GATT_EVENT_NOTIFY_REQ , BLE_GATT_EVENT_WRITE_RESP ,
  BLE_GATT_EVENT_READ_RESP , BLE_GATT_EVENT_NOTIFICATION , BLE_GATT_EVENT_DB_DISCOVERY_COMPLETE
}
 

Detailed Description

Bluetooth HAL I/F for event handler.

Author
Sony Semiconductor Solutions Corporation

This header file includes bluetooth event related definitions for HAL I/F. Event handler will be use this definition for switch events.

  • Event type
  • Event structure

Macro Definition Documentation

◆ BLE_MAX_ADV_DATA_LEN

#define BLE_MAX_ADV_DATA_LEN
Value:
(BT_ADV_DATA_MAX_LEN + \
BT_ADV_DATA_ADDRTYPE_LEN + \
BT_ADV_DATA_RSSI_LEN)

Enumeration Type Documentation

◆ BT_GROUP_ID

Bluetooth profile and protocol ID.

Enumerator
BT_GROUP_COMMON 

Common group

BT_GROUP_A2DP 

A2DP

BT_GROUP_AVRCP 

AVRCP

BT_GROUP_HFP 

HFP

BT_GROUP_SPP 

SPP

BT_GROUP_RFCOMM 

RFCOMM

BLE_GROUP_COMMON 

BLE Common

BLE_GROUP_GATT 

BLE GATT

◆ BT_COMMON_EVENT_ID

Bluetooth event ID for common function.

Enumerator
BT_COMMON_EVENT_CMD_STATUS 

Command status event

BT_COMMON_EVENT_PAIRING_COMPLETE 

Pairing complete event

BT_COMMON_EVENT_INQUIRY_RESULT 

Inquiry result event

BT_COMMON_EVENT_INQUIRY_COMPLETE 

Inquiry complete event

BT_COMMON_EVENT_CONN_STAT_CHANGE 

Connection status change event

BT_COMMON_EVENT_CONN_DEV_NAME 

Connected device name event

BT_COMMON_EVENT_BOND_INFO 

Bonding information event

◆ BT_A2DP_EVENT_ID

Bluetooth event ID for A2DP.

Enumerator
BT_A2DP_EVENT_CMD_STATUS 

Command status event

BT_A2DP_EVENT_CONNECT 

Connect event

BT_A2DP_EVENT_DISCONNECT 

Disconnect event

BT_A2DP_EVENT_MEDIA_PACKET 

Media packet receive event

◆ BT_AVRCP_EVENT_ID

Bluetooth event ID for A2DP.

Enumerator
BT_AVRCP_EVENT_CMD_STATUS 

Command status event

BT_AVRCC_EVENT_CONNECT 

AVRCP controller connect event

BT_AVRCC_EVENT_DISCONNECT 

AVRCP vontroller disconnect event

BT_AVRCT_EVENT_CONNECT 

AVRCP target connect event

BT_AVRCT_EVENT_DISCONNECT 

AVRCP target disconnect event

BT_AVRCP_EVENT_PLAY_STAT_CHANGE 

Play status change event

BT_AVRCP_EVENT_TRACK_CHANGE 

Play track change event

BT_AVRCP_EVENT_TRACK_REACH_END 

Play track reach end event

BT_AVRCP_EVENT_TRACK_REACH_START 

Play track reach start event

BT_AVRCP_EVENT_PLAY_POS_CHANGE 

Play position change event

BT_AVRCP_EVENT_BATT_STAT_CHANGE 

Battery status change event

BT_AVRCP_EVENT_SYS_STATUS_CHANGE 

System status change event

BT_AVRCP_EVENT_APP_SETT_CHANGE 

Application settings change event

BT_AVRCP_EVENT_NOW_PLAY_CHANGE 

Content of Now Playing folder change event

BT_AVRCP_EVENT_AVAI_PLAYER_CHANGE 

Available players change event

BT_AVRCP_EVENT_ADDR_PLAYER_CHANGE 

Addressed player change event

BT_AVRCP_EVENT_UIDS_CHANGE 

UIDs change event

BT_AVRCP_EVENT_VOLUME_CHANGE 

Volume change on the target device event

◆ BT_HFP_EVENT_ID

Bluetooth event ID for HFP.

Enumerator
BT_HFP_EVENT_CMD_STATUS 

Command status event

BT_HFP_EVENT_HF_CONNECT 

HFP connect event

BT_HFP_EVENT_HF_DISCONNECT 

HFP disconnect event

BT_HFP_EVENT_AUDIO_CONNECT 

HFP audio connect event

BT_HFP_EVENT_AUDIO_DISCONNECT 

HFP audio disconnect event

BT_HFP_EVENT_AG_FEATURE_RESP 

HFP AG feature response event

BT_HFP_EVENT_AT_CMD_RESP 

HFP AT command response event

◆ BT_SPP_EVENT_ID

Bluetooth event ID for SPP.

Enumerator
BT_SPP_EVENT_CONNECT 

Connect event

BT_SPP_EVENT_DISCONNECT 

Disconnect event

BT_SPP_EVENT_CONNECT_FAIL 

Connection fail event

BT_SPP_EVENT_RX_DATA 

Receive SPP data event

◆ BLE_COMMON_EVENT_ID

Bluetooth LE event ID for common function.

Enumerator
BLE_COMMON_EVENT_CONN_STAT_CHANGE 

Connection status change event

BLE_COMMON_EVENT_CONN_DEV_NAME 

Device name receive event

BLE_COMMON_EVENT_SCAN_RESULT 

Scan result event

BLE_COMMON_EVENT_MTUSIZE 

MTU size event

BLE_COMMON_EVENT_SAVE_BOND 

Save bonding information event

BLE_COMMON_EVENT_LOAD_BOND 

Load bonding information event

BLE_COMMON_EVENT_ENCRYPTION_RESULT 

Encryption result notification

◆ BLE_GATT_EVENT_ID

Enumerator
BLE_GATT_EVENT_WRITE_REQ 

GATT Characteristic write request event

BLE_GATT_EVENT_READ_REQ 

GATT Characteristic read request event

BLE_GATT_EVENT_NOTIFY_REQ 

GATT Characteristic notify request event

BLE_GATT_EVENT_WRITE_RESP 

GATT Characteristic write response event

BLE_GATT_EVENT_READ_RESP 

GATT Characteristic read response event

BLE_GATT_EVENT_NOTIFICATION 

GATT Characteristic notifition event

BLE_GATT_EVENT_DB_DISCOVERY_COMPLETE 

GATTC discovery requested by host completed