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.

ps2_mouse.h 616B

1234567891011121314151617181920212223242526
  1. #ifndef PS2_MOUSE_H
  2. #define PS2_MOUSE_H
  3. #include <stdbool.h>
  4. #define PS2_MOUSE_BTN_MASK 0x07
  5. #define PS2_MOUSE_BTN_LEFT 0
  6. #define PS2_MOUSE_BTN_RIGHT 1
  7. #define PS2_MOUSE_BTN_MIDDLE 2
  8. #define PS2_MOUSE_X_SIGN 4
  9. #define PS2_MOUSE_Y_SIGN 5
  10. #define PS2_MOUSE_X_OVFLW 6
  11. #define PS2_MOUSE_Y_OVFLW 7
  12. extern uint8_t ps2_mouse_x;
  13. extern uint8_t ps2_mouse_y;
  14. extern uint8_t ps2_mouse_btn;
  15. extern uint8_t ps2_mouse_error_count;
  16. void ps2_mouse_init(void);
  17. void ps2_mouse_read(void);
  18. bool ps2_mouse_changed(void);
  19. void ps2_mouse_usb_send(void);
  20. void ps2_mouse_print(void);
  21. #endif