]> git.donarmstrong.com Git - tmk_firmware.git/blobdiff - common/keyboard.c
Merge branch 'rhaberkorn-serial-mouse'
[tmk_firmware.git] / common / keyboard.c
index 63a58b2187d7a35dfa1a610f318162d0b54888ce..020be8eadf2f09ad9bc1e94a32e7e83c5730c09d 100644 (file)
@@ -37,6 +37,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #ifdef PS2_MOUSE_ENABLE
 #   include "ps2_mouse.h"
 #endif
+#ifdef SERIAL_MOUSE_ENABLE
+#include "serial_mouse.h"
+#endif
 
 
 #ifdef MATRIX_HAS_GHOST
@@ -64,6 +67,10 @@ void keyboard_init(void)
 #ifdef PS2_MOUSE_ENABLE
     ps2_mouse_init();
 #endif
+#ifdef SERIAL_MOUSE_ENABLE
+    serial_mouse_init();
+#endif
+
 
 #ifdef BOOTMAGIC_ENABLE
     bootmagic();
@@ -123,9 +130,11 @@ MATRIX_LOOP_END:
 #endif
 
 #ifdef PS2_MOUSE_ENABLE
-    if (ps2_mouse_read() == 0) {
-        ps2_mouse_usb_send();
-    }
+    ps2_mouse_task();
+#endif
+
+#ifdef SERIAL_MOUSE_ENABLE
+        serial_mouse_task();
 #endif
 
     // update LED