Keyboard firmwares for Atmel AVR and Cortex-M
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

usb_mouse.h 577B

123456789101112131415161718192021222324
  1. #ifndef USB_MOUSE_H
  2. #define USB_MOUSE_H 1
  3. #include <stdint.h>
  4. #include <stdbool.h>
  5. #include "usb.h"
  6. #define MOUSE_INTERFACE 1
  7. #define MOUSE_ENDPOINT 2
  8. #define MOUSE_SIZE 8
  9. #define MOUSE_BUFFER EP_DOUBLE_BUFFER
  10. extern uint8_t mouse_buttons;
  11. extern uint8_t mouse_protocol;
  12. int8_t usb_mouse_buttons(uint8_t left, uint8_t middle, uint8_t right);
  13. int8_t usb_mouse_move(int8_t x, int8_t y, int8_t wheel, int8_t hwheel);
  14. void usb_mouse_clear(void);
  15. bool usb_mouse_is_sent(void);
  16. void usb_mouse_print(int8_t mouse_x, int8_t mouse_y, int8_t wheel_v, int8_t wheel_h);
  17. #endif