root / hw / stream.c @ ed9873bf
History | View | Annotate | Download (495 Bytes)
1 | 669b4983 | Peter A. G. Crosthwaite | #include "stream.h" |
---|---|---|---|
2 | 669b4983 | Peter A. G. Crosthwaite | |
3 | 669b4983 | Peter A. G. Crosthwaite | void
|
4 | 669b4983 | Peter A. G. Crosthwaite | stream_push(StreamSlave *sink, uint8_t *buf, size_t len, uint32_t *app) |
5 | 669b4983 | Peter A. G. Crosthwaite | { |
6 | 669b4983 | Peter A. G. Crosthwaite | StreamSlaveClass *k = STREAM_SLAVE_GET_CLASS(sink); |
7 | 669b4983 | Peter A. G. Crosthwaite | |
8 | 669b4983 | Peter A. G. Crosthwaite | k->push(sink, buf, len, app); |
9 | 669b4983 | Peter A. G. Crosthwaite | } |
10 | 669b4983 | Peter A. G. Crosthwaite | |
11 | 669b4983 | Peter A. G. Crosthwaite | static TypeInfo stream_slave_info = {
|
12 | 669b4983 | Peter A. G. Crosthwaite | .name = TYPE_STREAM_SLAVE, |
13 | 669b4983 | Peter A. G. Crosthwaite | .parent = TYPE_INTERFACE, |
14 | 669b4983 | Peter A. G. Crosthwaite | .class_size = sizeof(StreamSlaveClass),
|
15 | 669b4983 | Peter A. G. Crosthwaite | }; |
16 | 669b4983 | Peter A. G. Crosthwaite | |
17 | 669b4983 | Peter A. G. Crosthwaite | |
18 | 669b4983 | Peter A. G. Crosthwaite | static void stream_slave_register_types(void) |
19 | 669b4983 | Peter A. G. Crosthwaite | { |
20 | 669b4983 | Peter A. G. Crosthwaite | type_register_static(&stream_slave_info); |
21 | 669b4983 | Peter A. G. Crosthwaite | } |
22 | 669b4983 | Peter A. G. Crosthwaite | |
23 | 669b4983 | Peter A. G. Crosthwaite | type_init(stream_slave_register_types) |