blob: 4c40db0f5f5d11f6d7e93af0d55af99ff1561c5a [file] [log] [blame]
Yves Godin660709d2016-05-19 11:08:03 +02001#ifndef LC15BTS_H
2#define LC15BTS_H
3
4#include <stdlib.h>
5#include <osmocom/core/utils.h>
6
7#include <nrw/litecell15/litecell15.h>
8#include <nrw/litecell15/gsml1const.h>
9
10/*
11 * Depending on the firmware version either GsmL1_Prim_t or Litecell15_Prim_t
12 * is the bigger struct. For earlier firmware versions the GsmL1_Prim_t was the
13 * bigger struct.
14 */
15#define LC15BTS_PRIM_SIZE \
16 (OSMO_MAX(sizeof(Litecell15_Prim_t), sizeof(GsmL1_Prim_t)) + 128)
17
18enum l1prim_type {
19 L1P_T_INVALID, /* this must be 0 to detect uninitialized elements */
20 L1P_T_REQ,
21 L1P_T_CONF,
22 L1P_T_IND,
23};
24
25enum l1prim_type lc15bts_get_l1prim_type(GsmL1_PrimId_t id);
26const struct value_string lc15bts_l1prim_names[GsmL1_PrimId_NUM+1];
27GsmL1_PrimId_t lc15bts_get_l1prim_conf(GsmL1_PrimId_t id);
28
29enum l1prim_type lc15bts_get_sysprim_type(Litecell15_PrimId_t id);
30const struct value_string lc15bts_sysprim_names[Litecell15_PrimId_NUM+1];
31Litecell15_PrimId_t lc15bts_get_sysprim_conf(Litecell15_PrimId_t id);
32
33const struct value_string lc15bts_l1sapi_names[GsmL1_Sapi_NUM+1];
34const struct value_string lc15bts_l1status_names[GSML1_STATUS_NUM+1];
35
36const struct value_string lc15bts_tracef_names[29];
37const struct value_string lc15bts_tracef_docs[29];
38
39const struct value_string lc15bts_tch_pl_names[15];
40
41const struct value_string lc15bts_clksrc_names[10];
42
43const struct value_string lc15bts_dir_names[6];
44
45enum pdch_cs {
46 PDCH_CS_1,
47 PDCH_CS_2,
48 PDCH_CS_3,
49 PDCH_CS_4,
50 PDCH_MCS_1,
51 PDCH_MCS_2,
52 PDCH_MCS_3,
53 PDCH_MCS_4,
54 PDCH_MCS_5,
55 PDCH_MCS_6,
56 PDCH_MCS_7,
57 PDCH_MCS_8,
58 PDCH_MCS_9,
59 _NUM_PDCH_CS
60};
61
62const uint8_t pdch_msu_size[_NUM_PDCH_CS];
63
64#endif /* LC15BTS_H */