diff options
| author | krolyxon <me@krolyxon.com> | 2026-05-14 23:47:43 +0530 |
|---|---|---|
| committer | krolyxon <me@krolyxon.com> | 2026-05-14 23:47:43 +0530 |
| commit | c1c397b5555786bd27cac8ac9909d233671a67e8 (patch) | |
| tree | c82b6eba15cfc0da51c1e73a9619561aa1bfd586 /lib/BleMouse/BleConnectionStatus.cpp | |
| parent | 3631045878a955407115561fa86b96566bd33cfc (diff) | |
move src/libs to libs
Diffstat (limited to 'lib/BleMouse/BleConnectionStatus.cpp')
| -rw-r--r-- | lib/BleMouse/BleConnectionStatus.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/BleMouse/BleConnectionStatus.cpp b/lib/BleMouse/BleConnectionStatus.cpp new file mode 100644 index 0000000..83d3539 --- /dev/null +++ b/lib/BleMouse/BleConnectionStatus.cpp @@ -0,0 +1,17 @@ +#include "BleConnectionStatus.h" + +BleConnectionStatus::BleConnectionStatus(void) {} + +void BleConnectionStatus::onConnect(BLEServer *pServer) { + this->connected = true; + BLE2902 *desc = (BLE2902 *)this->inputMouse->getDescriptorByUUID( + BLEUUID((uint16_t)0x2902)); + desc->setNotifications(true); +} + +void BleConnectionStatus::onDisconnect(BLEServer *pServer) { + this->connected = false; + BLE2902 *desc = (BLE2902 *)this->inputMouse->getDescriptorByUUID( + BLEUUID((uint16_t)0x2902)); + desc->setNotifications(false); +} |
