From 3be13d1ffb43216aff1300cdce79512559bdde7c Mon Sep 17 00:00:00 2001 From: ofples Date: Fri, 25 Nov 2016 09:15:12 +0200 Subject: [PATCH 1/4] Added protocol.mk to build --- build_keyboard.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/build_keyboard.mk b/build_keyboard.mk index 61aebf3935..055ce632ae 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -199,6 +199,7 @@ endif VPATH += $(KEYBOARD_PATH) VPATH += $(COMMON_VPATH) +include $(TMK_PATH)/protocol.mk include $(TMK_PATH)/common.mk SRC += $(TMK_COMMON_SRC) From 03d6e165bb0baf9d0093250d3c3c0771290df4d6 Mon Sep 17 00:00:00 2001 From: ofples Date: Fri, 25 Nov 2016 09:17:40 +0200 Subject: [PATCH 2/4] Added missing endif for ifdef __AVR_ATmega32U4__ and removed the unnecessary one at the end of the file --- quantum/config_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/config_common.h b/quantum/config_common.h index 8ed5f4a106..443473292d 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -76,6 +76,7 @@ } while(0) # else # error "USART configuration is needed." +# endif #endif // I'm fairly sure these aren't needed, but oh well - Jack @@ -125,4 +126,3 @@ #endif -#endif From 0c9d66eb59add717397ba83d508577073412ce86 Mon Sep 17 00:00:00 2001 From: ofples Date: Fri, 25 Nov 2016 09:20:41 +0200 Subject: [PATCH 3/4] Removed comment --- quantum/config_common.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/quantum/config_common.h b/quantum/config_common.h index 443473292d..6b525fe1c6 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -79,8 +79,6 @@ # endif #endif -// I'm fairly sure these aren't needed, but oh well - Jack - /* * PS/2 Interrupt configuration */ From 97e7486d4c8818f4a6b3e619729d6f4f6524a7d1 Mon Sep 17 00:00:00 2001 From: ofples Date: Fri, 25 Nov 2016 12:10:44 +0200 Subject: [PATCH 4/4] Added documentation for PS/2 mouse in readme --- readme.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/readme.md b/readme.md index 8615b48d55..0157b90724 100644 --- a/readme.md +++ b/readme.md @@ -1157,6 +1157,45 @@ The firmware supports 5 different light effects, and the color (hue, saturation, Please note the USB port can only supply a limited amount of power to the keyboard (500mA by standard, however, modern computer and most usb hubs can provide 700+mA.). According to the data of NeoPixel from Adafruit, 30 WS2812 LEDs require a 5V 1A power supply, LEDs used in this mod should not more than 20. +## PS/2 Mouse Support + +Its possible to hook up a PS/2 mouse (for example touchpads or trackpoints) to your keyboard as a composite device. +In order to do this you must first enable the option in your Makefile. + + PS2_MOUSE_ENABLE = yes + +Then, decide whether to use interrupts (better if your microcontroller supports them) or busywait, and enable the relevant option. + + PS2_USE_INT = yes + // PS2_USE_BUSYWAIT = yes + +If you're using a teensy and have hooked up the clock on your PS/2 device to D1 and the data to D0, you're all set. +Otherwise, you will need to update the following defines in your `config.h`: + + #define PS2_CLOCK_PORT PORTD + #define PS2_CLOCK_PIN PIND + #define PS2_CLOCK_DDR DDRD + #define PS2_CLOCK_BIT 1 + + #define PS2_DATA_PORT PORTD + #define PS2_DATA_PIN PIND + #define PS2_DATA_DDR DDRD + #define PS2_DATA_BIT 0 + +And with `PS2_USE_INT` also define these macros: + + #define PS2_INT_INIT() do { \ + EICRA |= ((1<