[Core] Rework PS/2 driver selection (#17892)

* [Core] Rework PS/2 driver selection

Enabling and selecting PS/2 driver was using old approach,
so it was reworked to current approach, inspired by Serial
and WS2812 driver selections.

* [Keyboard] Update keyboards using PS/2 to use new PS/2 driver selection

* [Docs] Update PS/2 documentation to use new PS/2 driver selection

* Fix indentation

* [Core] Add PS2 to data driver

* Fix oversight in property name

Co-authored-by: Drashna Jaelre <drashna@live.com>

* Add PS/2 pins to data driven mappings

Co-authored-by: Drashna Jaelre <drashna@live.com>
This commit is contained in:
Marek Kraus
2022-08-31 09:16:07 +02:00
committed by GitHub
parent ba7030d216
commit 0237ff0c62
26 changed files with 93 additions and 61 deletions

View File

@@ -210,13 +210,13 @@ enum led_sequence {
#endif
/* PS/2 mouse */
#ifdef PS2_USE_BUSYWAIT
#ifdef PS2_DRIVER_BUSYWAIT
# define PS2_CLOCK_PIN D3
# define PS2_DATA_PIN D2
#endif
/* PS/2 mouse interrupt version */
#ifdef PS2_USE_INT
#ifdef PS2_DRIVER_INTERRUPT
/* uses INT1 for clock line(ATMega32U4) */
# define PS2_CLOCK_PIN D3
# define PS2_DATA_PIN D2
@@ -237,7 +237,7 @@ enum led_sequence {
#endif
/* PS/2 mouse USART version */
#ifdef PS2_USE_USART
#ifdef PS2_DRIVER_USART
/* XCK for clock line and RXD for data line */
#define PS2_CLOCK_PIN D5
#define PS2_DATA_PIN D2

View File

@@ -9,4 +9,5 @@ AUDIO_ENABLE = no # Audio output
UNICODEMAP_ENABLE = yes
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
PS2_MOUSE_ENABLE = yes
PS2_USE_INT = yes
PS2_ENABLE = yes
PS2_DRIVER = interrupt

View File

@@ -17,7 +17,8 @@ UNICODE_ENABLE = no # Unicode
UNICODEMAP_ENABLE = yes
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
PS2_MOUSE_ENABLE = yes
PS2_USE_INT = yes
PS2_ENABLE = yes
PS2_DRIVER = interrupt
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend

View File

@@ -20,7 +20,8 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE = no # Audio output
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
PS2_MOUSE_ENABLE = yes
PS2_USE_INT = yes
PS2_ENABLE = yes
PS2_DRIVER = interrupt
CUSTOM_MATRIX = yes
BLUETOOTH_ENABLE = yes
BLUETOOTH_DRIVER = BluefruitLE