summaryrefslogtreecommitdiffstats
path: root/libtoolame-dab/xpad.h
diff options
context:
space:
mode:
Diffstat (limited to 'libtoolame-dab/xpad.h')
-rw-r--r--libtoolame-dab/xpad.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/libtoolame-dab/xpad.h b/libtoolame-dab/xpad.h
new file mode 100644
index 0000000..cd0a434
--- /dev/null
+++ b/libtoolame-dab/xpad.h
@@ -0,0 +1,28 @@
+#ifndef _XPAD_H_
+#define _XPAD_H_
+
+#include <stdint.h>
+
+/* Initialise the xpad reader
+ *
+ * pad_fifo is the filename of the FIFO that will be created, and
+ * can be used with mot-encoder.
+ *
+ * pad_len is the XPAD length, that also has to be given
+ * to mot-encoder.
+ *
+ * returns 0 on success
+ * -1 on failure
+ */
+int xpad_init(char* pad_fifo, int pad_len);
+
+/* Get len bytes of x-pad data, write into buf
+ * returns either
+ * - len if the read was sucessful
+ * - 0 if there was no data
+ * - -1 if there was an error (errno will be set)
+ */
+int xpad_read_len(uint8_t* buf, int len);
+
+#endif
+