From a84d8fe6f098fbf2c20fbe805d62967fa6d6c899 Mon Sep 17 00:00:00 2001 From: Silvano Seva Date: Sat, 12 Oct 2024 14:45:45 +0200 Subject: [PATCH] Removed unused function from radio interface API --- openrtx/include/interfaces/radio.h | 13 ----------- platform/drivers/baseband/radio_GDx.cpp | 8 ------- platform/drivers/baseband/radio_MD3x0.cpp | 23 -------------------- platform/drivers/baseband/radio_MD9600.cpp | 6 ----- platform/drivers/baseband/radio_Mod17.cpp | 6 ----- platform/drivers/baseband/radio_UV3x0.cpp | 8 ------- platform/drivers/baseband/radio_linux.cpp | 7 ------ platform/drivers/baseband/radio_ttwrplus.cpp | 8 ------- platform/drivers/stubs/radio_stub.c | 6 ----- 9 files changed, 85 deletions(-) diff --git a/openrtx/include/interfaces/radio.h b/openrtx/include/interfaces/radio.h index 862112d7..5809dab0 100644 --- a/openrtx/include/interfaces/radio.h +++ b/openrtx/include/interfaces/radio.h @@ -55,19 +55,6 @@ void radio_init(const rtxStatus_t *rtxState); */ void radio_terminate(); -/** - * This function allows to fine tune the VCXO frequency by acting on the - * polarisation voltage. - * The offset parameters allowed range of ±32768 and they are algebraically - * added to the tuning value provided by the manufacturer's calibration data. - * Not calling this function results in leaving the VCXO tuning as provided by - * the manufacturer's calibration data. - * - * @param vhfOffset: VCXO tuning offset for VHF band. - * @param uhfOffset: VCXO tuning offset for UHF band. - */ -void radio_tuneVcxo(const int16_t vhfOffset, const int16_t uhfOffset); - /** * Set current operating mode. * diff --git a/platform/drivers/baseband/radio_GDx.cpp b/platform/drivers/baseband/radio_GDx.cpp index 59175731..66329535 100644 --- a/platform/drivers/baseband/radio_GDx.cpp +++ b/platform/drivers/baseband/radio_GDx.cpp @@ -104,14 +104,6 @@ void radio_terminate() SIM->SCGC6 &= ~SIM_SCGC6_DAC0_MASK; } -void radio_tuneVcxo(const int16_t vhfOffset, const int16_t uhfOffset) -{ - //TODO: this part will be implemented in the future, when proved to be - // necessary. - (void) vhfOffset; - (void) uhfOffset; -} - void radio_setOpmode(const enum opmode mode) { switch(mode) diff --git a/platform/drivers/baseband/radio_MD3x0.cpp b/platform/drivers/baseband/radio_MD3x0.cpp index bc3b953d..c9b956a8 100644 --- a/platform/drivers/baseband/radio_MD3x0.cpp +++ b/platform/drivers/baseband/radio_MD3x0.cpp @@ -162,29 +162,6 @@ void radio_terminate() RCC->APB1ENR &= ~RCC_APB1ENR_DACEN; } -void radio_tuneVcxo(const int16_t vhfOffset, const int16_t uhfOffset) -{ - (void) vhfOffset; - - /* - * Adjust VCXO bias voltage acting on the value stored in MCU's DAC. - * Data from calibration is first converted to int16_t, then the value for - * the DAC register is computed according to which is done inside TYT's - * firmware. - * The signed offset is then added to this value, the result is constrained - * in the range [0 4095], converted to uint16_t and written into the DAC - * register. - * - * NOTE: we deliberately chose not to update the HR_C5000 modulation offset - * register, as we still have to deeply understand how TYT computes - * the values written there. - */ - int16_t calValue = static_cast< int16_t >(calData.freqAdjustMid); - int16_t oscTune = (calValue*4 + 0x600) + uhfOffset; - oscTune = std::max(std::min(oscTune, int16_t(4095)), int16_t(0)); - DAC->DHR12R2 = static_cast< uint16_t >(oscTune); -} - void radio_setOpmode(const enum opmode mode) { switch(mode) diff --git a/platform/drivers/baseband/radio_MD9600.cpp b/platform/drivers/baseband/radio_MD9600.cpp index 46abaf91..4380a372 100644 --- a/platform/drivers/baseband/radio_MD9600.cpp +++ b/platform/drivers/baseband/radio_MD9600.cpp @@ -30,12 +30,6 @@ void radio_terminate() } -void radio_tuneVcxo(const int16_t vhfOffset, const int16_t uhfOffset) -{ - (void) vhfOffset; - (void) uhfOffset; -} - void radio_setOpmode(const enum opmode mode) { (void) mode; diff --git a/platform/drivers/baseband/radio_Mod17.cpp b/platform/drivers/baseband/radio_Mod17.cpp index 9455bbce..1b55c727 100644 --- a/platform/drivers/baseband/radio_Mod17.cpp +++ b/platform/drivers/baseband/radio_Mod17.cpp @@ -44,12 +44,6 @@ void radio_terminate() radioStatus = OFF; } -void radio_tuneVcxo(const int16_t vhfOffset, const int16_t uhfOffset) -{ - (void) vhfOffset; - (void) uhfOffset; -} - void radio_setOpmode(const enum opmode mode) { (void) mode; diff --git a/platform/drivers/baseband/radio_UV3x0.cpp b/platform/drivers/baseband/radio_UV3x0.cpp index 68e5a3a7..ca52f322 100644 --- a/platform/drivers/baseband/radio_UV3x0.cpp +++ b/platform/drivers/baseband/radio_UV3x0.cpp @@ -102,14 +102,6 @@ void radio_terminate() RCC->APB1ENR &= ~RCC_APB1ENR_DACEN; } -void radio_tuneVcxo(const int16_t vhfOffset, const int16_t uhfOffset) -{ - //TODO: this part will be implemented in the future, when proved to be - // necessary. - (void) vhfOffset; - (void) uhfOffset; -} - void radio_setOpmode(const enum opmode mode) { switch(mode) diff --git a/platform/drivers/baseband/radio_linux.cpp b/platform/drivers/baseband/radio_linux.cpp index f7a36767..390457c9 100644 --- a/platform/drivers/baseband/radio_linux.cpp +++ b/platform/drivers/baseband/radio_linux.cpp @@ -34,13 +34,6 @@ void radio_terminate() puts("radio_linux: terminate() called"); } -void radio_tuneVcxo(const int16_t vhfOffset, const int16_t uhfOffset) -{ - (void) vhfOffset; - (void) uhfOffset; - puts("radio_linux: tuneVcxo() called"); -} - void radio_setOpmode(const enum opmode mode) { std::string mStr(" "); diff --git a/platform/drivers/baseband/radio_ttwrplus.cpp b/platform/drivers/baseband/radio_ttwrplus.cpp index a1191417..fa7b6bb3 100644 --- a/platform/drivers/baseband/radio_ttwrplus.cpp +++ b/platform/drivers/baseband/radio_ttwrplus.cpp @@ -65,14 +65,6 @@ void radio_terminate() at1846s.terminate(); } -void radio_tuneVcxo(const int16_t vhfOffset, const int16_t uhfOffset) -{ - //TODO: this part will be implemented in the future, when proved to be - // necessary. - (void) vhfOffset; - (void) uhfOffset; -} - void radio_setOpmode(const enum opmode mode) { switch(mode) diff --git a/platform/drivers/stubs/radio_stub.c b/platform/drivers/stubs/radio_stub.c index 080d242e..82cc9ef7 100644 --- a/platform/drivers/stubs/radio_stub.c +++ b/platform/drivers/stubs/radio_stub.c @@ -31,12 +31,6 @@ void radio_terminate() } -void radio_tuneVcxo(const int16_t vhfOffset, const int16_t uhfOffset) -{ - (void) vhfOffset; - (void) uhfOffset; -} - void radio_setOpmode(const enum opmode mode) { (void) mode;