diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2020-05-14 03:02:26 +0700 |
---|---|---|
committer | fixeria <axilirator@gmail.com> | 2020-05-15 17:56:41 +0000 |
commit | 63bee45411dbf49ec82e0fa32a1b817d0742e1fb (patch) | |
tree | a5d1cb8f51a26c0d7ecb4589d0afc8becda0681e /include | |
parent | 534f0f402b6cd70ffa737b1bc7836cf77a059ef9 (diff) |
libosmogsm: import hopping sequence generation code
This implementation is taken from OsmocomBB, in particular from:
target/firmware/layer1/rfch.c
Change return type to uint16_t, because neither ARFCN, nor MAI
can be negative. Add prefix 'gsm0502_' to the function's name.
Change-Id: I8aba1578cc9d1bd89d4f5d33a6e8fedc8bea789a
Related: OS#4546
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/gsm/gsm0502.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/osmocom/gsm/gsm0502.h b/include/osmocom/gsm/gsm0502.h index c9901dfd..cb993dce 100644 --- a/include/osmocom/gsm/gsm0502.h +++ b/include/osmocom/gsm/gsm0502.h @@ -47,3 +47,7 @@ enum gsm0502_fn_remap_channel { }; uint32_t gsm0502_fn_remap(uint32_t fn, enum gsm0502_fn_remap_channel channel); + +uint16_t gsm0502_hop_seq_gen(const struct gsm_time *t, + uint8_t hsn, uint8_t maio, + size_t n, const uint16_t *ma); |