Stefan Sperling | fdf8b7b | 2018-07-27 12:19:15 +0200 | [diff] [blame] | 1 | /*! \file gsm48_arfcn_range_encode.h */ |
| 2 | |
| 3 | #pragma once |
| 4 | |
| 5 | #include <stdint.h> |
| 6 | |
| 7 | enum osmo_gsm48_range { |
| 8 | OSMO_GSM48_ARFCN_RANGE_INVALID = -1, |
| 9 | OSMO_GSM48_ARFCN_RANGE_128 = 127, |
| 10 | OSMO_GSM48_ARFCN_RANGE_256 = 255, |
| 11 | OSMO_GSM48_ARFCN_RANGE_512 = 511, |
| 12 | OSMO_GSM48_ARFCN_RANGE_1024 = 1023, |
| 13 | }; |
| 14 | |
| 15 | #define OSMO_GSM48_RANGE_ENC_MAX_ARFCNS 29 |
| 16 | |
| 17 | int osmo_gsm48_range_enc_determine_range(const int *arfcns, int size, int *f0_out); |
| 18 | int osmo_gsm48_range_enc_arfcns(enum osmo_gsm48_range rng, const int *arfcns, int sze, int *out, int idx); |
| 19 | int osmo_gsm48_range_enc_find_index(enum osmo_gsm48_range rng, const int *arfcns, int size); |
| 20 | int osmo_gsm48_range_enc_filter_arfcns(int *arfcns, const int sze, const int f0, int *f0_included); |
| 21 | |
| 22 | int osmo_gsm48_range_enc_128(uint8_t *chan_list, int f0, int *w); |
| 23 | int osmo_gsm48_range_enc_256(uint8_t *chan_list, int f0, int *w); |
| 24 | int osmo_gsm48_range_enc_512(uint8_t *chan_list, int f0, int *w); |
| 25 | int osmo_gsm48_range_enc_1024(uint8_t *chan_list, int f0, int f0_incl, int *w); |