aboutsummaryrefslogtreecommitdiff
path: root/readme.md
diff options
context:
space:
mode:
authorofples <plesserofer@gmail.com>2016-11-25 12:10:44 +0200
committerofples <plesserofer@gmail.com>2016-11-25 12:10:44 +0200
commit97e7486d4c8818f4a6b3e619729d6f4f6524a7d1 (patch)
treea5e3bb927a48d7601f28e94e34ae5d29489d99bf /readme.md
parent0c9d66eb59add717397ba83d508577073412ce86 (diff)
downloadqmk_firmware-97e7486d4c8818f4a6b3e619729d6f4f6524a7d1.tar.gz
qmk_firmware-97e7486d4c8818f4a6b3e619729d6f4f6524a7d1.zip
Added documentation for PS/2 mouse in readme
Diffstat (limited to 'readme.md')
-rw-r--r--readme.md39
1 files changed, 39 insertions, 0 deletions
diff --git a/readme.md b/readme.md
index 8615b48d5..0157b9072 100644
--- a/readme.md
+++ b/readme.md
@@ -1157,6 +1157,45 @@ The firmware supports 5 different light effects, and the color (hue, saturation,
1157 1157
1158Please 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. 1158Please 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.
1159 1159
1160## PS/2 Mouse Support
1161
1162Its possible to hook up a PS/2 mouse (for example touchpads or trackpoints) to your keyboard as a composite device.
1163In order to do this you must first enable the option in your Makefile.
1164
1165 PS2_MOUSE_ENABLE = yes
1166
1167Then, decide whether to use interrupts (better if your microcontroller supports them) or busywait, and enable the relevant option.
1168
1169 PS2_USE_INT = yes
1170 // PS2_USE_BUSYWAIT = yes
1171
1172If 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.
1173Otherwise, you will need to update the following defines in your `config.h`:
1174
1175 #define PS2_CLOCK_PORT PORTD
1176 #define PS2_CLOCK_PIN PIND
1177 #define PS2_CLOCK_DDR DDRD
1178 #define PS2_CLOCK_BIT 1
1179
1180 #define PS2_DATA_PORT PORTD
1181 #define PS2_DATA_PIN PIND
1182 #define PS2_DATA_DDR DDRD
1183 #define PS2_DATA_BIT 0
1184
1185And with `PS2_USE_INT` also define these macros:
1186
1187 #define PS2_INT_INIT() do { \
1188 EICRA |= ((1<<ISC11) | \
1189 (0<<ISC10)); \
1190 } while (0)
1191 #define PS2_INT_ON() do { \
1192 EIMSK |= (1<<INT1); \
1193 } while (0)
1194 #define PS2_INT_OFF() do { \
1195 EIMSK &= ~(1<<INT1); \
1196 } while (0)
1197 #define PS2_INT_VECT INT1_vect
1198
1160## Safety Considerations 1199## Safety Considerations
1161 1200
1162You probably don't want to "brick" your keyboard, making it impossible 1201You probably don't want to "brick" your keyboard, making it impossible