Attention is currently required from: laforge, pespin, dexter.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/29475 )
Change subject: fix gsm0808_sc_cfg <-> gsm48_mr_cfg conversion ......................................................................
Patch Set 3:
(2 comments)
This change is ready for review.
Commit Message:
https://gerrit.osmocom.org/c/libosmocore/+/29475/comment/9f678baa_a0111597 PS2, Line 17: gsm0808_sc_cfg_from_modes() and
Ack
added "_amr"
File include/osmocom/gsm/protocol/gsm_04_08.h:
https://gerrit.osmocom.org/c/libosmocore/+/29475/comment/c03f4fd6_98f076e0 PS2, Line 627: return ((uint8_t *)cfg)[1];
can you better add a union with a field containing the whole octet in the struct gsm48_multi_rate_co […]
gsm48_multi_rate_conf has two uint8_t members, AFAICT adding a union would require adding another explicit name for the union. That would be API breakage. This function works around that...
struct gsm48_multi_rate_conf { #if OSMO_IS_LITTLE_ENDIAN uint8_t smod : 2, spare: 1, icmi : 1, nscb : 1, ver : 3; uint8_t m4_75 : 1, m5_15 : 1, m5_90 : 1, m6_70 : 1, m7_40 : 1, m7_95 : 1, m10_2 : 1, m12_2 : 1; #elif OSMO_IS_BIG_ENDIAN /* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */ uint8_t ver:3, nscb:1, icmi:1, spare:1, smod:2; uint8_t m12_2:1, m10_2:1, m7_95:1, m7_40:1, m6_70:1, m5_90:1, m5_15:1, m4_75:1; #endif } __attribute__((packed));