Przeglądaj źródła

change hid_mouse_report

wangzongqiang 1 rok temu
rodzic
commit
8451bc64bb
1 zmienionych plików z 4 dodań i 6 usunięć
  1. 4 6
      class/hid/usb_hid.h

+ 4 - 6
class/hid/usb_hid.h

@@ -565,19 +565,17 @@ struct usb_hid_kbd_report
 struct usb_hid_mouse_report
 {
   uint8_t buttons;   /* See HID_MOUSE_INPUT_BUTTON_* definitions */
-  uint8_t xdisp;     /* X displacement */
-  uint8_t ydisp;     /* y displacement */
+  int8_t xdisp;     /* X displacement */
+  int8_t ydisp;     /* y displacement */
                      /* Device specific additional bytes may follow */
-#ifdef CONFIG_INPUT_MOUSE_WHEEL
   uint8_t wdisp;     /* Wheel displacement */
-#endif
 };
 
 /* Joystick input report (1 bytes) (HID D.1) */
 struct usb_hid_js_report
 {
-  uint8_t xpos;      /* X position */
-  uint8_t ypos;      /* X position */
+  int8_t xpos;      /* X position */
+  int8_t ypos;      /* X position */
   uint8_t buttons;   /* See USBHID_JSIN_* definitions */
   uint8_t throttle;  /* Throttle */
 };