Holger Hans Peter Freyther | 511f9c3 | 2012-10-13 12:38:54 +0200 | [diff] [blame] | 1 | #ifndef ARFCN_RANGE_ENCODE_H |
| 2 | #define ARFCN_RANGE_ENCODE_H |
| 3 | |
| 4 | #include <stdint.h> |
| 5 | |
Max | 34be86b | 2016-12-16 18:45:51 +0100 | [diff] [blame^] | 6 | enum gsm48_range { |
Holger Hans Peter Freyther | 511f9c3 | 2012-10-13 12:38:54 +0200 | [diff] [blame] | 7 | ARFCN_RANGE_INVALID = -1, |
| 8 | ARFCN_RANGE_128 = 127, |
| 9 | ARFCN_RANGE_256 = 255, |
| 10 | ARFCN_RANGE_512 = 511, |
| 11 | ARFCN_RANGE_1024 = 1023, |
| 12 | }; |
| 13 | |
| 14 | #define RANGE_ENC_MAX_ARFCNS 29 |
| 15 | |
| 16 | int range_enc_determine_range(const int *arfcns, int size, int *f0_out); |
Max | 34be86b | 2016-12-16 18:45:51 +0100 | [diff] [blame^] | 17 | int range_enc_arfcns(enum gsm48_range rng, const int *arfcns, int sze, int *out, int idx); |
| 18 | int range_enc_find_index(enum gsm48_range rng, const int *arfcns, int size); |
Jacob Erlbeck | 45014a0 | 2014-01-14 10:42:58 +0100 | [diff] [blame] | 19 | int range_enc_filter_arfcns(int *arfcns, const int sze, const int f0, int *f0_included); |
Holger Hans Peter Freyther | 511f9c3 | 2012-10-13 12:38:54 +0200 | [diff] [blame] | 20 | |
| 21 | int range_enc_range128(uint8_t *chan_list, int f0, int *w); |
| 22 | int range_enc_range256(uint8_t *chan_list, int f0, int *w); |
| 23 | int range_enc_range512(uint8_t *chan_list, int f0, int *w); |
| 24 | int range_enc_range1024(uint8_t *chan_list, int f0, int f0_incl, int *w); |
| 25 | |
| 26 | #endif |