Introduce structs to encode TRXD packets

This will ease adding new protocol versions in the future.

Related: OS#4006
Change-Id: I67ffede171eddde436f9057191ed76015a8ea6eb
diff --git a/Transceiver52M/proto_trxd.h b/Transceiver52M/proto_trxd.h
new file mode 100644
index 0000000..9da18db
--- /dev/null
+++ b/Transceiver52M/proto_trxd.h
@@ -0,0 +1,28 @@
+#pragma once
+
+#include <stdint.h>
+#include <osmocom/core/endian.h>
+
+struct trxd_hdr_common {
+#if OSMO_IS_LITTLE_ENDIAN
+        uint8_t tn:3,
+                reserved:1,
+                version:4;
+#elif OSMO_IS_BIG_ENDIAN
+        uint8_t version:4,
+                reserved:1,
+                tn:3;
+#endif
+        uint32_t fn; /* big endian */
+} __attribute__ ((packed));
+
+struct trxd_hdr_v0_specific {
+        uint8_t rssi;
+        uint16_t toa; /* big endian */
+} __attribute__ ((packed));
+
+struct trxd_hdr_v0 {
+        struct trxd_hdr_common common;
+        struct trxd_hdr_v0_specific v0;
+        uint8_t soft_bits[0];
+} __attribute__ ((packed));