summaryrefslogtreecommitdiff
path: root/hid/pico/src/ph_ps2_mouse.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_mouse.c
parenta03c3c2367fc950c7ea8d4557fc24de8580dfd74 (diff)
using ps2x2pico as a library
Diffstat (limited to 'hid/pico/src/ph_ps2_mouse.c')
-rw-r--r--hid/pico/src/ph_ps2_mouse.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/hid/pico/src/ph_ps2_mouse.c b/hid/pico/src/ph_ps2_mouse.c
index c825ca03..a56b814a 100644
--- a/hid/pico/src/ph_ps2_mouse.c
+++ b/hid/pico/src/ph_ps2_mouse.c
@@ -1,9 +1,10 @@
+#include "ps2phy.h"
+
#include "ph_outputs.h"
-#include "ph_ps2_phy.h"
extern bool ph_g_ps2_mouse_online;
-ph_ps2_phy ph_ps2_mouse;
+ps2phy ph_ps2_mouse;
bool ph_ps2_mouse_streaming = false;
u32 ph_ps2_mouse_magic_seq = 0;
u8 ph_ps2_mouse_type = 0;
@@ -138,10 +139,10 @@ void ph_ps2_mouse_receive(u8 byte, u8 prev_byte) {
}
void ph_ps2_mouse_task(void) {
- ph_ps2_phy_task(&ph_ps2_mouse);
+ ps2phy_task(&ph_ps2_mouse);
ph_g_ps2_mouse_online = ph_ps2_mouse_streaming && !ph_ps2_mouse.busy;
}
void ph_ps2_mouse_init(u8 gpio) {
- ph_ps2_phy_init(&ph_ps2_mouse, pio0, gpio, &ph_ps2_mouse_receive);
+ ps2phy_init(&ph_ps2_mouse, pio0, gpio, &ph_ps2_mouse_receive);
}