aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/netif/amr.h
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-11-16 00:18:08 +0100
committerlaforge <laforge@osmocom.org>2020-01-12 13:14:48 +0000
commit63e33ab84c2ed3841c0ec0eaa2f48cc88838a0e1 (patch)
tree8bdb1ff83d7e31ddc7705d70ce9a2ca13d9180b6 /include/osmocom/netif/amr.h
parent5ed1a3c85c1aa9ecbfb38cb7dd9524ff55f3cb95 (diff)
add/clean big-endian packed structs (struct_endianess.py)
Diffstat (limited to 'include/osmocom/netif/amr.h')
-rw-r--r--include/osmocom/netif/amr.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/include/osmocom/netif/amr.h b/include/osmocom/netif/amr.h
index 729d0ae..6e37c99 100644
--- a/include/osmocom/netif/amr.h
+++ b/include/osmocom/netif/amr.h
@@ -43,16 +43,7 @@
*/
struct amr_hdr {
-#if OSMO_IS_BIG_ENDIAN
- /* Payload Header */
- uint8_t cmr:4, /* Codec Mode Request */
- pad1:4;
- /* Table of Contents */
- uint8_t f:1, /* followed by another speech frame? */
- ft:4, /* coding mode */
- q:1, /* OK (not damaged) at origin? */
- pad2:2;
-#elif OSMO_IS_LITTLE_ENDIAN
+#if OSMO_IS_LITTLE_ENDIAN
/* Payload Header */
uint8_t pad1:4,
cmr:4; /* Codec Mode Request */
@@ -61,6 +52,10 @@ struct amr_hdr {
q:1, /* OK (not damaged) at origin? */
ft:4, /* coding mode */
f:1; /* followed by another speech frame? */
+#elif OSMO_IS_BIG_ENDIAN
+/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
+ uint8_t cmr:4, pad1:4;
+ uint8_t f:1, ft:4, q:1, pad2:2;
#endif
} __attribute__((packed));