From 2c797fce1ad4b2b2b6f531acfd402785c11f8d7c Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Mon, 16 Nov 2020 11:57:05 +0100 Subject: [PATCH] phy_common: add method to check whether we use default LTE symbol size helpful getter to check whether we've compiled in or selected at run time to use default LTE sample rates --- lib/include/srslte/phy/common/phy_common.h | 2 ++ lib/src/phy/common/phy_common.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/lib/include/srslte/phy/common/phy_common.h b/lib/include/srslte/phy/common/phy_common.h index 90587673a..f41ddaad4 100644 --- a/lib/include/srslte/phy/common/phy_common.h +++ b/lib/include/srslte/phy/common/phy_common.h @@ -444,6 +444,8 @@ SRSLTE_API int srslte_sampling_freq_hz(uint32_t nof_prb); SRSLTE_API void srslte_use_standard_symbol_size(bool enabled); +SRSLTE_API bool srslte_symbol_size_is_standard(); + SRSLTE_API uint32_t srslte_re_x_prb(uint32_t ns, uint32_t symbol, uint32_t nof_ports, uint32_t nof_symbols); SRSLTE_API uint32_t srslte_voffset(uint32_t symbol_id, uint32_t cell_id, uint32_t nof_ports); diff --git a/lib/src/phy/common/phy_common.c b/lib/src/phy/common/phy_common.c index 0717eb8b7..9ef9cc1c9 100644 --- a/lib/src/phy/common/phy_common.c +++ b/lib/src/phy/common/phy_common.c @@ -321,6 +321,11 @@ void srslte_use_standard_symbol_size(bool enabled) use_standard_rates = enabled; } +bool srslte_symbol_size_is_standard() +{ + return use_standard_rates; +} + int srslte_sampling_freq_hz(uint32_t nof_prb) { int n = srslte_symbol_sz(nof_prb);