summaryrefslogtreecommitdiff
path: root/hid/pico/src/ph_ps2_kbd.c
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2023-09-09 13:07:30 +0300
committerMaxim Devaev <[email protected]>2023-09-09 13:07:30 +0300
commit2189b77c07533c5ed7bfc3f7d58b98f0622419dd (patch)
tree75cdaeae325e041b0a6dd9a32b53b5bfc3d990b3 /hid/pico/src/ph_ps2_kbd.c
parenta03c3c2367fc950c7ea8d4557fc24de8580dfd74 (diff)
using ps2x2pico as a library
Diffstat (limited to 'hid/pico/src/ph_ps2_kbd.c')
-rw-r--r--hid/pico/src/ph_ps2_kbd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/hid/pico/src/ph_ps2_kbd.c b/hid/pico/src/ph_ps2_kbd.c
index e2fd7faf..02229e96 100644
--- a/hid/pico/src/ph_ps2_kbd.c
+++ b/hid/pico/src/ph_ps2_kbd.c
@@ -1,10 +1,11 @@
+#include "ps2phy.h"
+
#include "ph_outputs.h"
-#include "ph_ps2_phy.h"
extern u8 ph_g_ps2_kbd_leds;
extern bool ph_g_ps2_kbd_online;
-ph_ps2_phy ph_ps2_kbd;
+ps2phy ph_ps2_kbd;
bool ph_ps2_kbd_scanning;
u32 ph_ps2_kbd_repeat_us;
u16 ph_ps2_kbd_delay_ms;
@@ -212,11 +213,11 @@ void ph_ps2_kbd_receive(u8 byte, u8 prev_byte) {
}
void ph_ps2_kbd_task(void) {
- ph_ps2_phy_task(&ph_ps2_kbd);
+ ps2phy_task(&ph_ps2_kbd);
ph_g_ps2_kbd_online = ph_ps2_kbd_scanning && !ph_ps2_kbd.busy;
}
void ph_ps2_kbd_init(u8 gpio) {
- ph_ps2_phy_init(&ph_ps2_kbd, pio0, gpio, &ph_ps2_kbd_receive);
+ ps2phy_init(&ph_ps2_kbd, pio0, gpio, &ph_ps2_kbd_receive);
ph_ps2_kbd_reset();
}