summaryrefslogtreecommitdiff
path: root/avr/print-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'avr/print-utils.c')
-rw-r--r--avr/print-utils.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/avr/print-utils.c b/avr/print-utils.c
index ea3b5cf..26f499f 100644
--- a/avr/print-utils.c
+++ b/avr/print-utils.c
@@ -37,7 +37,7 @@ ERRNUM flash_read_buf(uint8_t *buf, uint32_t addr, uint8_t count)
}
ERRNUM dump_mem(uint32_t address, uint32_t offset, uint32_t len,
- ERRNUM (*readfkt)(uint8_t *, uint32_t, uint8_t), char *title)
+ ERRNUM (*readfkt)(uint8_t *, uint32_t, uint8_t), const MEMX char *title)
{
uint8_t buf[16];
uint8_t llen = 16;
@@ -46,8 +46,11 @@ ERRNUM dump_mem(uint32_t address, uint32_t offset, uint32_t len,
len += pre;
uint8_t i;
- if (title && *title) {
- printf_P(PSTR("%s\n"),title);
+ if (title) {
+ char c;
+ while ((c = *title++) != '\0')
+ putchar(c);
+ putchar('\n');
}
while (len) {
@@ -86,12 +89,12 @@ ERRNUM dump_mem(uint32_t address, uint32_t offset, uint32_t len,
return ESUCCESS;
}
-void dump_eep(uint32_t addr, unsigned int len, char *title)
+void dump_eep(uint32_t addr, unsigned int len, const MEMX char *title)
{
dump_mem(addr, addr, len, eeprom_read_buf, title);
}
-void dump_ram(uint8_t *addr, size_t offset, unsigned int len, char *title)
+void dump_ram(uint8_t *addr, size_t offset, unsigned int len, const MEMX char *title)
{
dump_mem((uint32_t) (size_t) addr, offset, len, ram_read_buf, title);
}