blob: bd85d6af4aac4cd97e6586c573f49bafaa286110 [file] [log] [blame]
Holger Hans Peter Freyther511f9c32012-10-13 12:38:54 +02001#ifndef ARFCN_RANGE_ENCODE_H
2#define ARFCN_RANGE_ENCODE_H
3
4#include <stdint.h>
5
6enum {
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
16int range_enc_determine_range(const int *arfcns, int size, int *f0_out);
17int range_enc_arfcns(const int rng, const int *arfcns, int sze, int *out, int idx);
18int range_enc_find_index(const int rng, const int *arfcns, int size);
Jacob Erlbeck45014a02014-01-14 10:42:58 +010019int range_enc_filter_arfcns(int *arfcns, const int sze, const int f0, int *f0_included);
Holger Hans Peter Freyther511f9c32012-10-13 12:38:54 +020020
21int range_enc_range128(uint8_t *chan_list, int f0, int *w);
22int range_enc_range256(uint8_t *chan_list, int f0, int *w);
23int range_enc_range512(uint8_t *chan_list, int f0, int *w);
24int range_enc_range1024(uint8_t *chan_list, int f0, int f0_incl, int *w);
25
26#endif