summaryrefslogtreecommitdiffstats
path: root/docs/feature_ps2_mouse.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/feature_ps2_mouse.md')
-rw-r--r--docs/feature_ps2_mouse.md38
1 files changed, 36 insertions, 2 deletions
diff --git a/docs/feature_ps2_mouse.md b/docs/feature_ps2_mouse.md
index 8e84e22d8a..776a33150e 100644
--- a/docs/feature_ps2_mouse.md
+++ b/docs/feature_ps2_mouse.md
@@ -50,7 +50,7 @@ In your keyboard config.h:
#endif
```
-## Interrupt Version :id=interrupt-version
+### Interrupt Version (AVR/ATMega32u4) :id=interrupt-version-avr
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.
@@ -88,7 +88,31 @@ In your keyboard config.h:
#endif
```
-## USART Version :id=usart-version
+### Interrupt Version (ARM chibios) :id=interrupt-version-chibios
+
+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.
+
+In rules.mk:
+
+```
+PS2_MOUSE_ENABLE = yes
+PS2_USE_INT = yes
+```
+
+In your keyboard config.h:
+
+```c
+#define PS2_CLOCK A8
+#define PS2_DATA A9
+```
+
+And in the chibios specifig halconf.h:
+```c
+#define PAL_USE_CALLBACKS TRUE
+```
+
+
+### USART Version :id=usart-version
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.
@@ -246,6 +270,16 @@ Fine control over the scrolling is supported with the following defines:
#define PS2_MOUSE_SCROLL_DIVISOR_V 2
```
+### Invert Mouse buttons :id=invert-buttons
+
+To invert the left & right buttons you can put:
+
+```c
+#define PS2_MOUSE_INVERT_BUTTONS
+```
+
+into config.h.
+
### Invert Mouse and Scroll Axes :id=invert-mouse-and-scroll-axes
To invert the X and Y axes you can put: