diff --git a/readme.md b/readme.md index 0157b9072..3eb67882a 100644 --- a/readme.md +++ b/readme.md @@ -1160,41 +1160,131 @@ Please note the USB port can only supply a limited amount of power to the keyboa ## 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 USART (best), interrupts (better) or busywait (not recommended), and enable the relevant option. -Then, decide whether to use interrupts (better if your microcontroller supports them) or busywait, and enable the relevant option. +### Busywait version - PS2_USE_INT = yes - // PS2_USE_BUSYWAIT = yes +Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible. -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 +In rules.mk: - #define PS2_DATA_PORT PORTD - #define PS2_DATA_PIN PIND - #define PS2_DATA_DDR DDRD - #define PS2_DATA_BIT 0 +``` +PS2_MOUSE_ENABLE = yes +PS2_USE_BUSYWAIT = yes +``` -And with `PS2_USE_INT` also define these macros: +In your keyboard config.h: - #define PS2_INT_INIT() do { \ - EICRA |= ((1<