diff options
author | Harald Welte <laforge@gnumonks.org> | 2012-11-18 10:38:32 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2012-11-18 10:38:32 +0100 |
commit | 36e73dd7ed1479f5a8c21fb8d49656e2173256f6 (patch) | |
tree | bb970e232c8b71c2105bf746114b18201d5ec8fd /src | |
parent | 17dd7fad72cdc80edc4b5d717c4267977cf0c1ba (diff) |
Ensure osmo-bts builds agsainst sysmobts-v1 headers (again)
Diffstat (limited to 'src')
-rw-r--r-- | src/osmo-bts-sysmo/calib_file.c | 1 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/femtobts.h | 25 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/l1_if.c | 9 |
3 files changed, 33 insertions, 2 deletions
diff --git a/src/osmo-bts-sysmo/calib_file.c b/src/osmo-bts-sysmo/calib_file.c index 415f0442..081444fa 100644 --- a/src/osmo-bts-sysmo/calib_file.c +++ b/src/osmo-bts-sysmo/calib_file.c @@ -33,6 +33,7 @@ #include <sysmocom/femtobts/gsml1const.h> #include "l1_if.h" +#include "femtobts.h" struct calib_file_desc { const char *fname; diff --git a/src/osmo-bts-sysmo/femtobts.h b/src/osmo-bts-sysmo/femtobts.h index 0e633297..72397571 100644 --- a/src/osmo-bts-sysmo/femtobts.h +++ b/src/osmo-bts-sysmo/femtobts.h @@ -7,6 +7,29 @@ #include <sysmocom/femtobts/superfemto.h> #include <sysmocom/femtobts/gsml1const.h> +#ifdef FEMTOBTS_API_VERSION +#define SuperFemto_PrimId_t FemtoBts_PrimId_t +#define SuperFemto_Prim_t FemtoBts_Prim_t +#define SuperFemto_PrimId_SystemInfoReq FemtoBts_PrimId_SystemInfoReq +#define SuperFemto_PrimId_SystemInfoCnf FemtoBts_PrimId_SystemInfoCnf +#define SuperFemto_SystemInfoCnf_t FemtoBts_SystemInfoCnf_t +#define SuperFemto_PrimId_SystemFailureInd FemtoBts_PrimId_SystemFailureInd +#define SuperFemto_PrimId_ActivateRfReq FemtoBts_PrimId_ActivateRfReq +#define SuperFemto_PrimId_ActivateRfCnf FemtoBts_PrimId_ActivateRfCnf +#define SuperFemto_PrimId_DeactivateRfReq FemtoBts_PrimId_DeactivateRfReq +#define SuperFemto_PrimId_DeactivateRfCnf FemtoBts_PrimId_DeactivateRfCnf +#define SuperFemto_PrimId_SetTraceFlagsReq FemtoBts_PrimId_SetTraceFlagsReq +#define SuperFemto_PrimId_RfClockInfoReq FemtoBts_PrimId_RfClockInfoReq +#define SuperFemto_PrimId_RfClockInfoCnf FemtoBts_PrimId_RfClockInfoCnf +#define SuperFemto_PrimId_RfClockSetupReq FemtoBts_PrimId_RfClockSetupReq +#define SuperFemto_PrimId_RfClockSetupCnf FemtoBts_PrimId_RfClockSetupCnf +#define SuperFemto_PrimId_Layer1ResetReq FemtoBts_PrimId_Layer1ResetReq +#define SuperFemto_PrimId_Layer1ResetCnf FemtoBts_PrimId_Layer1ResetCnf +#define SuperFemto_PrimId_NUM FemtoBts_PrimId_NUM +#define HW_SYSMOBTS_V1 1 +#define SUPERFEMTO_API(x,y,z) FEMTOBTS_API(x,y,z) +#endif + #ifdef L1_HAS_RTP_MODE /* This is temporarily disabled, as AMR has some bugs in RTP mode */ //#define USE_L1_RTP_MODE /* Tell L1 to use RTP mode */ @@ -26,7 +49,7 @@ enum l1prim_type { L1P_T_IND, }; -#if SUPERFEMTO_API_VERSION < SUPERFEMTO_API(2,1,0) +#if !defined(SUPERFEMTO_API_VERSION) || SUPERFEMTO_API_VERSION < SUPERFEMTO_API(2,1,0) enum uperfemto_clk_src { SF_CLKSRC_NONE = 0, SF_CLKSRC_OCXO = 1, diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 7e4c6dbf..c30ef385 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -1169,10 +1169,17 @@ struct femtol1_hdl *l1if_open(void *priv) struct femtol1_hdl *fl1h; int rc; - LOGP(DL1C, LOGL_INFO, "sysmoBTS L1IF compiled against API headers " +#ifndef HW_SYSMOBTS_V1 + LOGP(DL1C, LOGL_INFO, "sysmoBTSv2 L1IF compiled against API headers " "v%u.%u.%u\n", SUPERFEMTO_API_VERSION >> 16, (SUPERFEMTO_API_VERSION >> 8) & 0xff, SUPERFEMTO_API_VERSION & 0xff); +#else + LOGP(DL1C, LOGL_INFO, "sysmoBTSv1 L1IF compiled against API headers " + "v%u.%u.%u\n", FEMTOBTS_API_VERSION >> 16, + (FEMTOBTS_API_VERSION >> 8) & 0xff, + FEMTOBTS_API_VERSION & 0xff); +#endif fl1h = talloc_zero(priv, struct femtol1_hdl); if (!fl1h) |