bump to ps2x2pico-1.0 pre-release (#164)

This commit is contained in:
No0ne 2024-03-28 18:35:08 +01:00 committed by GitHub
parent 444cd71ab5
commit f027654ad1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 12 deletions

View File

@ -31,7 +31,7 @@ endef
.tinyusb: .tinyusb:
$(call libdep,tinyusb,hathach/tinyusb,d713571cd44f05d2fc72efc09c670787b74106e0) $(call libdep,tinyusb,hathach/tinyusb,d713571cd44f05d2fc72efc09c670787b74106e0)
.ps2x2pico: .ps2x2pico:
$(call libdep,ps2x2pico,No0ne/ps2x2pico,b90814df40ebbc0f42c2886b4bd17b20a177a4da) $(call libdep,ps2x2pico,No0ne/ps2x2pico,b28bef9743632a56db48f14175aacf7bb23dbd07)
deps: .pico-sdk .tinyusb .ps2x2pico deps: .pico-sdk .tinyusb .ps2x2pico

View File

@ -105,34 +105,34 @@ void ph_ps2_mouse_send_button(u8 button, bool state) {
ph_ps2_mouse_buttons = ph_ps2_mouse_buttons & ~(1 << button); 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) { void ph_ps2_mouse_send_rel(s8 x, s8 y) {
if (PH_O_IS_MOUSE_PS2) { 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) { void ph_ps2_mouse_send_wheel(s8 h, s8 v) {
if (PH_O_IS_MOUSE_PS2) { 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) { void ph_ps2_send_clear(void) {
if (PH_O_IS_KBD_PS2) { if (PH_O_IS_KBD_PS2) {
for(u8 key = 0xe0; key <= 0xe7; key++) { //for(u8 key = 0xe0; key <= 0xe7; key++) {
kb_send_key(key, false, 0); // kb_send_key(key, false, 0);
} //}
for(u8 key = 4; key <= 116; key++) { //for(u8 key = 4; key <= 116; key++) {
kb_send_key(key, false, 0); // kb_send_key(key, false, 0);
} //}
} }
if (PH_O_IS_MOUSE_PS2) { if (PH_O_IS_MOUSE_PS2) {
ms_send_packet(0, 0, 0, 0, 0); ms_send_movement(0, 0, 0, 0);
} }
} }

View File

@ -41,7 +41,7 @@ void ph_ps2_kbd_send_key(u8 key, bool state);
void ms_init(u8 gpio); void ms_init(u8 gpio);
bool ms_task(); 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_button(u8 button, bool state);
void ph_ps2_mouse_send_rel(s8 x, s8 y); void ph_ps2_mouse_send_rel(s8 x, s8 y);
void ph_ps2_mouse_send_wheel(s8 h, s8 v); void ph_ps2_mouse_send_wheel(s8 h, s8 v);