diff options
author | tmk <nobody@nowhere> | 2013-11-20 11:19:59 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2013-11-20 11:32:09 +0900 |
commit | d7f663a1ea4487a6dc5be76085eff7b00bec9704 (patch) | |
tree | 8bbec9b81d8154aebb765b9734a7ce6abc47b832 /protocol/ps2_mouse.h | |
parent | 755e4d8b00a4f9be0c50c2b005d063b94c528f8c (diff) | |
download | qmk_firmware-d7f663a1ea4487a6dc5be76085eff7b00bec9704.tar.gz qmk_firmware-d7f663a1ea4487a6dc5be76085eff7b00bec9704.zip |
Fix to build ps2_mouse with both LUFA and PJRC
- change API of ps2_mouse; ps2_mouse_task()
- remove mouse_report from host.c
Diffstat (limited to 'protocol/ps2_mouse.h')
-rw-r--r-- | protocol/ps2_mouse.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/protocol/ps2_mouse.h b/protocol/ps2_mouse.h index 4529ce1132..305a9bdbaa 100644 --- a/protocol/ps2_mouse.h +++ b/protocol/ps2_mouse.h @@ -20,6 +20,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <stdbool.h> +#define PS2_MOUSE_READ_DATA 0xEB + +/* + * Data format: + * byte|7 6 5 4 3 2 1 0 + * ----+-------------------------------------------------------------- + * 0|Yovflw Xovflw Ysign Xsign 1 Middle Right Left + * 1| X movement(0-255) + * 2| Y movement(0-255) + */ #define PS2_MOUSE_BTN_MASK 0x07 #define PS2_MOUSE_BTN_LEFT 0 #define PS2_MOUSE_BTN_RIGHT 1 @@ -29,16 +39,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define PS2_MOUSE_X_OVFLW 6 #define PS2_MOUSE_Y_OVFLW 7 -bool ps2_mouse_enable; -extern uint8_t ps2_mouse_x; -extern uint8_t ps2_mouse_y; -extern uint8_t ps2_mouse_btn; -extern uint8_t ps2_mouse_error_count; - uint8_t ps2_mouse_init(void); -uint8_t ps2_mouse_read(void); -bool ps2_mouse_changed(void); -void ps2_mouse_usb_send(void); -void ps2_mouse_print(void); +void ps2_mouse_task(void); #endif |