forked from sandeepmistry/arduino-BLEPeripheral
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBLEHIDPeripheral.h
44 lines (30 loc) · 1.13 KB
/
BLEHIDPeripheral.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef _BLE_HID_PERIPHERAL_H_
#define _BLE_HID_PERIPHERAL_H_
#include "BLEHID.h"
#include "BLEHIDReportMapCharacteristic.h"
#include "BLEPeripheral.h"
class BLEHIDPeripheral : public BLEPeripheral
{
friend class BLEHID;
public:
BLEHIDPeripheral(unsigned char req = BLE_DEFAULT_REQ, unsigned char rdy = BLE_DEFAULT_RDY, unsigned char rst = BLE_DEFAULT_RST);
~BLEHIDPeripheral();
void begin();
void clearBondStoreData();
void setReportIdOffset(unsigned char reportIdOffset);
void poll();
void addHID(BLEHID& hid);
protected:
static BLEHIDPeripheral* instance();
private:
static BLEHIDPeripheral* _instance;
BLEBondStore _bleBondStore;
BLEService _hidService;
BLEHIDReportMapCharacteristic _hidReportMapCharacteristic;
BLEProgmemConstantCharacteristic _hidInformationCharacteristic;
BLEUnsignedCharCharacteristic _hidControlPointCharacteristic;
unsigned char _reportIdOffset;
BLEHID** _hids;
unsigned char _numHids;
};
#endif