Get rid of usb_device_hid_mouse_struct_t in favor of usb_mouse_report_t which now functions properly because of using __attribute__ ((packed))

This commit is contained in:
László Monda
2016-03-02 17:05:51 +01:00
parent 286c16c627
commit d3741b13dc
3 changed files with 17 additions and 31 deletions

View File

@@ -7,17 +7,13 @@
// Typedefs:
typedef struct usb_device_hid_mouse_struct {
uint8_t buffer[USB_MOUSE_REPORT_LENGTH];
} usb_device_hid_mouse_struct_t;
typedef struct usb_device_wheeled_mouse_struct {
uint8_t button;
typedef struct usb_mouse_report {
uint8_t buttons;
int16_t x;
int16_t y;
int8_t verticalWheelMovement;
int8_t horizontalWheelMovement;
} usb_device_wheeled_mouse_struct_t;
int8_t wheelX;
int8_t wheelY;
} __attribute__ ((packed)) usb_mouse_report_t;
// Functions: