diff options
author | No0ne <[email protected]> | 2024-03-28 18:35:08 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-03-28 19:35:08 +0200 |
commit | f027654ad1e2d221318d28b4e318d0caf3f7a06d (patch) | |
tree | 9f0a626d7eed5e5bacd612c3d1eaf22271c559f8 /hid/pico/src | |
parent | 444cd71ab5c782a1ca8d994b684a39fcfeddd062 (diff) |
bump to ps2x2pico-1.0 pre-release (#164)
Diffstat (limited to 'hid/pico/src')
-rw-r--r-- | hid/pico/src/ph_ps2.c | 20 | ||||
-rw-r--r-- | hid/pico/src/ph_ps2.h | 2 |
2 files changed, 11 insertions, 11 deletions
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); |