blob: 9da18db5465398d0d0320acae40d8d58b3cab82a [file] [log] [blame]
Pau Espin Pedrol778b30a2019-06-28 13:27:24 +02001#pragma once
2
3#include <stdint.h>
4#include <osmocom/core/endian.h>
5
6struct trxd_hdr_common {
7#if OSMO_IS_LITTLE_ENDIAN
8 uint8_t tn:3,
9 reserved:1,
10 version:4;
11#elif OSMO_IS_BIG_ENDIAN
12 uint8_t version:4,
13 reserved:1,
14 tn:3;
15#endif
16 uint32_t fn; /* big endian */
17} __attribute__ ((packed));
18
19struct trxd_hdr_v0_specific {
20 uint8_t rssi;
21 uint16_t toa; /* big endian */
22} __attribute__ ((packed));
23
24struct trxd_hdr_v0 {
25 struct trxd_hdr_common common;
26 struct trxd_hdr_v0_specific v0;
27 uint8_t soft_bits[0];
28} __attribute__ ((packed));