From 15a544e2ad4f9bc389ed889be0fcfffacecfd3ed Mon Sep 17 00:00:00 2001 From: Silvano Seva Date: Sat, 29 Mar 2025 18:59:44 +0100 Subject: [PATCH] DM-1701: radio driver --- openrtx/src/rtx/OpMode_M17.cpp | 3 +++ platform/drivers/baseband/radio_UV3x0.cpp | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/openrtx/src/rtx/OpMode_M17.cpp b/openrtx/src/rtx/OpMode_M17.cpp index 82e07637..b9cabbb2 100644 --- a/openrtx/src/rtx/OpMode_M17.cpp +++ b/openrtx/src/rtx/OpMode_M17.cpp @@ -98,6 +98,9 @@ void OpMode_M17::update(rtxStatus_t *const status, const bool newCfg) invertRxPhase = (mod17CalData.bb_rx_invert == 1) ? true : false; #elif defined(PLATFORM_CS7000) || defined(PLATFORM_CS7000P) invertTxPhase = true; + #elif defined(PLATFORM_DM1701) + invertTxPhase = true; + invertRxPhase = true; #endif // Main FSM logic diff --git a/platform/drivers/baseband/radio_UV3x0.cpp b/platform/drivers/baseband/radio_UV3x0.cpp index bb107299..c5501eaa 100644 --- a/platform/drivers/baseband/radio_UV3x0.cpp +++ b/platform/drivers/baseband/radio_UV3x0.cpp @@ -67,8 +67,10 @@ void radio_init(const rtxStatus_t *rtxState) gpio_clearPin(PA_SEL_SW); // TODO: keep audio connected to HR_C6000, for volume control +#ifndef PLATFORM_DM1701 gpio_setMode(RX_AUDIO_MUX, OUTPUT); gpio_setPin(RX_AUDIO_MUX); +#endif /* * Configure and enable DAC @@ -122,7 +124,12 @@ void radio_setOpmode(const enum opmode mode) at1846s.setOpMode(AT1846S_OpMode::DMR); // AT1846S in DMR mode, disables RX filter at1846s.setBandwidth(AT1846S_BW::_25); // Set bandwidth to 25kHz for proper deviation C6000.fmMode(); // HR_C6000 in FM mode + #if defined(PLATFORM_DM1701) + C6000.setInputGain(-6); // Input gain in dB, found experimentally + C6000.writeCfgRegister(0x35, 0x12); // FM deviation coefficient + #else C6000.setInputGain(+6); // Input gain in dB, found experimentally + #endif break; default: