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 579B

123456789101112131415161718192021222324252627
  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. #define MOUSE_BTN1 (1<<0)
  11. #define MOUSE_BTN2 (1<<1)
  12. #define MOUSE_BTN3 (1<<2)
  13. #define MOUSE_BTN4 (1<<3)
  14. #define MOUSE_BTN5 (1<<4)
  15. extern uint8_t usb_mouse_protocol;
  16. int8_t usb_mouse_send(int8_t x, int8_t y, int8_t wheel_v, int8_t wheel_h, uint8_t buttons);
  17. void usb_mouse_print(int8_t x, int8_t y, int8_t wheel_v, int8_t wheel_h, uint8_t buttons);
  18. #endif