Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of USBHOST by
Diff: USBHostHID/USBHostMouse.h
- Revision:
- 8:e57ccb876952
- Parent:
- 5:fc157e6bd5a5
diff -r cc595e523032 -r e57ccb876952 USBHostHID/USBHostMouse.h
--- a/USBHostHID/USBHostMouse.h Thu Aug 17 22:08:04 2017 +0000
+++ b/USBHostHID/USBHostMouse.h Sat Aug 19 19:47:53 2017 +0000
@@ -53,7 +53,7 @@
*
* @param ptr function pointer
*/
- inline void attachEvent(void (*ptr)(uint8_t buttons, int8_t x, int8_t y, int8_t z)) {
+ inline void attachEvent(void (*ptr)(uint8_t buttons, int16_t x, int16_t y, int8_t z)) {
if (ptr != NULL) {
onUpdate = ptr;
}
@@ -75,7 +75,7 @@
*
* @param ptr function pointer
*/
- inline void attachXEvent(void (*ptr)(int8_t x)) {
+ inline void attachXEvent(void (*ptr)(int16_t x)) {
if (ptr != NULL) {
onXUpdate = ptr;
}
@@ -86,7 +86,7 @@
*
* @param ptr function pointer
*/
- inline void attachYEvent(void (*ptr)(int8_t y)) {
+ inline void attachYEvent(void (*ptr)(int16_t y)) {
if (ptr != NULL) {
onYUpdate = ptr;
}
@@ -119,15 +119,15 @@
int mouse_intf;
uint8_t buttons;
- int8_t x;
- int8_t y;
+ int16_t x;
+ int16_t y;
int8_t z;
void rxHandler();
- void (*onUpdate)(uint8_t buttons, int8_t x, int8_t y, int8_t z);
+ void (*onUpdate)(uint8_t buttons, int16_t x, int16_t y, int8_t z);
void (*onButtonUpdate)(uint8_t buttons);
- void (*onXUpdate)(int8_t x);
- void (*onYUpdate)(int8_t y);
+ void (*onXUpdate)(int16_t x);
+ void (*onYUpdate)(int16_t y);
void (*onZUpdate)(int8_t z);
int report_id;
void init();
