0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-18 14:19:49 +03:00

FM radio n DW now friends again

This commit is contained in:
OneOfEleven
2023-11-03 16:41:05 +00:00
parent fba4ece9fd
commit 474317c149
6 changed files with 65 additions and 27 deletions

View File

@ -895,11 +895,25 @@ void BK4819_StartTone1(const uint16_t frequency, const unsigned int level)
BK4819_WriteRegister(0x70, BK4819_REG_70_ENABLE_TONE1 | ((level & 0x7f) << BK4819_REG_70_SHIFT_TONE1_TUNING_GAIN));
BK4819_WriteRegister(0x30, 0);
BK4819_WriteRegister(0x30, // all of the following must be enable to get an audio beep ! ???
#if 1
BK4819_WriteRegister(0x30,
BK4819_REG_30_ENABLE_AF_DAC |
BK4819_REG_30_ENABLE_DISC_MODE |
BK4819_REG_30_ENABLE_TX_DSP);
#else
BK4819_WriteRegister(0x30,
BK4819_REG_30_ENABLE_VCO_CALIB |
BK4819_REG_30_ENABLE_UNKNOWN |
// BK4819_REG_30_ENABLE_RX_LINK |
BK4819_REG_30_ENABLE_AF_DAC | //
BK4819_REG_30_ENABLE_DISC_MODE | //
BK4819_REG_30_ENABLE_PLL_VCO |
BK4819_REG_30_ENABLE_PA_GAIN |
// BK4819_REG_30_ENABLE_MIC_ADC |
BK4819_REG_30_ENABLE_TX_DSP | //
// BK4819_REG_30_ENABLE_RX_DSP |
0);
#endif
BK4819_WriteRegister(0x71, scale_freq(frequency));