aboutsummaryrefslogtreecommitdiff
path: root/arm9/source/devices/stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'arm9/source/devices/stream.h')
-rw-r--r--arm9/source/devices/stream.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/arm9/source/devices/stream.h b/arm9/source/devices/stream.h
new file mode 100644
index 0000000..2ee463c
--- /dev/null
+++ b/arm9/source/devices/stream.h
@@ -0,0 +1,33 @@
+// TODO: Implement this properly.
+
+
+#ifndef STREAM_H_
+ #define STREAM_H_
+
+ #include "../bang.h"
+
+ typedef struct {
+ bool connected;
+ bool transmitting;
+ } Channel;
+
+ typedef struct {
+ Channel input;
+ Channel output;
+ } Bytestream;
+
+ // Bedrock stream device.
+ typedef struct {
+ Bytestream local;
+ Bytestream remote;
+ } StreamDevice;
+
+ // Methods.
+ void stream_reset(StreamDevice *stream);
+ void stream_write(StreamDevice *stream, u8 byte);
+ void stream_end(StreamDevice *stream);
+
+ // Duplicate declarations from main.
+ void receive_keyboard_byte(u8 byte);
+ void close_keyboard(void);
+#endif