aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/misc/sysmobts_misc.h
blob: 7df35874814048f42dfbdc0a1494e17bf1b15f5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef _SYSMOBTS_MISC_H
#define _SYSMOBTS_MISC_H

#include <stdint.h>

enum sysmobts_temp_sensor {
	SYSMOBTS_TEMP_DIGITAL = 1,
	SYSMOBTS_TEMP_RF = 2,
};

enum sysmobts_temp_type {
	SYSMOBTS_TEMP_INPUT,
	SYSMOBTS_TEMP_LOWEST,
	SYSMOBTS_TEMP_HIGHEST,
	_NUM_TEMP_TYPES
};

enum sbts2050_status_rqt {
	SBTS2050_STATUS_MASTER,
	SBTS2050_STATUS_SLAVE,
	SBTS2050_STATUS_PA
};

int sysmobts_temp_get(enum sysmobts_temp_sensor sensor,
		      enum sysmobts_temp_type type);

void sysmobts_check_temp(int no_eeprom_write);

int sysmobts_update_hours(int no_epprom_write);

enum sysmobts_firmware_type {
	SYSMOBTS_FW_FPGA,
	SYSMOBTS_FW_DSP,
	_NUM_FW
};

int sysmobts_firmware_reload(enum sysmobts_firmware_type type);


struct uc {
	int id;
	int fd;
	const char *path;
};
void sbts2050_uc_check_temp(struct uc *ucontrol, int *temp_pa, int *temp_board);
void sbts2050_uc_set_power(struct uc *ucontrol, int pmaster, int pslave, int ppa);
int sbts2050_uc_get_status(struct uc *ucontrol, enum sbts2050_status_rqt status);

#endif