43 #ifndef __MODULES_INCLUDE_BLUETOOTH_BT_COMMON_H 44 #define __MODULES_INCLUDE_BLUETOOTH_BT_COMMON_H 94 char bt_target_name[BT_NAME_LEN];
107 char bt_target_name[BT_NAME_LEN];
119 void (*inquiry_complete)(void);
120 void (*connect_status_changed)(
struct bt_acl_state_s *bt_acl_state,
bool connected,
int status);
121 void (*connected_device_name)(
const char *
name);
131 void (*connect_status_changed)(
struct ble_state_s *ble_state,
bool connected);
132 void (*connected_device_name_resp)(
const char *
name);
133 void (*scan_result)(
BT_ADDR addr,
char *dev_name);
BT_CONNECT_STATUS ble_connection
Definition: bt_common.h:103
struct bt_hal_common_ops_s * bt_hal_common_ops
Definition: bt_common.h:75
int ble_start_advertise(void)
Bluetooth LE start advertise Start BLE advertise mode.
int ble_connect(struct ble_state_s *ble_state)
Bluetooth LE connect for Central.
int bt_start_inquiry(void)
Bluetooth inquiry start Start to inquiry for connect peer device.
BT_PAIR_STATUS
BT pairing result.
Definition: bluetooth.h:159
BT address types.
Definition: bluetooth.h:120
int ble_get_address(BT_ADDR *addr)
Get Bluetooth LE module address.
int ble_get_name(char *name)
Get Bluetooth LE module name.
int bt_disable(void)
Bluetooth module disable Bluetooth set power off.
Bluetooth LE common HAL callbacks.
Definition: bt_if.h:138
int ble_enable(void)
Bluetooth LE enable.
Bluetooth LE Common application callbacks.
Definition: bt_common.h:129
int ble_cancel_advertise(void)
Bluetooth LE cancel advertise Cancel BLE advertise mode.
Bluetooth Common HAL callbacks.
Definition: bt_if.h:69
Definition: bt_common.h:65
Bluetooth LE context.
Definition: bt_common.h:101
BT_ADDR bt_target_addr
Definition: bt_common.h:106
int ble_set_name(char *name)
Set Bluetooth LE module name This name visible for other devices and should be call before bt_enable...
struct bt_common_state_s * bt_common_state
Definition: bt_common.h:105
int bt_set_name(char *name)
Set Bluetooth module name This name visible for other devices and should be call before bt_enable...
int ble_start_scan(void)
Bluetooth LE start scan Start BLE scan mode.
int ble_disconnect(struct ble_state_s *ble_state)
Bluetooth LE dicsonnect for Central.
uint16_t ble_connect_handle
Definition: bt_common.h:104
Definition: bt_common.h:63
BT_ADDR bt_target_addr
Definition: bt_common.h:93
struct ble_hal_common_ops_s * ble_hal_common_ops
Definition: bt_common.h:76
int bt_get_bond_list(BT_ADDR *addr, int *num)
Bluetooth get bond device list Get bond devices list with BD_ADDR.
int bt_unbond(BT_ADDR *addr)
Bluetooth unbond by BD_ADDR Unbond device by BD_ADDR.
Bluetooth base context.
Definition: bt_common.h:73
BT_VISIBILITY
BT visibility ID.
Definition: bluetooth.h:199
struct bt_common_state_s * bt_common_state
Definition: bt_common.h:92
char ble_name[BT_NAME_LEN]
Definition: bt_common.h:82
Definition: bt_common.h:64
int bt_set_address(BT_ADDR *addr)
Set Bluetooth module address This is Spresense side address and should be call before bt_enable...
int bt_init(void)
Bluetooth module initialize For initialize a pin config, NV storage, UART, etc.
int bt_enable(void)
Bluetooth module enable Bluetooth set power on(and download firmware, etc).
char bt_name[BT_NAME_LEN]
Definition: bt_common.h:81
BT_ADDR ble_addr
Definition: bt_common.h:80
int bt_get_address(BT_ADDR *addr)
Get Bluetooth module address.
BT_CONNECT_STATUS
BT profile connection status.
Definition: bt_common.h:61
int bt_set_visibility(BT_VISIBILITY visibility)
Bluetooth set visible Visible this device from others.
int bt_pairing_enable(void)
Bluetooth pairing enable Entering bluetooth pairing mode.
char name[32]
Definition: video.h:80
BT_CONNECT_STATUS bt_acl_connection
Definition: bt_common.h:91
Bluetooth Common application callbacks.
Definition: bt_common.h:114
int bt_finalize(void)
Bluetooth module finalize.
struct ble_common_ops_s * ble_common_ops
Definition: bt_common.h:78
int bt_paring_disable(void)
Bluetooth pairing disable Escaping bluetooth pairing mode.
Bluetooth ACL context.
Definition: bt_common.h:89
BT_ADDR bt_addr
Definition: bt_common.h:79
BT_CMD_STATUS
BT hci command status.
Definition: bluetooth.h:138
int ble_disable(void)
Bluetooth LE disable.
Definition: bt_common.h:66
int bt_register_common_cb(struct bt_common_ops_s *bt_common_ops)
Bluetooth register common callbacks Register Connect/Pairing/Inquiry callback.
int bt_cancel_inquiry(void)
Bluetooth inquiry cancel Cancel to inquiry.
int ble_register_common_cb(struct ble_common_ops_s *ble_common_ops)
Bluetooth LE register common callbacks Register Connect/Advertise/Scan callback.
Bluetooth common header for SDK on Spresense.
int bt_get_name(char *name)
Get Bluetooth module name.
int ble_cancel_scan(void)
Bluetooth LE cancel scan Cancel BLE scan mode.
int ble_set_address(BT_ADDR *addr)
Set Bluetooth LE module address This is Spresense side address and should be call before bt_enable...
struct bt_common_ops_s * bt_common_ops
Definition: bt_common.h:77