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

123456789101112131415161718192021222324252627
  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. bool ps2_mouse_enable;
  13. extern uint8_t ps2_mouse_x;
  14. extern uint8_t ps2_mouse_y;
  15. extern uint8_t ps2_mouse_btn;
  16. extern uint8_t ps2_mouse_error_count;
  17. uint8_t ps2_mouse_init(void);
  18. uint8_t ps2_mouse_read(void);
  19. bool ps2_mouse_changed(void);
  20. void ps2_mouse_usb_send(void);
  21. void ps2_mouse_print(void);
  22. #endif