diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-11-19 21:20:13 -0700 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-11-19 22:05:53 -0700 |
commit | 24cd8ca4ee1ea08526eb82e6c122870c86da5603 (patch) | |
tree | 25e467df0236b8a514bbc328299f8500277f9512 /cmd/sbc_harness/main.c | |
parent | 1cc68fb6f72ada5446a9914cc3bf97db9259a880 (diff) |
Add libmisc/log.h to remove stdio.h
Diffstat (limited to 'cmd/sbc_harness/main.c')
-rw-r--r-- | cmd/sbc_harness/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/sbc_harness/main.c b/cmd/sbc_harness/main.c index 17d32cf..23195b3 100644 --- a/cmd/sbc_harness/main.c +++ b/cmd/sbc_harness/main.c @@ -5,7 +5,6 @@ */ #include <string.h> /* libc: for strlen() */ -#include <stdio.h> /* libc: for printf() */ #include <pico/stdlib.h> /* pico-sdk:pico_stdlib: for stdio_uart_init() */ #include <hardware/flash.h> /* pico-sdk:hardware_flash: for flash_get_unique_id() */ @@ -17,6 +16,9 @@ #include <libusb/usb_common.h> #include <libdhcp/client.h> +#define LOG_NAME MAIN +#include <libmisc/log.h> + #include "usb_keyboard.h" COROUTINE hello_world_cr(void *_chan) { @@ -27,7 +29,7 @@ COROUTINE hello_world_cr(void *_chan) { for (size_t i = 0;; i = (i+1) % strlen(msg)) { int result = usb_keyboard_rpc_send_req(chan, (uint32_t)msg[i]); if (result < 1) { - printf("error!\n"); + errorf("error sending rune U+%d", (uint32_t)msg[i]); break; } } |