|
37 | 37 | #undef HID_REPORT_TYPE_OUTPUT
|
38 | 38 | #undef HID_REPORT_TYPE_INPUT
|
39 | 39 |
|
40 |
| -class PicoBluetoothHID; |
41 |
| -extern PicoBluetoothHID _PicoBluetoothHID; |
| 40 | +class PicoBluetoothHID_; |
| 41 | +extern PicoBluetoothHID_ PicoBluetoothHID; |
42 | 42 |
|
43 |
| -class PicoBluetoothHID { |
| 43 | +class PicoBluetoothHID_ { |
44 | 44 | public:
|
45 |
| - PicoBluetoothHID() { |
| 45 | + PicoBluetoothHID_() { |
46 | 46 | }
|
47 | 47 |
|
48 |
| - ~PicoBluetoothHID() { |
| 48 | + ~PicoBluetoothHID_() { |
49 | 49 | }
|
50 | 50 |
|
51 | 51 | // Optional callback, not used presently
|
52 |
| - // Usage: _PicoBluetoothHID.setCanSendNowCB(std::bind(&kbd::onCanSendNow, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4)); |
| 52 | + // Usage: PicoBluetoothHID.setCanSendNowCB(std::bind(&kbd::onCanSendNow, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4)); |
53 | 53 | typedef std::function<void(uint8_t type, uint16_t channel, uint8_t *packet, uint16_t size)> BTCallback;
|
54 | 54 |
|
55 | 55 | void setOpenedCB(BTCallback cb) {
|
@@ -135,7 +135,7 @@ class PicoBluetoothHID {
|
135 | 135 | }
|
136 | 136 |
|
137 | 137 | static void PacketHandlerWrapper(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t packet_size) {
|
138 |
| - _PicoBluetoothHID.packetHandler(packet_type, channel, packet, packet_size); |
| 138 | + PicoBluetoothHID.packetHandler(packet_type, channel, packet, packet_size); |
139 | 139 | }
|
140 | 140 |
|
141 | 141 | void packetHandler(uint8_t type, uint16_t channel, uint8_t *packet, uint16_t size) {
|
@@ -215,7 +215,7 @@ class PicoBluetoothHID {
|
215 | 215 | _sendReport = rpt;
|
216 | 216 | _sendReportLen = len;
|
217 | 217 | lockBluetooth();
|
218 |
| - hid_device_request_can_send_now_event(_PicoBluetoothHID.getCID()); |
| 218 | + hid_device_request_can_send_now_event(getCID()); |
219 | 219 | unlockBluetooth();
|
220 | 220 | while (connected() && _needToSend) {
|
221 | 221 | /* noop busy wait */
|
|
0 commit comments