diff options
Diffstat (limited to 'cmd/sbc_harness')
-rw-r--r-- | cmd/sbc_harness/fs_harness_flash_bin.c | 16 | ||||
-rw-r--r-- | cmd/sbc_harness/main.c | 4 | ||||
-rw-r--r-- | cmd/sbc_harness/tusb_log.c | 8 |
3 files changed, 14 insertions, 14 deletions
diff --git a/cmd/sbc_harness/fs_harness_flash_bin.c b/cmd/sbc_harness/fs_harness_flash_bin.c index 5920b85..f353ddd 100644 --- a/cmd/sbc_harness/fs_harness_flash_bin.c +++ b/cmd/sbc_harness/fs_harness_flash_bin.c @@ -41,7 +41,7 @@ static_assert(DATA_HSIZE % FLASH_SECTOR_SIZE == 0); [[noreturn]] static void __no_inline_not_in_flash_func(ab_flash_finalize)(uint8_t *buf) { assert(buf); - infof("copying upper flash to lower flash..."); + log_infof("copying upper flash to lower flash..."); cr_save_and_disable_interrupts(); @@ -53,7 +53,7 @@ static_assert(DATA_HSIZE % FLASH_SECTOR_SIZE == 0); flash_range_program(off, buf, FLASH_SECTOR_SIZE); } - infof("rebooting..."); + log_infof("rebooting..."); watchdog_reboot(0, 0, 300); @@ -71,7 +71,7 @@ static void ab_flash_initialize_zero(uint8_t *buf) { memset(buf, 0, FLASH_SECTOR_SIZE); - infof("zeroing upper flash..."); + log_infof("zeroing upper flash..."); for (size_t off = DATA_HSIZE; off < DATA_SIZE; off += FLASH_SECTOR_SIZE) { if (memcmp(buf, DATA_START+off, FLASH_SECTOR_SIZE) == 0) continue; @@ -84,7 +84,7 @@ static void ab_flash_initialize_zero(uint8_t *buf) { flash_range_program(off, buf, FLASH_SECTOR_SIZE); cr_restore_interrupts(saved); } - debugf("... zeroed"); + log_debugf("... zeroed"); } /** @@ -95,7 +95,7 @@ static void ab_flash_initialize_zero(uint8_t *buf) { static void ab_flash_initialize(uint8_t *buf) { assert(buf); - infof("initializing upper flash..."); + log_infof("initializing upper flash..."); for (size_t off = 0; off < DATA_HSIZE; off += FLASH_SECTOR_SIZE) { memcpy(buf, DATA_START+off, FLASH_SECTOR_SIZE); if (memcmp(buf, DATA_START+DATA_HSIZE+off, FLASH_SECTOR_SIZE) == 0) @@ -105,7 +105,7 @@ static void ab_flash_initialize(uint8_t *buf) { flash_range_program(DATA_HSIZE+off, buf, FLASH_SECTOR_SIZE); cr_restore_interrupts(saved); } - debugf("... initialized"); + log_debugf("... initialized"); } /** @@ -123,14 +123,14 @@ static void ab_flash_write_sector(size_t pos, uint8_t *dat) { pos += DATA_HSIZE; - infof("write flash sector @ %zu...", pos); + log_infof("write flash sector @ %zu...", pos); if (memcmp(dat, DATA_START+pos, FLASH_SECTOR_SIZE) != 0) { bool saved = cr_save_and_disable_interrupts(); flash_range_erase(pos, FLASH_SECTOR_SIZE); flash_range_program(pos, dat, FLASH_SECTOR_SIZE); cr_restore_interrupts(saved); } - debugf("... written"); + log_debugf("... written"); } /* srv_file *******************************************************************/ diff --git a/cmd/sbc_harness/main.c b/cmd/sbc_harness/main.c index 5630e83..7d6c085 100644 --- a/cmd/sbc_harness/main.c +++ b/cmd/sbc_harness/main.c @@ -129,7 +129,7 @@ static 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) { - errorf("error sending rune U+%d", (uint32_t)msg[i]); + log_errorf("error sending rune U+%d", (uint32_t)msg[i]); break; } } @@ -246,7 +246,7 @@ int main() { bootclock = rp2040_hwtimer(0); stdio_uart_init(); /* char *hdr = "=" * (80-strlen("info : MAIN: ")); */ - infof("==================================================================="); + log_infof("==================================================================="); coroutine_add("init", init_cr, NULL); coroutine_main(); assert_notreached("all coroutines exited"); diff --git a/cmd/sbc_harness/tusb_log.c b/cmd/sbc_harness/tusb_log.c index 4c6b7df..fe2c688 100644 --- a/cmd/sbc_harness/tusb_log.c +++ b/cmd/sbc_harness/tusb_log.c @@ -1,6 +1,6 @@ /* sbc_harness/tusb_log.c - Logger for tusb_config.h * - * Copyright (C) 2024 Luke T. Shumaker <lukeshu@lukeshu.com> + * Copyright (C) 2024-2025 Luke T. Shumaker <lukeshu@lukeshu.com> * SPDX-License-Identifier: AGPL-3.0-or-later */ @@ -9,7 +9,7 @@ void _libmisc_tu_mess_failed(const char *expr, const char *file, unsigned int line, const char *func) { - errorf("%s:%u:%s(): assertion \"%s\" failed", - file, line, func, - expr); + log_errorf("%s:%u:%s(): assertion \"%s\" failed", + file, line, func, + expr); } |