Add mouse support to ADB

Adding the makefile options ADB_MOUSE_ENABLE and ADB_MOUSE_ACCMAX.
Might have gone overboard with comments, and tried but failed at not
adding more than necessary outside the converter/adb_usb/ folder.
This commit is contained in:
Mekaniserad Apelsin 2015-04-26 08:08:54 +02:00
parent 55fc97f957
commit 7780fd1c01
8 changed files with 114 additions and 1 deletions

View 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
@ -69,6 +72,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 +153,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();