aboutsummaryrefslogtreecommitdiff
path: root/src/graphics/mbox.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphics/mbox.h')
-rw-r--r--src/graphics/mbox.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/graphics/mbox.h b/src/graphics/mbox.h
new file mode 100644
index 0000000..fe021a2
--- /dev/null
+++ b/src/graphics/mbox.h
@@ -0,0 +1,27 @@
+#ifndef GRAPHICS_MBOX_H
+#define GRAPHICS_MBOX_H
+
+/* a properly aligned buffer */
+extern volatile unsigned int mbox[36];
+
+#define MBOX_REQUEST 0
+
+/* channels */
+#define MBOX_CH_POWER 0
+#define MBOX_CH_FB 1
+#define MBOX_CH_VUART 2
+#define MBOX_CH_VCHIQ 3
+#define MBOX_CH_LEDS 4
+#define MBOX_CH_BTNS 5
+#define MBOX_CH_TOUCH 6
+#define MBOX_CH_COUNT 7
+#define MBOX_CH_PROP 8
+
+/* tags */
+#define MBOX_TAG_SETPOWER 0x28001
+#define MBOX_TAG_SETCLKRATE 0x38002
+#define MBOX_TAG_LAST 0
+
+int mbox_call(unsigned char ch);
+
+#endif