diff options
Diffstat (limited to 'readme.md')
-rw-r--r-- | readme.md | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -1157,6 +1157,45 @@ The firmware supports 5 different light effects, and the color (hue, saturation, | |||
1157 | 1157 | ||
1158 | 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. | 1158 | 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. |
1159 | 1159 | ||
1160 | ## PS/2 Mouse Support | ||
1161 | |||
1162 | Its possible to hook up a PS/2 mouse (for example touchpads or trackpoints) to your keyboard as a composite device. | ||
1163 | In order to do this you must first enable the option in your Makefile. | ||
1164 | |||
1165 | PS2_MOUSE_ENABLE = yes | ||
1166 | |||
1167 | Then, 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 | |||
1172 | 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. | ||
1173 | Otherwise, 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 | |||
1185 | And 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 | ||
1162 | You probably don't want to "brick" your keyboard, making it impossible | 1201 | You probably don't want to "brick" your keyboard, making it impossible |