diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-09-30 21:29:08 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-05 19:18:09 -0600 |
commit | 4da8e81989f6ed86628d6497397b22e0cd8daf53 (patch) | |
tree | 28b196bf4e54fca41b514f13f533afcf9d3aed3c /cmd/sbc_harness/usb_keyboard.c | |
parent | 83219ac2d9dced37578297dc9a01612b234e6b33 (diff) |
libcr_ipc: Redo
Diffstat (limited to 'cmd/sbc_harness/usb_keyboard.c')
-rw-r--r-- | cmd/sbc_harness/usb_keyboard.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/sbc_harness/usb_keyboard.c b/cmd/sbc_harness/usb_keyboard.c index 5482fdc..4e20330 100644 --- a/cmd/sbc_harness/usb_keyboard.c +++ b/cmd/sbc_harness/usb_keyboard.c @@ -56,9 +56,9 @@ COROUTINE usb_keyboard_cr(void *_chan) { while (!tud_hid_n_ready(kbd_ifc)) cr_yield(); - if (cr_rpc_have_req(chan)) { - uint32_t rune; - cr_rpc_recv_req(chan, &rune); + if (usb_keyboard_rpc_can_recv_req(chan)) { + usb_keyboard_rpc_req_t req = usb_keyboard_rpc_recv_req(chan); + uint32_t rune = req.req; modifier = ascii2keycode[rune][0] ? KEYBOARD_MODIFIER_LEFTSHIFT : 0; keycodes[0] = ascii2keycode[rune][1]; @@ -71,7 +71,7 @@ COROUTINE usb_keyboard_cr(void *_chan) { keycodes[0] = 0; tud_hid_n_keyboard_report(kbd_ifc, report_id, modifier, keycodes); - cr_rpc_send_resp(chan, 1); + usb_keyboard_rpc_send_resp(req, 1); } else { modifier = 0; keycodes[0] = 0; |