mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 22:31:25 +03:00
remove some speaker clicks
This commit is contained in:
parent
9095eba846
commit
e0eddfcfdd
@ -1034,10 +1034,6 @@ void BK4819_StartTone1(const uint16_t frequency, const unsigned int level, const
|
||||
|
||||
BK4819_EnterTxMute();
|
||||
|
||||
// SYSTEM_DelayMs(2);
|
||||
GPIO_SetBit(&GPIOC->DATA, GPIOC_PIN_SPEAKER); // enable speaker
|
||||
SYSTEM_DelayMs(2);
|
||||
|
||||
BK4819_WriteRegister(BK4819_REG_70, BK4819_REG_70_ENABLE_TONE1 | ((level & 0x7f) << BK4819_REG_70_SHIFT_TONE1_TUNING_GAIN));
|
||||
|
||||
if (set_dac)
|
||||
@ -1049,17 +1045,21 @@ void BK4819_StartTone1(const uint16_t frequency, const unsigned int level, const
|
||||
|
||||
BK4819_WriteRegister(BK4819_REG_71, scale_freq(frequency));
|
||||
BK4819_ExitTxMute();
|
||||
|
||||
// SYSTEM_DelayMs(2);
|
||||
GPIO_SetBit(&GPIOC->DATA, GPIOC_PIN_SPEAKER); // enable speaker
|
||||
SYSTEM_DelayMs(2);
|
||||
}
|
||||
|
||||
void BK4819_StopTones(void)
|
||||
{
|
||||
// if (!g_enable_speaker)
|
||||
GPIO_ClearBit(&GPIOC->DATA, GPIOC_PIN_SPEAKER);
|
||||
|
||||
BK4819_EnterTxMute();
|
||||
BK4819_WriteRegister(BK4819_REG_70, 0);
|
||||
BK4819_WriteRegister(BK4819_REG_30, 0xC1FE); // 1100 0001 1111 1110
|
||||
BK4819_ExitTxMute();
|
||||
|
||||
// if (!g_enable_speaker)
|
||||
// GPIO_ClearBit(&GPIOC->DATA, GPIOC_PIN_SPEAKER);
|
||||
}
|
||||
|
||||
void BK4819_PlayTone(const unsigned int tone_Hz, const unsigned int delay, const unsigned int level)
|
||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user