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) |
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 f7ae85b941..485abf81e3 100644 --- a/common/action.c +++ b/common/action.c @@ -485,12 +485,6 @@ void clear_keyboard_but_mods(void) #endif } -bool sending_anykey(void) -{ - return (has_anykey() || host_mouse_in_use() || - host_last_sysytem_report() || host_last_consumer_report()); -} - bool is_tap_key(key_t key) { action_t action = layer_switch_get_action(key); diff --git a/common/action.h b/common/action.h index d57f4a86ff..077711c231 100644 --- a/common/action.h +++ b/common/action.h @@ -64,7 +64,6 @@ void unregister_mods(uint8_t mods); //void set_mods(uint8_t mods); void clear_keyboard(void); void clear_keyboard_but_mods(void); -bool sending_anykey(void); void layer_switch(uint8_t new_layer); bool is_tap_key(key_t key); diff --git a/common/host.c b/common/host.c index 0703dba013..1eafef75cc 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/>. bool keyboard_nkro = false; #endif -report_mouse_t mouse_report = {}; - - static host_driver_t *driver; static uint16_t last_system_report = 0; static uint16_t last_consumer_report = 0; @@ -89,11 +86,6 @@ void host_consumer_send(uint16_t report) (*driver->send_consumer)(report); } -uint8_t host_mouse_in_use(void) -{ - return (mouse_report.buttons | mouse_report.x | mouse_report.y | mouse_report.v | mouse_report.h); -} - uint16_t host_last_sysytem_report(void) { return last_system_report; diff --git a/common/host.h b/common/host.h index c1a0fbac40..8ff2629852 100644 --- a/common/host.h +++ b/common/host.h @@ -32,9 +32,6 @@ extern "C" { extern bool keyboard_nkro; #endif -/* report */ -extern report_mouse_t mouse_report; - /* host driver */ void host_set_driver(host_driver_t *driver); @@ -47,9 +44,6 @@ void host_mouse_send(report_mouse_t *report); void host_system_send(uint16_t data); void host_consumer_send(uint16_t data); -/* mouse report utils */ -uint8_t host_mouse_in_use(void); - uint16_t host_last_sysytem_report(void); uint16_t host_last_consumer_report(void); diff --git a/common/keyboard.c b/common/keyboard.c index 63a58b2187..2b66f20a01 100644 --- a/common/keyboard.c +++ b/common/keyboard.c @@ -123,9 +123,7 @@ MATRIX_LOOP_END: #endif #ifdef PS2_MOUSE_ENABLE - if (ps2_mouse_read() == 0) { - ps2_mouse_usb_send(); - } + ps2_mouse_task(); #endif // update LED diff --git a/common/mousekey.c b/common/mousekey.c index 3068fc5e37..017be94116 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/>. +static report_mouse_t mouse_report = {}; static uint8_t mousekey_repeat = 0; static uint8_t mousekey_accel = 0; |