11#ifdef USE_BLE_GATT_CLIENT
15#if defined(USE_RP2040_BLE)
17#define ESPHOME_BLE_GATT_CONNECTION_TYPE bluetooth_connection::RP2GattClient
18#elif defined(USE_ESP32_BLE)
20#define ESPHOME_BLE_GATT_CONNECTION_TYPE bluetooth_connection::BluedroidGattClient
21#elif defined(USE_BLE_GATT_CLIENT_STUB_BACKEND)
30 int connect(uint64_t
address, uint8_t addr_type) {
return ble_device_base::GATT_ERR_NOT_CONNECTED; }
36 return ble_device_base::GATT_ERR_NOT_CONNECTED;
40 return ble_device_base::GATT_ERR_NOT_CONNECTED;
43 int pair() {
return ble_device_base::GATT_ERR_NOT_CONNECTED; }
45 return ble_device_base::GATT_ERR_NOT_CONNECTED;
53#define ESPHOME_BLE_GATT_CONNECTION_TYPE bluetooth_connection::StubGattBackend
55#error "USE_BLE_GATT_CLIENT is set but this build has no GATT backend; add an alias arm here"
62 "The build's GATT backend is missing part of the BLEGattConnection surface (ble_gatt_client.h)");
63#undef ESPHOME_BLE_GATT_CONNECTION_TYPE
The event surface a backend delivers completions through - the one place with genuine runtime polymor...
void set_connection_type(ble_device_base::ConnectionType ct)
int connect(uint64_t address, uint8_t addr_type)
void set_listener(ble_device_base::GattClientListener *listener)
int read_descriptor(uint16_t handle)
int notify_characteristic(uint16_t handle, bool enable)
int read_characteristic(uint16_t handle)
int update_connection_params(uint16_t min_interval, uint16_t max_interval, uint16_t latency, uint16_t timeout)
int write_descriptor(uint16_t handle, const uint8_t *data, uint16_t len)
int write_characteristic(uint16_t handle, const uint8_t *data, uint16_t len, bool response)
ble_device_base::GattServiceTable get_service_table()
bool cancel_gatt_disconnect()
ESPHOME_BLE_GATT_CONNECTION_TYPE BLEGattConnection
Borrowed view of the backend-owned service table.
spi_device_handle_t handle