#ifndef _USBMOUSE_H
#define _USBMOUSE_H

#include <libusb-1.0/libusb.h>

#define USB_HID_MOUSE_PROTOCOL 2

/*
#define USB_LCTRL  (1 << 0)
#define USB_LSHIFT (1 << 1)
#define USB_LALT   (1 << 2)
#define USB_LGUI   (1 << 3)
#define USB_RCTRL  (1 << 4)
#define USB_RSHIFT (1 << 5)
#define USB_RALT   (1 << 6) 
#define USB_RGUI   (1 << 7)
*/
struct usb_mouse_packet {
  uint8_t various_func;
  uint8_t X_displacement;
  uint8_t Y_displacement;
  uint8_t add0;
  uint8_t add1;
};

/* Find and open a USB mouse device.  Argument should point to
   space to store an endpoint address.  Returns NULL if no mouse
   device was found. */
extern struct libusb_device_handle *openmouse(uint8_t *);

#endif
