Skip to content

Commit 5acd122

Browse files
committed
Add USBHIDMouse::sendReport
For similar reason as for USBHIDKeyboard::sendReport espressif#6322.
1 parent 5f427c9 commit 5acd122

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

libraries/USB/src/USBHIDMouse.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,8 @@ bool USBHIDMouse::isPressed(uint8_t b){
8888
return false;
8989
}
9090

91+
void USBHIDMouse::sendReport(hid_mouse_report_t *report){
92+
hid.SendReport(HID_REPORT_ID_MOUSE, report, sizeof(*report));
93+
}
9194

9295
#endif /* CONFIG_TINYUSB_HID_ENABLED */

libraries/USB/src/USBHIDMouse.h

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class USBHIDMouse: public USBHIDDevice {
4646
void press(uint8_t b = MOUSE_LEFT); // press LEFT by default
4747
void release(uint8_t b = MOUSE_LEFT); // release LEFT by default
4848
bool isPressed(uint8_t b = MOUSE_LEFT); // check LEFT by default
49+
void sendReport(hid_mouse_report_t *report);
4950

5051
// internal use
5152
uint16_t _onGetDescriptor(uint8_t* buffer);

0 commit comments

Comments
 (0)