| 26 | #include "USBHIDMouse.h" |
| 27 | |
| 28 | USBHIDMouseBase::USBHIDMouseBase(HIDMouseType_t *type) : hid(), _buttons(0), _type(type) { |
| 29 | static bool initialized = false; |
| 30 | if (!initialized) { |
| 31 | initialized = true; |
| 32 | hid.addDevice(this, _type->descriptor_size); |
| 33 | } |
| 34 | }; |
| 35 | |
| 36 | uint16_t USBHIDMouseBase::_onGetDescriptor(uint8_t *dst) { |
| 37 | memcpy(dst, _type->report_descriptor, _type->descriptor_size); |