aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJohSchneider <JohSchneider@googlemail.com>2021-08-05 21:51:24 +0000
committerGitHub <noreply@github.com>2021-08-06 07:51:24 +1000
commitbcb6e23387290afb64712314bfb095f8d96c1a4e (patch)
treec82814bce65ba34e28d7df885f23dd083d3c73d2 /docs
parent5bbc527460462fb9961fbd9f972cd5e1c49558da (diff)
downloadqmk_firmware-bcb6e23387290afb64712314bfb095f8d96c1a4e.tar.gz
qmk_firmware-bcb6e23387290afb64712314bfb095f8d96c1a4e.zip
Arm ps2 mouse interrupt (#6490)
* ps2_mouse on ARM: an interrupt-version of the ps2-mouse code ported to ARM/chibios * ps2_mouse on ARM: link EXT callback-channel selection to the user defined PS2_LINE_CLOCK * ps2_mouse on ARM: replace DELAY_X defines with hardware-agnostic wait_X * ps2_mouse on ARM: replace chibios-specific defines for the pins/lines with defines from quantum/config_common.h and drop the '_LINE' component from teh define name * ps2_mouse on ARM: expose the software-intterupt port as a user editable define * Update docs/feature_ps2_mouse.md Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com> * Update feature_ps2_mouse.md * use a define to deduce the PS_DATA_PORT instead * reduce all-zero extcfg to oneliner * ps2_mouse: use generic wait instead of avr-delay * Update docs/feature_ps2_mouse.md * ps2_mouse: changes for new chibios version (17.6.0 -> 19.1.0) replacing the legacy externa-interrupt driver with pal-callbacks * ps2_mouse: use PLATFORM_KEY Co-Authored-By: Joel Challis <git@zvecr.com> * ps2_mouse: clang-format corrections * ps2_mouse: add systemlocks using the chibios equivalent to AVRs cli: chSys[Unl|L]ock Co-authored-by: Johannes <you@example.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Joel Challis <git@zvecr.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/feature_ps2_mouse.md28
1 files changed, 26 insertions, 2 deletions
diff --git a/docs/feature_ps2_mouse.md b/docs/feature_ps2_mouse.md
index 8e84e22d8..00c7ee72e 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
55The 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. 55The 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
93Pretty 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
95In rules.mk:
96
97```
98PS2_MOUSE_ENABLE = yes
99PS2_USE_INT = yes
100```
101
102In your keyboard config.h:
103
104```c
105#define PS2_CLOCK A8
106#define PS2_DATA A9
107```
108
109And 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
93To 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. 117To 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