From 0237ff0c62d4278df3c0c93f5f85f84c1a0ed519 Mon Sep 17 00:00:00 2001 From: Marek Kraus Date: Wed, 31 Aug 2022 09:16:07 +0200 Subject: [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 * Add PS/2 pins to data driven mappings Co-authored-by: Drashna Jaelre --- keyboards/handwired/108key_trackpoint/config.h | 2 +- keyboards/handwired/108key_trackpoint/rules.mk | 3 ++- keyboards/handwired/promethium/config.h | 6 +++--- keyboards/handwired/promethium/keymaps/default/rules.mk | 3 ++- keyboards/handwired/promethium/keymaps/priyadi/rules.mk | 3 ++- keyboards/handwired/promethium/rules.mk | 3 ++- keyboards/handwired/trackpoint/config.h | 2 +- keyboards/handwired/trackpoint/rules.mk | 3 ++- 8 files changed, 15 insertions(+), 10 deletions(-) (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/108key_trackpoint/config.h b/keyboards/handwired/108key_trackpoint/config.h index 703cd93e64..fccdf6424c 100644 --- a/keyboards/handwired/108key_trackpoint/config.h +++ b/keyboards/handwired/108key_trackpoint/config.h @@ -5,7 +5,7 @@ #define MATRIX_ROWS 8 #define MATRIX_COLS 23 -#ifdef PS2_USE_USART +#ifdef PS2_DRIVER_USART #define PS2_CLOCK_PIN D5 #define PS2_DATA_PIN D2 diff --git a/keyboards/handwired/108key_trackpoint/rules.mk b/keyboards/handwired/108key_trackpoint/rules.mk index ab84b088bc..24f1d9b652 100644 --- a/keyboards/handwired/108key_trackpoint/rules.mk +++ b/keyboards/handwired/108key_trackpoint/rules.mk @@ -17,4 +17,5 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output PS2_MOUSE_ENABLE = yes -PS2_USE_USART = yes +PS2_ENABLE = yes +PS2_DRIVER = usart diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index a447a70abd..9ebcc0bf53 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -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 diff --git a/keyboards/handwired/promethium/keymaps/default/rules.mk b/keyboards/handwired/promethium/keymaps/default/rules.mk index 0183f5fa91..598ade50b8 100644 --- a/keyboards/handwired/promethium/keymaps/default/rules.mk +++ b/keyboards/handwired/promethium/keymaps/default/rules.mk @@ -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 diff --git a/keyboards/handwired/promethium/keymaps/priyadi/rules.mk b/keyboards/handwired/promethium/keymaps/priyadi/rules.mk index 96db4fcbbc..9db01c0a68 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/rules.mk +++ b/keyboards/handwired/promethium/keymaps/priyadi/rules.mk @@ -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 diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk index 383800ee01..3960980dff 100644 --- a/keyboards/handwired/promethium/rules.mk +++ b/keyboards/handwired/promethium/rules.mk @@ -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 diff --git a/keyboards/handwired/trackpoint/config.h b/keyboards/handwired/trackpoint/config.h index a4b468faef..ed6b4f2180 100644 --- a/keyboards/handwired/trackpoint/config.h +++ b/keyboards/handwired/trackpoint/config.h @@ -5,7 +5,7 @@ #define MATRIX_ROWS 1 #define MATRIX_COLS 3 -#ifdef PS2_USE_USART +#ifdef PS2_DRIVER_USART #define PS2_CLOCK_PIN D5 #define PS2_DATA_PIN D2 diff --git a/keyboards/handwired/trackpoint/rules.mk b/keyboards/handwired/trackpoint/rules.mk index f471f00dfc..1a452149c9 100644 --- a/keyboards/handwired/trackpoint/rules.mk +++ b/keyboards/handwired/trackpoint/rules.mk @@ -17,4 +17,5 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no # Audio output PS2_MOUSE_ENABLE = yes -PS2_USE_USART = yes +PS2_ENABLE = yes +PS2_DRIVER = usart -- cgit v1.2.3