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 /common | |
| 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 'common')
| -rw-r--r-- | common/action.c | 6 | ||||
| -rw-r--r-- | common/action.h | 1 | ||||
| -rw-r--r-- | common/host.c | 8 | ||||
| -rw-r--r-- | common/host.h | 6 | ||||
| -rw-r--r-- | common/keyboard.c | 4 | ||||
| -rw-r--r-- | common/mousekey.c | 1 |
6 files changed, 2 insertions, 24 deletions
diff --git a/common/action.c b/common/action.c index f7ae85b94..485abf81e 100644 --- a/common/action.c +++ b/common/action.c | |||
| @@ -485,12 +485,6 @@ void clear_keyboard_but_mods(void) | |||
| 485 | #endif | 485 | #endif |
| 486 | } | 486 | } |
| 487 | 487 | ||
| 488 | bool sending_anykey(void) | ||
| 489 | { | ||
| 490 | return (has_anykey() || host_mouse_in_use() || | ||
| 491 | host_last_sysytem_report() || host_last_consumer_report()); | ||
| 492 | } | ||
| 493 | |||
| 494 | bool is_tap_key(key_t key) | 488 | bool is_tap_key(key_t key) |
| 495 | { | 489 | { |
| 496 | action_t action = layer_switch_get_action(key); | 490 | action_t action = layer_switch_get_action(key); |
diff --git a/common/action.h b/common/action.h index d57f4a86f..077711c23 100644 --- a/common/action.h +++ b/common/action.h | |||
| @@ -64,7 +64,6 @@ void unregister_mods(uint8_t mods); | |||
| 64 | //void set_mods(uint8_t mods); | 64 | //void set_mods(uint8_t mods); |
| 65 | void clear_keyboard(void); | 65 | void clear_keyboard(void); |
| 66 | void clear_keyboard_but_mods(void); | 66 | void clear_keyboard_but_mods(void); |
| 67 | bool sending_anykey(void); | ||
| 68 | void layer_switch(uint8_t new_layer); | 67 | void layer_switch(uint8_t new_layer); |
| 69 | bool is_tap_key(key_t key); | 68 | bool is_tap_key(key_t key); |
| 70 | 69 | ||
diff --git a/common/host.c b/common/host.c index 0703dba01..1eafef75c 100644 --- a/common/host.c +++ b/common/host.c | |||
| @@ -27,9 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 27 | bool keyboard_nkro = false; | 27 | bool keyboard_nkro = false; |
| 28 | #endif | 28 | #endif |
| 29 | 29 | ||
| 30 | report_mouse_t mouse_report = {}; | ||
| 31 | |||
| 32 | |||
| 33 | static host_driver_t *driver; | 30 | static host_driver_t *driver; |
| 34 | static uint16_t last_system_report = 0; | 31 | static uint16_t last_system_report = 0; |
| 35 | static uint16_t last_consumer_report = 0; | 32 | static uint16_t last_consumer_report = 0; |
| @@ -89,11 +86,6 @@ void host_consumer_send(uint16_t report) | |||
| 89 | (*driver->send_consumer)(report); | 86 | (*driver->send_consumer)(report); |
| 90 | } | 87 | } |
| 91 | 88 | ||
| 92 | uint8_t host_mouse_in_use(void) | ||
| 93 | { | ||
| 94 | return (mouse_report.buttons | mouse_report.x | mouse_report.y | mouse_report.v | mouse_report.h); | ||
| 95 | } | ||
| 96 | |||
| 97 | uint16_t host_last_sysytem_report(void) | 89 | uint16_t host_last_sysytem_report(void) |
| 98 | { | 90 | { |
| 99 | return last_system_report; | 91 | return last_system_report; |
diff --git a/common/host.h b/common/host.h index c1a0fbac4..8ff262985 100644 --- a/common/host.h +++ b/common/host.h | |||
| @@ -32,9 +32,6 @@ extern "C" { | |||
| 32 | extern bool keyboard_nkro; | 32 | extern bool keyboard_nkro; |
| 33 | #endif | 33 | #endif |
| 34 | 34 | ||
| 35 | /* report */ | ||
| 36 | extern report_mouse_t mouse_report; | ||
| 37 | |||
| 38 | 35 | ||
| 39 | /* host driver */ | 36 | /* host driver */ |
| 40 | void host_set_driver(host_driver_t *driver); | 37 | void host_set_driver(host_driver_t *driver); |
| @@ -47,9 +44,6 @@ void host_mouse_send(report_mouse_t *report); | |||
| 47 | void host_system_send(uint16_t data); | 44 | void host_system_send(uint16_t data); |
| 48 | void host_consumer_send(uint16_t data); | 45 | void host_consumer_send(uint16_t data); |
| 49 | 46 | ||
| 50 | /* mouse report utils */ | ||
| 51 | uint8_t host_mouse_in_use(void); | ||
| 52 | |||
| 53 | uint16_t host_last_sysytem_report(void); | 47 | uint16_t host_last_sysytem_report(void); |
| 54 | uint16_t host_last_consumer_report(void); | 48 | uint16_t host_last_consumer_report(void); |
| 55 | 49 | ||
diff --git a/common/keyboard.c b/common/keyboard.c index 63a58b218..2b66f20a0 100644 --- a/common/keyboard.c +++ b/common/keyboard.c | |||
| @@ -123,9 +123,7 @@ MATRIX_LOOP_END: | |||
| 123 | #endif | 123 | #endif |
| 124 | 124 | ||
| 125 | #ifdef PS2_MOUSE_ENABLE | 125 | #ifdef PS2_MOUSE_ENABLE |
| 126 | if (ps2_mouse_read() == 0) { | 126 | ps2_mouse_task(); |
| 127 | ps2_mouse_usb_send(); | ||
| 128 | } | ||
| 129 | #endif | 127 | #endif |
| 130 | 128 | ||
| 131 | // update LED | 129 | // update LED |
diff --git a/common/mousekey.c b/common/mousekey.c index 3068fc5e3..017be9411 100644 --- a/common/mousekey.c +++ b/common/mousekey.c | |||
| @@ -26,6 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | 28 | ||
| 29 | static report_mouse_t mouse_report = {}; | ||
| 29 | static uint8_t mousekey_repeat = 0; | 30 | static uint8_t mousekey_repeat = 0; |
| 30 | static uint8_t mousekey_accel = 0; | 31 | static uint8_t mousekey_accel = 0; |
| 31 | 32 | ||
