aboutsummaryrefslogtreecommitdiffstats
path: root/memdump/file.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-02-05 18:03:14 -0800
committerH. Peter Anvin <hpa@zytor.com>2010-02-05 18:03:14 -0800
commit3dededd20d70d571268417dc41edc95f0fe6602e (patch)
treea3c64b598884588323d6f0c08c9034a30f3f9b95 /memdump/file.h
parent88c00aca310b7bade07833d3021cae9da266eae7 (diff)
downloadsyslinux.git-3dededd20d70d571268417dc41edc95f0fe6602e.tar.gz
syslinux.git-3dededd20d70d571268417dc41edc95f0fe6602e.tar.xz
syslinux.git-3dededd20d70d571268417dc41edc95f0fe6602e.zip
memdump: allow outputting S-records
Allow outputting S-records, for users who only have the capability of passively monitoring a serial port as opposed to being able to capture the contents directly. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'memdump/file.h')
-rw-r--r--memdump/file.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/memdump/file.h b/memdump/file.h
new file mode 100644
index 00000000..8da6973d
--- /dev/null
+++ b/memdump/file.h
@@ -0,0 +1,25 @@
+#ifndef FILE_H
+#define FILE_H
+
+#include "mystuff.h"
+
+struct serial_if {
+ int port;
+ void *pvt;
+ void (*read) (struct serial_if *, void *, size_t);
+ void (*write) (struct serial_if *, const void *, size_t);
+};
+
+struct file_info {
+ const char *name;
+ size_t base;
+ size_t size;
+ void *pvt;
+};
+
+
+int serial_init(struct serial_if *sif);
+void serial_read(struct serial_if *sif, void *data, size_t n);
+void serial_write(struct serial_if *sif, const void *data, size_t n);
+
+#endif /* FILE_H */