mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
ps2 pin stubs
This commit is contained in:
parent
1b772aace2
commit
5d587d1d41
@ -45,13 +45,24 @@ void ph_ps2_init(void) {
|
||||
gpio_put(_LS_POWER_PIN, true);
|
||||
}
|
||||
|
||||
# define INIT_STUB(x_pin) { \
|
||||
gpio_init(x_pin); gpio_set_dir(x_pin, GPIO_IN); \
|
||||
gpio_init(x_pin + 1); gpio_set_dir(x_pin + 1, GPIO_IN); \
|
||||
}
|
||||
|
||||
if (PH_O_IS_KBD_PS2) {
|
||||
ph_ps2_kbd_init(_KBD_DATA_PIN);
|
||||
} else {
|
||||
INIT_STUB(_KBD_DATA_PIN);
|
||||
}
|
||||
|
||||
if (PH_O_IS_MOUSE_PS2) {
|
||||
ph_ps2_mouse_init(_MOUSE_DATA_PIN);
|
||||
} else {
|
||||
INIT_STUB(_MOUSE_DATA_PIN);
|
||||
}
|
||||
|
||||
# undef INIT_STUB
|
||||
}
|
||||
|
||||
void ph_ps2_task(void) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user