first working gmv streamer
[teensytas.git] / pkts.h
diff --git a/pkts.h b/pkts.h
new file mode 100644 (file)
index 0000000..86e24b8
--- /dev/null
+++ b/pkts.h
@@ -0,0 +1,26 @@
+
+enum tas_pkt_type {
+       PKT_FIXED_STATE      = 0xef01,
+       PKT_STREAM_ENABLE    = 0xef02,
+       PKT_STREAM_REQ       = 0xef03,
+       PKT_STREAM_DATA      = 0xef04,
+       PKT_STREAM_END       = 0xef06,
+       PKT_STREAM_ABORT     = 0xef07,
+};
+
+struct tas_pkt {
+       uint16_t type;
+       uint16_t size; // for DATA_FROM/TO
+       union {
+               uint8_t data[60];
+               struct {
+                       uint32_t frame; // just fyi
+               } req;
+               struct {
+                       uint8_t stream_to;
+                       uint8_t stream_from;
+                       // frame increment on read
+                       uint8_t use_readinc;
+               } enable;
+       };
+} __attribute__((packed));