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 /src/libs/BleMouse.h | |
| parent | 3631045878a955407115561fa86b96566bd33cfc (diff) | |
move src/libs to libs
Diffstat (limited to 'src/libs/BleMouse.h')
| -rw-r--r-- | src/libs/BleMouse.h | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/src/libs/BleMouse.h b/src/libs/BleMouse.h deleted file mode 100644 index 4468189..0000000 --- a/src/libs/BleMouse.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef ESP32_BLE_MOUSE_H -#define ESP32_BLE_MOUSE_H -#include "sdkconfig.h" -#if defined(CONFIG_BT_ENABLED) - -#include "BLECharacteristic.h" -#include "BLEHIDDevice.h" -#include "BleConnectionStatus.h" - -#define MOUSE_LEFT 1 -#define MOUSE_RIGHT 2 -#define MOUSE_MIDDLE 4 -#define MOUSE_BACK 8 -#define MOUSE_FORWARD 16 -#define MOUSE_ALL \ - (MOUSE_LEFT | MOUSE_RIGHT | \ - MOUSE_MIDDLE) #For compatibility with the Mouse library - -class BleMouse { - private: - uint8_t _buttons; - BleConnectionStatus *connectionStatus; - BLEHIDDevice *hid; - BLECharacteristic *inputMouse; - void buttons(uint8_t b); - void rawAction(uint8_t msg[], char msgSize); - static void taskServer(void *pvParameter); - - public: - BleMouse(std::string deviceName = "ESP32 Bluetooth Mouse", - std::string deviceManufacturer = "Espressif", - uint8_t batteryLevel = 100); - void begin(void); - void end(void); - void click(uint8_t b = MOUSE_LEFT); - void move(signed char x, signed char y, signed char wheel = 0, - signed char hWheel = 0); - void press(uint8_t b = MOUSE_LEFT); // press LEFT by default - void release(uint8_t b = MOUSE_LEFT); // release LEFT by default - bool isPressed(uint8_t b = MOUSE_LEFT); // check LEFT by default - bool isConnected(void); - void setBatteryLevel(uint8_t level); - uint8_t batteryLevel; - std::string deviceManufacturer; - std::string deviceName; - - protected: - virtual void onStarted(BLEServer *pServer) {}; -}; - -#endif // CONFIG_BT_ENABLED -#endif // ESP32_BLE_MOUSE_H |
