Krolyxon
Commit 3120783

Branches

Tags

Refs →

orion-rf.piolibdepsesp32-s3-n16r8ESP32 BLE MouseBleConnectionStatus.cpp

17 lines · 547 B · C++

1#include "BleConnectionStatus.h"
2
3BleConnectionStatus::BleConnectionStatus(void) {}
4
5void BleConnectionStatus::onConnect(BLEServer *pServer) {
6 this->connected = true;
7 BLE2902 *desc = (BLE2902 *)this->inputMouse->getDescriptorByUUID(
8 BLEUUID((uint16_t)0x2902));
9 desc->setNotifications(true);
10}
11
12void BleConnectionStatus::onDisconnect(BLEServer *pServer) {
13 this->connected = false;
14 BLE2902 *desc = (BLE2902 *)this->inputMouse->getDescriptorByUUID(
15 BLEUUID((uint16_t)0x2902));
16 desc->setNotifications(false);
17}