aboutsummaryrefslogtreecommitdiff
path: root/firmware/BleConnectionStatus.cpp
diff options
context:
space:
mode:
authorkrolyxon <me@krolyxon.com>2026-05-05 13:10:21 +0530
committerkrolyxon <me@krolyxon.com>2026-05-05 13:10:21 +0530
commita97b2248711c7beb50fa5ebe961539c7c77e7567 (patch)
tree3532cdc3afd0cc241567497939a77765c76367c4 /firmware/BleConnectionStatus.cpp
parent428605c762019dba3c05f5e33bad106220132c46 (diff)
remove stubs, add badUSB attacks, add BleMouse library files
Diffstat (limited to 'firmware/BleConnectionStatus.cpp')
-rw-r--r--firmware/BleConnectionStatus.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/firmware/BleConnectionStatus.cpp b/firmware/BleConnectionStatus.cpp
new file mode 100644
index 0000000..f01183b
--- /dev/null
+++ b/firmware/BleConnectionStatus.cpp
@@ -0,0 +1,18 @@
+#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);
+}