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/main.c | |
parent | 83219ac2d9dced37578297dc9a01612b234e6b33 (diff) |
libcr_ipc: Redo
Diffstat (limited to 'cmd/sbc_harness/main.c')
-rw-r--r-- | cmd/sbc_harness/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cmd/sbc_harness/main.c b/cmd/sbc_harness/main.c index 31ce30b..e2b3b15 100644 --- a/cmd/sbc_harness/main.c +++ b/cmd/sbc_harness/main.c @@ -5,6 +5,7 @@ */ #include <string.h> /* for strlen() */ +#include <stdio.h> /* for printf() */ #include "pico/stdlib.h" #include <libcr/coroutine.h> @@ -18,8 +19,11 @@ COROUTINE hello_world_cr(void *_chan) { cr_begin(); for (size_t i = 0;; i = (i+1) % strlen(msg)) { - int result; - cr_rpc_req(chan, &result, (uint32_t)msg[i]); + int result = usb_keyboard_rpc_send_req(chan, (uint32_t)msg[i]); + if (result < 1) { + printf("error!\n"); + break; + } } cr_end(); |