diff options
author | Joel Challis <git@zvecr.com> | 2021-10-20 20:07:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-20 20:07:40 +0100 |
commit | 84d5198ef9b4106fe61530211b5b5bb1a2fc52c8 (patch) | |
tree | bcb35e8dbd2fab837fbe19b2dadd0e5df2d2e39a /docs | |
parent | 1fb2a0c74e926806f58fdbec990ca9aa7bb376a9 (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 'docs')
-rw-r--r-- | docs/feature_ps2_mouse.md | 34 | ||||
-rw-r--r-- | docs/ja/feature_ps2_mouse.md | 31 |
2 files changed, 15 insertions, 50 deletions
diff --git a/docs/feature_ps2_mouse.md b/docs/feature_ps2_mouse.md index 433a47fa9b..c980705ae7 100644 --- a/docs/feature_ps2_mouse.md +++ b/docs/feature_ps2_mouse.md @@ -39,14 +39,8 @@ In your keyboard config.h: ```c #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 2 +# define PS2_CLOCK_PIN D1 +# define PS2_DATA_PIN D2 #endif ``` @@ -65,14 +59,8 @@ In your keyboard config.h: ```c #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) | \ @@ -102,8 +90,8 @@ PS2_USE_INT = yes In your keyboard config.h: ```c -#define PS2_CLOCK A8 -#define PS2_DATA A9 +#define PS2_CLOCK_PIN A8 +#define PS2_DATA_PIN A9 ``` And in the chibios specifig halconf.h: @@ -127,14 +115,8 @@ In your keyboard config.h: ```c #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/docs/ja/feature_ps2_mouse.md b/docs/ja/feature_ps2_mouse.md index 3d69411307..569934c187 100644 --- a/docs/ja/feature_ps2_mouse.md +++ b/docs/ja/feature_ps2_mouse.md @@ -43,14 +43,8 @@ PS2_USE_BUSYWAIT = yes ```c #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 2 +# define PS2_CLOCK_PIN D1 +# define PS2_DATA_PIN D2 #endif ``` @@ -69,14 +63,8 @@ PS2_USE_INT = yes ```c #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) | \ @@ -107,14 +95,9 @@ PS2_USE_USART = yes ```c #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 +#ifdef PS2_USE_USART +#define PS2_CLOCK_PIN D5 +#define PS2_DATA_PIN D2 /* 同期、奇数パリティ、1-bit ストップ、8-bit データ、立ち下がりエッジでサンプル */ /* CLOCK の DDR を入力としてスレーブに設定 */ |