diff options
Diffstat (limited to 'docs/feature_ps2_mouse.md')
| -rw-r--r-- | docs/feature_ps2_mouse.md | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/docs/feature_ps2_mouse.md b/docs/feature_ps2_mouse.md index 8e84e22d8..776a33150 100644 --- a/docs/feature_ps2_mouse.md +++ b/docs/feature_ps2_mouse.md | |||
| @@ -50,7 +50,7 @@ In your keyboard config.h: | |||
| 50 | #endif | 50 | #endif |
| 51 | ``` | 51 | ``` |
| 52 | 52 | ||
| 53 | ## Interrupt Version :id=interrupt-version | 53 | ### Interrupt Version (AVR/ATMega32u4) :id=interrupt-version-avr |
| 54 | 54 | ||
| 55 | The following example uses D2 for clock and D5 for data. You can use any INT or PCINT pin for clock, and any pin for data. | 55 | The following example uses D2 for clock and D5 for data. You can use any INT or PCINT pin for clock, and any pin for data. |
| 56 | 56 | ||
| @@ -88,7 +88,31 @@ In your keyboard config.h: | |||
| 88 | #endif | 88 | #endif |
| 89 | ``` | 89 | ``` |
| 90 | 90 | ||
| 91 | ## USART Version :id=usart-version | 91 | ### Interrupt Version (ARM chibios) :id=interrupt-version-chibios |
| 92 | |||
| 93 | Pretty much any two pins can be used for the (software) interrupt variant on ARM cores. The example below uses A8 for clock, and A9 for data. | ||
| 94 | |||
| 95 | In rules.mk: | ||
| 96 | |||
| 97 | ``` | ||
| 98 | PS2_MOUSE_ENABLE = yes | ||
| 99 | PS2_USE_INT = yes | ||
| 100 | ``` | ||
| 101 | |||
| 102 | In your keyboard config.h: | ||
| 103 | |||
| 104 | ```c | ||
| 105 | #define PS2_CLOCK A8 | ||
| 106 | #define PS2_DATA A9 | ||
| 107 | ``` | ||
| 108 | |||
| 109 | And in the chibios specifig halconf.h: | ||
| 110 | ```c | ||
| 111 | #define PAL_USE_CALLBACKS TRUE | ||
| 112 | ``` | ||
| 113 | |||
| 114 | |||
| 115 | ### USART Version :id=usart-version | ||
| 92 | 116 | ||
| 93 | To use USART on the ATMega32u4, you have to use PD5 for clock and PD2 for data. If one of those are unavailable, you need to use interrupt version. | 117 | To use USART on the ATMega32u4, you have to use PD5 for clock and PD2 for data. If one of those are unavailable, you need to use interrupt version. |
| 94 | 118 | ||
| @@ -246,6 +270,16 @@ Fine control over the scrolling is supported with the following defines: | |||
| 246 | #define PS2_MOUSE_SCROLL_DIVISOR_V 2 | 270 | #define PS2_MOUSE_SCROLL_DIVISOR_V 2 |
| 247 | ``` | 271 | ``` |
| 248 | 272 | ||
| 273 | ### Invert Mouse buttons :id=invert-buttons | ||
| 274 | |||
| 275 | To invert the left & right buttons you can put: | ||
| 276 | |||
| 277 | ```c | ||
| 278 | #define PS2_MOUSE_INVERT_BUTTONS | ||
| 279 | ``` | ||
| 280 | |||
| 281 | into config.h. | ||
| 282 | |||
| 249 | ### Invert Mouse and Scroll Axes :id=invert-mouse-and-scroll-axes | 283 | ### Invert Mouse and Scroll Axes :id=invert-mouse-and-scroll-axes |
| 250 | 284 | ||
| 251 | To invert the X and Y axes you can put: | 285 | To invert the X and Y axes you can put: |
