implement stream restart on r key
[teensytas.git] / pkts.h
1
2 enum tas_pkt_type {
3         PKT_FIXED_STATE      = 0xef01,
4         PKT_STREAM_ENABLE    = 0xef02,
5         PKT_STREAM_REQ       = 0xef03,
6         PKT_STREAM_DATA      = 0xef04,
7         PKT_STREAM_END       = 0xef06,
8         PKT_STREAM_ABORT     = 0xef07,
9 };
10
11 struct tas_pkt {
12         uint16_t type;
13         uint16_t size; // for DATA_FROM/TO
14         union {
15                 uint8_t data[60];
16                 struct {
17                         uint32_t frame; // just fyi
18                 } req;
19                 struct {
20                         uint8_t stream_to;
21                         uint8_t stream_from;
22                         // frame increment on read
23                         uint8_t use_readinc;
24                 } enable;
25         };
26 } __attribute__((packed));