summaryrefslogtreecommitdiff
path: root/opl/opl.h
diff options
context:
space:
mode:
Diffstat (limited to 'opl/opl.h')
-rw-r--r--opl/opl.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/opl/opl.h b/opl/opl.h
index 352e6696..515950b1 100644
--- a/opl/opl.h
+++ b/opl/opl.h
@@ -27,6 +27,8 @@
#ifndef OPL_OPL_H
#define OPL_OPL_H
+typedef void (*opl_callback_t)(void *data);
+
typedef enum
{
OPL_REGISTER_PORT = 0,
@@ -72,5 +74,19 @@ void OPL_WritePort(opl_port_t port, unsigned int value);
unsigned int OPL_ReadPort(opl_port_t port);
+// Set a timer callback. After the specified number of milliseconds
+// have elapsed, the callback will be invoked.
+
+void OPL_SetCallback(unsigned int ms, opl_callback_t callback, void *data);
+
+// Begin critical section, during which, OPL callbacks will not be
+// invoked.
+
+void OPL_Lock(void);
+
+// End critical section.
+
+void OPL_Unlock(void);
+
#endif