summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNo0ne <[email protected]>2024-03-28 18:35:08 +0100
committerGitHub <[email protected]>2024-03-28 19:35:08 +0200
commitf027654ad1e2d221318d28b4e318d0caf3f7a06d (patch)
tree9f0a626d7eed5e5bacd612c3d1eaf22271c559f8
parent444cd71ab5c782a1ca8d994b684a39fcfeddd062 (diff)
bump to ps2x2pico-1.0 pre-release (#164)
-rw-r--r--hid/pico/Makefile2
-rw-r--r--hid/pico/src/ph_ps2.c20
-rw-r--r--hid/pico/src/ph_ps2.h2
3 files changed, 12 insertions, 12 deletions
diff --git a/hid/pico/Makefile b/hid/pico/Makefile
index b335228b..0130895e 100644
--- a/hid/pico/Makefile
+++ b/hid/pico/Makefile
@@ -31,7 +31,7 @@ endef
.tinyusb:
$(call libdep,tinyusb,hathach/tinyusb,d713571cd44f05d2fc72efc09c670787b74106e0)
.ps2x2pico:
- $(call libdep,ps2x2pico,No0ne/ps2x2pico,b90814df40ebbc0f42c2886b4bd17b20a177a4da)
+ $(call libdep,ps2x2pico,No0ne/ps2x2pico,b28bef9743632a56db48f14175aacf7bb23dbd07)
deps: .pico-sdk .tinyusb .ps2x2pico
diff --git a/hid/pico/src/ph_ps2.c b/hid/pico/src/ph_ps2.c
index 5eb07174..ef192249 100644
--- a/hid/pico/src/ph_ps2.c
+++ b/hid/pico/src/ph_ps2.c
@@ -105,34 +105,34 @@ void ph_ps2_mouse_send_button(u8 button, bool state) {
ph_ps2_mouse_buttons = ph_ps2_mouse_buttons & ~(1 << button);
}
- ms_send_packet(ph_ps2_mouse_buttons, 0, 0, 0, 0);
+ ms_send_movement(ph_ps2_mouse_buttons, 0, 0, 0);
}
}
void ph_ps2_mouse_send_rel(s8 x, s8 y) {
if (PH_O_IS_MOUSE_PS2) {
- ms_send_packet(ph_ps2_mouse_buttons, x, y, 0, 0);
+ ms_send_movement(ph_ps2_mouse_buttons, x, y, 0);
}
}
void ph_ps2_mouse_send_wheel(s8 h, s8 v) {
if (PH_O_IS_MOUSE_PS2) {
- ms_send_packet(ph_ps2_mouse_buttons, 0, 0, h, v);
+ ms_send_movement(ph_ps2_mouse_buttons, 0, 0, v);
}
}
void ph_ps2_send_clear(void) {
if (PH_O_IS_KBD_PS2) {
- for(u8 key = 0xe0; key <= 0xe7; key++) {
- kb_send_key(key, false, 0);
- }
+ //for(u8 key = 0xe0; key <= 0xe7; key++) {
+ // kb_send_key(key, false, 0);
+ //}
- for(u8 key = 4; key <= 116; key++) {
- kb_send_key(key, false, 0);
- }
+ //for(u8 key = 4; key <= 116; key++) {
+ // kb_send_key(key, false, 0);
+ //}
}
if (PH_O_IS_MOUSE_PS2) {
- ms_send_packet(0, 0, 0, 0, 0);
+ ms_send_movement(0, 0, 0, 0);
}
}
diff --git a/hid/pico/src/ph_ps2.h b/hid/pico/src/ph_ps2.h
index 62fee109..af8012bc 100644
--- a/hid/pico/src/ph_ps2.h
+++ b/hid/pico/src/ph_ps2.h
@@ -41,7 +41,7 @@ void ph_ps2_kbd_send_key(u8 key, bool state);
void ms_init(u8 gpio);
bool ms_task();
-void ms_send_packet(u8 buttons, s8 x, s8 y, s8 h, s8 v);
+void ms_send_movement(u8 buttons, s8 x, s8 y, s8 z);
void ph_ps2_mouse_send_button(u8 button, bool state);
void ph_ps2_mouse_send_rel(s8 x, s8 y);
void ph_ps2_mouse_send_wheel(s8 h, s8 v);