]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - avr/print-utils.c
Support for Peter Danneggers fboot.
[z180-stamp.git] / avr / print-utils.c
index 3f48620ff358a174c2b90d61ef40d4e94e0f06cb..9ce3e5044f9547e71ef131fe2bf8ad9cbe5f7733 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include "common.h"
+#include <stdint.h>
 #include <stdio.h>
 #include <ctype.h>
 #include "con-utils.h"
@@ -28,6 +29,12 @@ void ram_read_buf(uint8_t *buf, uint32_t addr, uint8_t count)
                        *buf++ = *(uint8_t *) (size_t) addr++;
 }
 
+void flash_read_buf(uint8_t *buf, uint32_t addr, uint8_t count)
+{
+               while (count--)
+                       *buf++ = *(const __memx uint8_t *) (__uint24) addr++;
+}
+
 int dump_mem(uint32_t address, uint32_t offset, uint32_t len,
                void (*readfkt)(uint8_t *, uint32_t, uint8_t), char *title)
 {