2021-06-08 01:56:21 +02:00
|
|
|
#include "ble_2902.h"
|
2021-06-11 22:31:15 +02:00
|
|
|
#include "esphome/components/esp32_ble/ble_uuid.h"
|
2021-06-08 01:56:21 +02:00
|
|
|
|
2021-09-20 11:47:51 +02:00
|
|
|
#ifdef USE_ESP32
|
|
|
|
|
|
|
|
#include <cstring>
|
2021-06-08 01:56:21 +02:00
|
|
|
|
|
|
|
namespace esphome {
|
2021-06-11 22:31:15 +02:00
|
|
|
namespace esp32_ble_server {
|
2021-06-08 01:56:21 +02:00
|
|
|
|
2021-06-11 22:31:15 +02:00
|
|
|
BLE2902::BLE2902() : BLEDescriptor(esp32_ble::ESPBTUUID::from_uint16(0x2902)) {
|
2021-06-08 01:56:21 +02:00
|
|
|
this->value_.attr_len = 2;
|
|
|
|
uint8_t data[2] = {0, 0};
|
|
|
|
memcpy(this->value_.attr_value, data, 2);
|
|
|
|
}
|
|
|
|
|
2021-06-11 22:31:15 +02:00
|
|
|
} // namespace esp32_ble_server
|
2021-06-08 01:56:21 +02:00
|
|
|
} // namespace esphome
|
|
|
|
|
|
|
|
#endif
|