Added FM_TurnOff.

This commit is contained in:
Dual Tachyon 2023-08-26 18:43:05 +01:00
parent 38c7db80b3
commit bc66e85377
2 changed files with 16 additions and 0 deletions

15
fm.c
View File

@ -14,7 +14,11 @@
* limitations under the License.
*/
#include "bsp/dp32g030/gpio.h"
#include "driver/bk1080.h"
#include "driver/gpio.h"
#include "fm.h"
#include "misc.h"
#include "settings.h"
uint16_t gFM_Channels[20];
@ -66,3 +70,14 @@ int FM_ConfigureChannelState(void)
return 0;
}
void FM_TurnOff(void)
{
gFmMute = false;
g_20000390 = 0;
g_2000038E = 0;
GPIO_ClearBit(&GPIOC->DATA, GPIOC_PIN_AUDIO_PATH);
g_2000036B = 0;
BK1080_Init(0, false);
g_2000036F = 1;
}

1
fm.h
View File

@ -29,6 +29,7 @@ extern bool gFmMute;
bool FM_CheckValidChannel(uint8_t Channel);
uint8_t FM_FindNextChannel(uint8_t Channel, uint8_t Direction);
int FM_ConfigureChannelState(void);
void FM_TurnOff(void);
#endif