Simplify APP_EndTransmission

* Unify Roger-Beep selection
 * Extract function for DTMF EoT
This commit is contained in:
Juan Antonio
2023-12-22 18:24:40 +01:00
committed by egzumer
parent 34f2168856
commit 1f4f026162
7 changed files with 97 additions and 86 deletions

View File

@@ -1688,7 +1688,7 @@ void BK4819_PrepareFSKReceive(void)
BK4819_WriteRegister(BK4819_REG_59, 0x3068);
}
void BK4819_PlayRogerNormal(void)
static void BK4819_PlayRogerNormal(void)
{
#if 0
const uint32_t tone1_Hz = 500;
@@ -1699,6 +1699,7 @@ void BK4819_PlayRogerNormal(void)
const uint32_t tone2_Hz = 1310;
#endif
BK4819_EnterTxMute();
BK4819_SetAF(BK4819_AF_MUTE);
@@ -1723,6 +1724,7 @@ void BK4819_PlayRogerNormal(void)
BK4819_WriteRegister(BK4819_REG_30, 0xC1FE); // 1 1 0000 0 1 1111 1 1 1 0
}
void BK4819_PlayRogerMDC(void)
{
struct reg_value {
@@ -1771,6 +1773,15 @@ void BK4819_PlayRogerMDC(void)
BK4819_WriteRegister(BK4819_REG_58, 0x0000);
}
void BK4819_PlayRoger(void)
{
if (gEeprom.ROGER == ROGER_MODE_ROGER) {
BK4819_PlayRogerNormal();
} else if (gEeprom.ROGER == ROGER_MODE_MDC) {
BK4819_PlayRogerMDC();
}
}
void BK4819_Enable_AfDac_DiscMode_TxDsp(void)
{
BK4819_WriteRegister(BK4819_REG_30, 0x0000);