Philipp Maier | ca770ae | 2021-02-16 17:31:22 +0100 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Vadim Yanitskiy | 36c69ed | 2021-10-29 20:26:08 +0300 | [diff] [blame] | 3 | #include <osmocom/core/endian.h> |
| 4 | |
Philipp Maier | ca770ae | 2021-02-16 17:31:22 +0100 | [diff] [blame] | 5 | /* TS 44.004 Section 7.1 */ |
| 6 | |
| 7 | struct gsm_sacch_l1_hdr { |
Pau Espin Pedrol | 28c4388 | 2021-12-22 13:56:42 +0100 | [diff] [blame] | 8 | #if OSMO_IS_LITTLE_ENDIAN |
Philipp Maier | ca770ae | 2021-02-16 17:31:22 +0100 | [diff] [blame] | 9 | uint8_t ms_pwr:5, |
| 10 | fpc_epc:1, |
| 11 | srr_sro:1, |
| 12 | reserved:1; |
| 13 | uint8_t ta; |
Pau Espin Pedrol | 28c4388 | 2021-12-22 13:56:42 +0100 | [diff] [blame] | 14 | #elif OSMO_IS_BIG_ENDIAN |
| 15 | /* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ |
| 16 | uint8_t reserved:1, srr_sro:1, fpc_epc:1, ms_pwr:5; |
| 17 | uint8_t ta; |
Philipp Maier | ca770ae | 2021-02-16 17:31:22 +0100 | [diff] [blame] | 18 | #endif |
| 19 | } __attribute__ ((packed)); |