DM-1701: radio driver

This commit is contained in:
Silvano Seva 2025-03-29 18:59:44 +01:00
parent 7636794783
commit 15a544e2ad
2 changed files with 10 additions and 0 deletions

View File

@ -98,6 +98,9 @@ void OpMode_M17::update(rtxStatus_t *const status, const bool newCfg)
invertRxPhase = (mod17CalData.bb_rx_invert == 1) ? true : false; invertRxPhase = (mod17CalData.bb_rx_invert == 1) ? true : false;
#elif defined(PLATFORM_CS7000) || defined(PLATFORM_CS7000P) #elif defined(PLATFORM_CS7000) || defined(PLATFORM_CS7000P)
invertTxPhase = true; invertTxPhase = true;
#elif defined(PLATFORM_DM1701)
invertTxPhase = true;
invertRxPhase = true;
#endif #endif
// Main FSM logic // Main FSM logic

View File

@ -67,8 +67,10 @@ void radio_init(const rtxStatus_t *rtxState)
gpio_clearPin(PA_SEL_SW); gpio_clearPin(PA_SEL_SW);
// TODO: keep audio connected to HR_C6000, for volume control // TODO: keep audio connected to HR_C6000, for volume control
#ifndef PLATFORM_DM1701
gpio_setMode(RX_AUDIO_MUX, OUTPUT); gpio_setMode(RX_AUDIO_MUX, OUTPUT);
gpio_setPin(RX_AUDIO_MUX); gpio_setPin(RX_AUDIO_MUX);
#endif
/* /*
* Configure and enable DAC * 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.setOpMode(AT1846S_OpMode::DMR); // AT1846S in DMR mode, disables RX filter
at1846s.setBandwidth(AT1846S_BW::_25); // Set bandwidth to 25kHz for proper deviation at1846s.setBandwidth(AT1846S_BW::_25); // Set bandwidth to 25kHz for proper deviation
C6000.fmMode(); // HR_C6000 in FM mode 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 C6000.setInputGain(+6); // Input gain in dB, found experimentally
#endif
break; break;
default: default: