[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:
		
							parent
							
								
									ba7030d216
								
							
						
					
					
						commit
						0237ff0c62
					
				
					 26 changed files with 93 additions and 61 deletions
				
			
		| 
						 | 
				
			
			@ -36,13 +36,14 @@ rules.mk で:
 | 
			
		|||
 | 
			
		||||
```makefile
 | 
			
		||||
PS2_MOUSE_ENABLE = yes
 | 
			
		||||
PS2_USE_BUSYWAIT = yes
 | 
			
		||||
PS2_ENABLE = yes
 | 
			
		||||
PS2_DRIVER = busywait
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
キーボードの config.h で:
 | 
			
		||||
 | 
			
		||||
```c
 | 
			
		||||
#ifdef PS2_USE_BUSYWAIT
 | 
			
		||||
#ifdef PS2_DRIVER_BUSYWAIT
 | 
			
		||||
#   define PS2_CLOCK_PIN   D1
 | 
			
		||||
#   define PS2_DATA_PIN    D2
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			@ -56,13 +57,14 @@ rules.mk で:
 | 
			
		|||
 | 
			
		||||
```makefile
 | 
			
		||||
PS2_MOUSE_ENABLE = yes
 | 
			
		||||
PS2_USE_INT = yes
 | 
			
		||||
PS2_ENABLE = yes
 | 
			
		||||
PS2_DRIVER = interrupt
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
キーボードの config.h で:
 | 
			
		||||
 | 
			
		||||
```c
 | 
			
		||||
#ifdef PS2_USE_INT
 | 
			
		||||
#ifdef PS2_DRIVER_INTERRUPT
 | 
			
		||||
#define PS2_CLOCK_PIN   D2
 | 
			
		||||
#define PS2_DATA_PIN    D5
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -88,14 +90,14 @@ rules.mk で:
 | 
			
		|||
 | 
			
		||||
```makefile
 | 
			
		||||
PS2_MOUSE_ENABLE = yes
 | 
			
		||||
PS2_USE_USART = yes
 | 
			
		||||
PS2_ENABLE = yes
 | 
			
		||||
PS2_DRIVER = usart
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
キーボードの config.h で:
 | 
			
		||||
 | 
			
		||||
```c
 | 
			
		||||
#ifdef PS2_USE_USART
 | 
			
		||||
#ifdef PS2_USE_USART
 | 
			
		||||
#ifdef PS2_DRIVER_USART
 | 
			
		||||
#define PS2_CLOCK_PIN   D5
 | 
			
		||||
#define PS2_DATA_PIN    D2
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue