ESPHome
2024.11.1
esphome
esphome
components
esp32_ble_server
ble_2901.cpp
Go to the documentation of this file.
1
#include "
ble_2901.h
"
2
#include "
esphome/components/esp32_ble/ble_uuid.h
"
3
4
#ifdef USE_ESP32
5
6
namespace
esphome
{
7
namespace
esp32_ble_server {
8
9
BLE2901::BLE2901
(
const
std::string &value) :
BLE2901
((uint8_t *) value.data(), value.
length
()) {}
10
BLE2901::BLE2901
(
const
uint8_t *data,
size_t
length
) :
BLEDescriptor
(esp32_ble::
ESPBTUUID
::from_uint16(0x2901)) {
11
this->
set_value
(data, length);
12
this->
permissions_
= ESP_GATT_PERM_READ;
13
}
14
15
}
// namespace esp32_ble_server
16
}
// namespace esphome
17
18
#endif
esphome::esp32_ble_server::BLEDescriptor::permissions_
esp_gatt_perm_t permissions_
Definition:
ble_descriptor.h:38
ble_2901.h
esphome::esp32_ble::ESPBTUUID
Definition:
ble_uuid.h:14
esphome::esp32_ble_server::BLEDescriptor
Definition:
ble_descriptor.h:17
esphome::esp32_ble_server::BLEDescriptor::set_value
void set_value(const std::string &value)
Definition:
ble_descriptor.cpp:41
esphome::esp32_ble_server::BLE2901
Definition:
ble_2901.h:10
ble_uuid.h
length
uint16_t length
Definition:
tt21100.cpp:12
esphome
Implementation of SPI Controller mode.
Definition:
a01nyub.cpp:7
esphome::esp32_ble_server::BLE2901::BLE2901
BLE2901(const std::string &value)
Definition:
ble_2901.cpp:9
Generated by
1.8.13