Louise Newberry / USBHOST

Fork of USBHOST by ST

Revision:
8:e57ccb876952
Parent:
5:fc157e6bd5a5
--- 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();