aboutsummaryrefslogtreecommitdiff
path: root/fmdriver/fmdriver.h
diff options
context:
space:
mode:
authorTakamichi Horikawa <takamichiho@gmail.com>2016-11-26 20:57:57 +0900
committerTakamichi Horikawa <takamichiho@gmail.com>2016-11-26 20:57:57 +0900
commit6fd10cdacb5cbe47a4fc339c20a733d4a9a384a1 (patch)
treec7f479a70c350dca0b73d76078e46db41d9c4133 /fmdriver/fmdriver.h
initial
Diffstat (limited to 'fmdriver/fmdriver.h')
-rw-r--r--fmdriver/fmdriver.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/fmdriver/fmdriver.h b/fmdriver/fmdriver.h
new file mode 100644
index 0000000..67557cc
--- /dev/null
+++ b/fmdriver/fmdriver.h
@@ -0,0 +1,30 @@
+#ifndef MYON_FMDRIVER_H_INCLUDED
+#define MYON_FMDRIVER_H_INCLUDED
+
+#include <stdint.h>
+#include <stdbool.h>
+#include "ppz8.h"
+
+struct fmdriver_work {
+ // set by driver, called by opna
+ void (*driver_opna_interrupt)(struct fmdriver_work *work);
+ void (*driver_deinit)(struct fmdriver_work *work);
+ // driver internal
+ void *driver;
+
+
+ // set by opna, called by driver in the interrupt functions
+ unsigned (*opna_readreg)(struct fmdriver_work *work, unsigned addr);
+ void (*opna_writereg)(struct fmdriver_work *work, unsigned addr, unsigned data);
+ uint8_t (*opna_status)(struct fmdriver_work *work, bool a1);
+ void *opna;
+
+ const struct ppz8_functbl *ppz8_functbl;
+ struct ppz8 *ppz8;
+
+ const char *title;
+ // driver status
+ // fm3ex part map
+};
+
+#endif // MYON_FMDRIVER_H_INCLUDED