diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-04-26 19:51:52 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-05-06 11:50:46 -0600 |
commit | 1cf085ae086a43f18af550fdcfd4d3e57ccb0918 (patch) | |
tree | 42abde5f3b34b239bb95e84200ea16ad4a4c562d /cmd/sbc_harness/fs_harness_flash_bin.c | |
parent | 0fec22d4106ff6f80296d1511eec7a82160c2245 (diff) | |
parent | a83c95e9f46ef695a55fc7a6911e11846da9903c (diff) |
Merge branch 'lukeshu/misc'
Diffstat (limited to 'cmd/sbc_harness/fs_harness_flash_bin.c')
-rw-r--r-- | cmd/sbc_harness/fs_harness_flash_bin.c | 16 |
1 files changed, 8 insertions, 8 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 *******************************************************************/ |