123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #ifndef PS2_MOUSE_H
- #define PS2_MOUSE_H
- #include <stdbool.h>
- #define PS2_MOUSE_READ_DATA 0xEB
- #define PS2_MOUSE_BTN_MASK 0x07
- #define PS2_MOUSE_BTN_LEFT 0
- #define PS2_MOUSE_BTN_RIGHT 1
- #define PS2_MOUSE_BTN_MIDDLE 2
- #define PS2_MOUSE_X_SIGN 4
- #define PS2_MOUSE_Y_SIGN 5
- #define PS2_MOUSE_X_OVFLW 6
- #define PS2_MOUSE_Y_OVFLW 7
- #ifndef PS2_MOUSE_SCROLL_BTN_MASK
- #define PS2_MOUSE_SCROLL_BTN_MASK (1<<PS2_MOUSE_BTN_MIDDLE)
- #endif
- #ifndef PS2_MOUSE_SCROLL_BTN_SEND
- #define PS2_MOUSE_SCROLL_BTN_SEND 300
- #endif
- #ifndef PS2_MOUSE_SCROLL_DIVISOR_V
- #define PS2_MOUSE_SCROLL_DIVISOR_V 2
- #endif
- #ifndef PS2_MOUSE_SCROLL_DIVISOR_H
- #define PS2_MOUSE_SCROLL_DIVISOR_H 2
- #endif
- uint8_t ps2_mouse_init(void);
- void ps2_mouse_task(void);
- #endif
|