diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-07-31 20:08:33 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-08-21 15:49:06 +0200 |
commit | 54a8b313b4bac5b3853d8e9bcea5385651354651 (patch) | |
tree | e2b4725f7708db874ecc49f9f898dcbe613a90c6 /src/osmo-bts-sysmo/misc/sysmobts_misc.h | |
parent | c84ca8c82fa1383efc96016e206bce709ed9b9d4 (diff) |
sysmobts: There is only one uc make it a singleton
Move the init and polling into the sysmoBTS related part. In the
future we should have _one_ temperature control.
Diffstat (limited to 'src/osmo-bts-sysmo/misc/sysmobts_misc.h')
-rw-r--r-- | src/osmo-bts-sysmo/misc/sysmobts_misc.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/osmo-bts-sysmo/misc/sysmobts_misc.h b/src/osmo-bts-sysmo/misc/sysmobts_misc.h index 7df35874..f3b85c2c 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_misc.h +++ b/src/osmo-bts-sysmo/misc/sysmobts_misc.h @@ -3,6 +3,12 @@ #include <stdint.h> +/* every 6 hours means 365*4 = 1460 EEprom writes per year (max) */ +#define TEMP_TIMER_SECS (6 * 3600) + +/* every 1 hours means 365*24 = 8760 EEprom writes per year (max) */ +#define HOURS_TIMER_SECS (1 * 3600) + enum sysmobts_temp_sensor { SYSMOBTS_TEMP_DIGITAL = 1, SYSMOBTS_TEMP_RF = 2, @@ -37,13 +43,9 @@ enum sysmobts_firmware_type { 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); +void sbts2050_uc_check_temp(int *temp_pa, int *temp_board); +void sbts2050_uc_set_power(int pmaster, int pslave, int ppa); +int sbts2050_uc_get_status(enum sbts2050_status_rqt status); +void sbts2050_uc_initialize(); #endif |