aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-11-20 11:19:59 +0900
committertmk <nobody@nowhere>2013-11-20 11:32:09 +0900
commitd7f663a1ea4487a6dc5be76085eff7b00bec9704 (patch)
tree8bbec9b81d8154aebb765b9734a7ce6abc47b832 /common
parent755e4d8b00a4f9be0c50c2b005d063b94c528f8c (diff)
downloadqmk_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.c6
-rw-r--r--common/action.h1
-rw-r--r--common/host.c8
-rw-r--r--common/host.h6
-rw-r--r--common/keyboard.c4
-rw-r--r--common/mousekey.c1
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
488bool sending_anykey(void)
489{
490 return (has_anykey() || host_mouse_in_use() ||
491 host_last_sysytem_report() || host_last_consumer_report());
492}
493
494bool is_tap_key(key_t key) 488bool 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);
65void clear_keyboard(void); 65void clear_keyboard(void);
66void clear_keyboard_but_mods(void); 66void clear_keyboard_but_mods(void);
67bool sending_anykey(void);
68void layer_switch(uint8_t new_layer); 67void layer_switch(uint8_t new_layer);
69bool is_tap_key(key_t key); 68bool 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/>.
27bool keyboard_nkro = false; 27bool keyboard_nkro = false;
28#endif 28#endif
29 29
30report_mouse_t mouse_report = {};
31
32
33static host_driver_t *driver; 30static host_driver_t *driver;
34static uint16_t last_system_report = 0; 31static uint16_t last_system_report = 0;
35static uint16_t last_consumer_report = 0; 32static 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
92uint8_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
97uint16_t host_last_sysytem_report(void) 89uint16_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" {
32extern bool keyboard_nkro; 32extern bool keyboard_nkro;
33#endif 33#endif
34 34
35/* report */
36extern report_mouse_t mouse_report;
37
38 35
39/* host driver */ 36/* host driver */
40void host_set_driver(host_driver_t *driver); 37void host_set_driver(host_driver_t *driver);
@@ -47,9 +44,6 @@ void host_mouse_send(report_mouse_t *report);
47void host_system_send(uint16_t data); 44void host_system_send(uint16_t data);
48void host_consumer_send(uint16_t data); 45void host_consumer_send(uint16_t data);
49 46
50/* mouse report utils */
51uint8_t host_mouse_in_use(void);
52
53uint16_t host_last_sysytem_report(void); 47uint16_t host_last_sysytem_report(void);
54uint16_t host_last_consumer_report(void); 48uint16_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
29static report_mouse_t mouse_report = {};
29static uint8_t mousekey_repeat = 0; 30static uint8_t mousekey_repeat = 0;
30static uint8_t mousekey_accel = 0; 31static uint8_t mousekey_accel = 0;
31 32