]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - tmk_core/common/keyboard.c
core: Fix variable init and header include
[max/tmk_keyboard.git] / tmk_core / common / keyboard.c
index f0ead604eccb87567c4984a67adf2bb7efa10434..eb7b096bed501e32b65702c98f9da27c3e912791 100644 (file)
@@ -39,6 +39,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #ifdef SERIAL_MOUSE_ENABLE
 #include "serial_mouse.h"
 #endif
+#ifdef ADB_MOUSE_ENABLE
+#include "adb.h"
+#endif
 
 
 #ifdef MATRIX_HAS_GHOST
@@ -59,6 +62,12 @@ static bool has_ghost_in_row(uint8_t row)
 #endif
 
 
+__attribute__ ((weak)) void matrix_setup(void) {}
+void keyboard_setup(void)
+{
+    matrix_setup();
+}
+
 void keyboard_init(void)
 {
     timer_init();
@@ -69,6 +78,9 @@ void keyboard_init(void)
 #ifdef SERIAL_MOUSE_ENABLE
     serial_mouse_init();
 #endif
+#ifdef ADB_MOUSE_ENABLE
+    adb_mouse_init();
+#endif
 
 
 #ifdef BOOTMAGIC_ENABLE
@@ -147,6 +159,10 @@ MATRIX_LOOP_END:
         serial_mouse_task();
 #endif
 
+#ifdef ADB_MOUSE_ENABLE
+        adb_mouse_task();
+#endif
+
     // update LED
     if (led_status != host_keyboard_leds()) {
         led_status = host_keyboard_leds();