summaryrefslogtreecommitdiff
path: root/cmd/sbc_harness/fs_harness_flash_bin.h
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/sbc_harness/fs_harness_flash_bin.h')
-rw-r--r--cmd/sbc_harness/fs_harness_flash_bin.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/cmd/sbc_harness/fs_harness_flash_bin.h b/cmd/sbc_harness/fs_harness_flash_bin.h
index 148a446..84cc494 100644
--- a/cmd/sbc_harness/fs_harness_flash_bin.h
+++ b/cmd/sbc_harness/fs_harness_flash_bin.h
@@ -11,17 +11,24 @@
#include <lib9p/srv.h>
-struct flash_file {
- char *name;
- uint64_t pathnum;
+#include "ihex.h"
- BEGIN_PRIVATE(FS_HARNESS_FLASH_BIN);
- bool written;
+struct flashio {
+ bool finalize;
struct {
bool ok;
size_t pos;
uint8_t dat[FLASH_SECTOR_SIZE];
} wbuf, rbuf;
+};
+
+struct flash_file {
+ char *name;
+ uint64_t pathnum;
+
+ BEGIN_PRIVATE(FS_HARNESS_FLASH_BIN);
+ struct flashio io;
+ struct ihex_decoder ihex;
END_PRIVATE(FS_HARNESS_FLASH_BIN);
};
LO_IMPLEMENTATION_H(lib9p_srv_file, struct flash_file, flash_file);