blob: 2ee463c6c7a958ede028246de007f4b39afa8161 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
|