summaryrefslogtreecommitdiffstats
path: root/sw/programmer/linux/src/flash.h
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2017-08-23 16:43:56 +0200
committerNao Pross <naopross@thearcway.org>2017-08-23 16:43:56 +0200
commitc7925cbb73f319a390507b33e4df44f106822683 (patch)
treeb7890e18d481822e6f38f6739b43fbd9d02b587f /sw/programmer/linux/src/flash.h
parentupdated .gitignore (diff)
downloadz80uPC-c7925cbb73f319a390507b33e4df44f106822683.tar.gz
z80uPC-c7925cbb73f319a390507b33e4df44f106822683.zip
new programmer interface for linux
there is a new program with GUI (gtk3) to send data to its avr conterpart. it needs to be tested, since there may be a few bugs in it; building a GUI was a terrible idea.
Diffstat (limited to 'sw/programmer/linux/src/flash.h')
-rw-r--r--sw/programmer/linux/src/flash.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/sw/programmer/linux/src/flash.h b/sw/programmer/linux/src/flash.h
new file mode 100644
index 0000000..373ebf3
--- /dev/null
+++ b/sw/programmer/linux/src/flash.h
@@ -0,0 +1,22 @@
+#ifndef __FLASH_H__
+#define __FLASH_H__
+
+#include "serial.h"
+
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#define FLASH_BLOCK_SIZE 512
+
+struct flash_blk
+{
+ uint16_t addr;
+ uint16_t size;
+};
+
+int flash_open(const char *devpath, unsigned long baudrate);
+int flash_write(const char *romfile, void (*log)(const char *));
+void flash_close(void);
+
+#endif