summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-10-20 20:07:40 +0100
committerGitHub <noreply@github.com>2021-10-20 20:07:40 +0100
commit84d5198ef9b4106fe61530211b5b5bb1a2fc52c8 (patch)
treebcb35e8dbd2fab837fbe19b2dadd0e5df2d2e39a /keyboards
parent1fb2a0c74e926806f58fdbec990ca9aa7bb376a9 (diff)
Align PS/2 GPIO defines (#14745)
* Align PS/2 GPIO * Align PS/2 GPIO * refactor more keyboards * Remove more defines * Put back avr/chibios split * format
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/converter/ibm_terminal/config.h33
-rw-r--r--keyboards/evyd13/gh80_3700/keymaps/ps2/config.h10
-rw-r--r--keyboards/handwired/108key_trackpoint/config.h10
-rw-r--r--keyboards/handwired/promethium/config.h30
-rw-r--r--keyboards/handwired/trackpoint/config.h10
-rwxr-xr-xkeyboards/kapcave/paladin64/config.h20
6 files changed, 22 insertions, 91 deletions
diff --git a/keyboards/converter/ibm_terminal/config.h b/keyboards/converter/ibm_terminal/config.h
index 6895f08e7a..2cd36c5fb0 100644
--- a/keyboards/converter/ibm_terminal/config.h
+++ b/keyboards/converter/ibm_terminal/config.h
@@ -45,15 +45,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef PS2_USE_USART
/* XCK for clock line */
-#define PS2_CLOCK_PORT PORTD
-#define PS2_CLOCK_PIN PIND
-#define PS2_CLOCK_DDR DDRD
-#define PS2_CLOCK_BIT 5
-/* RXD for data line */
-#define PS2_DATA_PORT PORTD
-#define PS2_DATA_PIN PIND
-#define PS2_DATA_DDR DDRD
-#define PS2_DATA_BIT 2
+#define PS2_CLOCK_PIN D5
+#define PS2_DATA_PIN D2
/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
/* set DDR of CLOCK as input to be slave */
@@ -93,15 +86,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef PS2_USE_INT
/* uses INT1 for clock line(ATMega32U4) */
-#define PS2_CLOCK_PORT PORTD
-#define PS2_CLOCK_PIN PIND
-#define PS2_CLOCK_DDR DDRD
-#define PS2_CLOCK_BIT 1
-
-#define PS2_DATA_PORT PORTD
-#define PS2_DATA_PIN PIND
-#define PS2_DATA_DDR DDRD
-#define PS2_DATA_BIT 0
+#define PS2_CLOCK_PIN D1
+#define PS2_DATA_PIN D0
#define PS2_INT_INIT() do { \
EICRA |= ((1<<ISC11) | \
@@ -121,13 +107,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* PS/2 Busywait configuration
*/
#ifdef PS2_USE_BUSYWAIT
-#define PS2_CLOCK_PORT PORTD
-#define PS2_CLOCK_PIN PIND
-#define PS2_CLOCK_DDR DDRD
-#define PS2_CLOCK_BIT 1
-
-#define PS2_DATA_PORT PORTD
-#define PS2_DATA_PIN PIND
-#define PS2_DATA_DDR DDRD
-#define PS2_DATA_BIT 0
+#define PS2_CLOCK_PIN D1
+#define PS2_DATA_PIN D0
#endif
diff --git a/keyboards/evyd13/gh80_3700/keymaps/ps2/config.h b/keyboards/evyd13/gh80_3700/keymaps/ps2/config.h
index 44ac7dcd03..b77ac95d7d 100644
--- a/keyboards/evyd13/gh80_3700/keymaps/ps2/config.h
+++ b/keyboards/evyd13/gh80_3700/keymaps/ps2/config.h
@@ -17,14 +17,8 @@
#pragma once
#ifdef PS2_USE_USART
-#define PS2_CLOCK_PORT PORTD
-#define PS2_CLOCK_PIN PIND
-#define PS2_CLOCK_DDR DDRD
-#define PS2_CLOCK_BIT 5
-#define PS2_DATA_PORT PORTD
-#define PS2_DATA_PIN PIND
-#define PS2_DATA_DDR DDRD
-#define PS2_DATA_BIT 2
+#define PS2_CLOCK_PIN D5
+#define PS2_DATA_PIN D2
/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
/* set DDR of CLOCK as input to be slave */
diff --git a/keyboards/handwired/108key_trackpoint/config.h b/keyboards/handwired/108key_trackpoint/config.h
index b1ac790d76..b5bf98271a 100644
--- a/keyboards/handwired/108key_trackpoint/config.h
+++ b/keyboards/handwired/108key_trackpoint/config.h
@@ -12,14 +12,8 @@
#define MATRIX_COLS 23
#ifdef PS2_USE_USART
- #define PS2_CLOCK_PORT PORTD
- #define PS2_CLOCK_PIN PIND
- #define PS2_CLOCK_DDR DDRD
- #define PS2_CLOCK_BIT 5
- #define PS2_DATA_PORT PORTD
- #define PS2_DATA_PIN PIND
- #define PS2_DATA_DDR DDRD
- #define PS2_DATA_BIT 2
+#define PS2_CLOCK_PIN D5
+#define PS2_DATA_PIN D2
/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
/* set DDR of CLOCK as input to be slave */
diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h
index b146767d65..612675c63a 100644
--- a/keyboards/handwired/promethium/config.h
+++ b/keyboards/handwired/promethium/config.h
@@ -224,27 +224,15 @@ enum led_sequence {
/* PS/2 mouse */
#ifdef PS2_USE_BUSYWAIT
-# define PS2_CLOCK_PORT PORTD
-# define PS2_CLOCK_PIN PIND
-# define PS2_CLOCK_DDR DDRD
-# define PS2_CLOCK_BIT 3
-# define PS2_DATA_PORT PORTD
-# define PS2_DATA_PIN PIND
-# define PS2_DATA_DDR DDRD
-# define PS2_DATA_BIT 2
+# define PS2_CLOCK_PIN D3
+# define PS2_DATA_PIN D2
#endif
/* PS/2 mouse interrupt version */
#ifdef PS2_USE_INT
/* uses INT1 for clock line(ATMega32U4) */
-# define PS2_CLOCK_PORT PORTD
-# define PS2_CLOCK_PIN PIND
-# define PS2_CLOCK_DDR DDRD
-# define PS2_CLOCK_BIT 3
-# define PS2_DATA_PORT PORTD
-# define PS2_DATA_PIN PIND
-# define PS2_DATA_DDR DDRD
-# define PS2_DATA_BIT 2
+# define PS2_CLOCK_PIN D3
+# define PS2_DATA_PIN D2
# define PS2_INT_INIT() \
do { \
@@ -264,14 +252,8 @@ enum led_sequence {
/* PS/2 mouse USART version */
#ifdef PS2_USE_USART
/* XCK for clock line and RXD for data line */
-# define PS2_CLOCK_PORT PORTD
-# define PS2_CLOCK_PIN PIND
-# define PS2_CLOCK_DDR DDRD
-# define PS2_CLOCK_BIT 5
-# define PS2_DATA_PORT PORTD
-# define PS2_DATA_PIN PIND
-# define PS2_DATA_DDR DDRD
-# define PS2_DATA_BIT 2
+#define PS2_CLOCK_PIN D5
+#define PS2_DATA_PIN D2
/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
/* set DDR of CLOCK as input to be slave */
diff --git a/keyboards/handwired/trackpoint/config.h b/keyboards/handwired/trackpoint/config.h
index 1429136f40..cf8b5605f4 100644
--- a/keyboards/handwired/trackpoint/config.h
+++ b/keyboards/handwired/trackpoint/config.h
@@ -12,14 +12,8 @@
#define MATRIX_COLS 3
#ifdef PS2_USE_USART
- #define PS2_CLOCK_PORT PORTD
- #define PS2_CLOCK_PIN PIND
- #define PS2_CLOCK_DDR DDRD
- #define PS2_CLOCK_BIT 5
- #define PS2_DATA_PORT PORTD
- #define PS2_DATA_PIN PIND
- #define PS2_DATA_DDR DDRD
- #define PS2_DATA_BIT 2
+#define PS2_CLOCK_PIN D5
+#define PS2_DATA_PIN D2
/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
/* set DDR of CLOCK as input to be slave */
diff --git a/keyboards/kapcave/paladin64/config.h b/keyboards/kapcave/paladin64/config.h
index 2685be96cf..7c3d1a0fa1 100755
--- a/keyboards/kapcave/paladin64/config.h
+++ b/keyboards/kapcave/paladin64/config.h
@@ -34,14 +34,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Only required if you add in a trackpoint hardware to the pcb */
#ifdef PS2_USE_USART
- #define PS2_CLOCK_PORT PORTD
- #define PS2_CLOCK_PIN PIND
- #define PS2_CLOCK_DDR DDRD
- #define PS2_CLOCK_BIT 5
- #define PS2_DATA_PORT PORTD
- #define PS2_DATA_PIN PIND
- #define PS2_DATA_DDR DDRD
- #define PS2_DATA_BIT 2
+#define PS2_CLOCK_PIN D5
+#define PS2_DATA_PIN D2
/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling
* edge */
@@ -77,14 +71,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif
#ifdef PS2_USE_INT
-#define PS2_CLOCK_PORT PORTD
-#define PS2_CLOCK_PIN PIND
-#define PS2_CLOCK_DDR DDRD
-#define PS2_CLOCK_BIT 2
-#define PS2_DATA_PORT PORTD
-#define PS2_DATA_PIN PIND
-#define PS2_DATA_DDR DDRD
-#define PS2_DATA_BIT 5
+#define PS2_CLOCK_PIN D2
+#define PS2_DATA_PIN D5
#define PS2_INT_INIT() do { \
EICRA |= ((1<<ISC21) | \