From a7bf6cd8a41c62c95959298978e86f324a8e140f Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Tue, 14 Jan 2020 17:52:15 +0100 Subject: lms: Store device type specific parameters in one place Add an enum containing each supported device type (LimeSDR-USB, LimeSDR-Mini and LimeNet-Micro) plus "unknown", to leave some room for yet-to-come devices to run with some generic parameters without rebuilding osmo-trx. Each device type is assigned a dev_desc structure, and all of them are put in HashMap, similar to what's already done in UHDDevice.cpp. Device type is infered from string provided by LMS_GetDeviceInfo(), as it was already done before in several places. From now on, we only need to parse the string once since we store the device type after first during open time. Later on, more fields will be moved to device-type specific structure, such as Tx timing offset, clock rate, etc. Change-Id: I7658615787c5bc41c365bab9c11733b701ac2ae5 --- CommonLibs/trx_vty.c | 2 +- CommonLibs/trx_vty.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'CommonLibs') diff --git a/CommonLibs/trx_vty.c b/CommonLibs/trx_vty.c index 44e1d31..3f875f5 100644 --- a/CommonLibs/trx_vty.c +++ b/CommonLibs/trx_vty.c @@ -42,7 +42,7 @@ static struct trx_ctx* g_trx_ctx; -static const struct value_string clock_ref_names[] = { +const struct value_string clock_ref_names[] = { { REF_INTERNAL, "internal" }, { REF_EXTERNAL, "external" }, { REF_GPS, "gpsdo" }, diff --git a/CommonLibs/trx_vty.h b/CommonLibs/trx_vty.h index d20dd96..c0d54cf 100644 --- a/CommonLibs/trx_vty.h +++ b/CommonLibs/trx_vty.h @@ -5,6 +5,7 @@ #include "config_defs.h" extern struct vty_app_info g_vty_info; +extern const struct value_string clock_ref_names[]; extern const struct value_string filler_names[]; /* Maximum number of physical RF channels */ -- cgit v1.2.3