Add ENABLE_FMRADIO_EMBEDDED to split resident FM from shared driver

This commit is contained in:
Armel FAUVEAU committed 2026-09-03 00:18:52 +02:00
1 parent 74b2397c96
commit d95e4efa57
17 files changed
+104 -119

No files matched your search

+4 -5
View File
@@ -117,16 +117,15 @@ endif()
# ---- STOCK QUANSHENG FEATURES ---- # ---- STOCK QUANSHENG FEATURES ----
# ENABLE_FMRADIO compiles the BK1080 driver and the FM logic/helpers (fm.c). # ENABLE_FMRADIO keeps the BK1080 driver and the FM data/helpers shared with the
# The resident FM *screen* (ui/fmradio.c) is redundant with the FM overlay app, # overlay. ENABLE_FMRADIO_EMBEDDED additionally selects the legacy resident
# so it is dropped when OVERLAY_APPS is on - the overlay app reaches the driver # state machine and its integration with the main scheduler.
# and the fm.c helpers through the ABI instead, and ACTION_FM's launcher body is
# neutralised in action.c so the resident screen can never open.
enable_feature(ENABLE_FMRADIO enable_feature(ENABLE_FMRADIO
driver/bk1080.c driver/bk1080.c
app/fm.c app/fm.c
) )
if(ENABLE_FMRADIO AND NOT ENABLE_FEAT_F4HWN_OVERLAY_APPS) if(ENABLE_FMRADIO AND NOT ENABLE_FEAT_F4HWN_OVERLAY_APPS)
target_compile_definitions(App INTERFACE ENABLE_FMRADIO_EMBEDDED)
target_sources(App INTERFACE ui/fmradio.c) target_sources(App INTERFACE ui/fmradio.c)
endif() endif()
enable_feature(ENABLE_AIRCOPY enable_feature(ENABLE_AIRCOPY
+10 -8
View File
@@ -25,7 +25,7 @@
#ifdef ENABLE_FLASHLIGHT #ifdef ENABLE_FLASHLIGHT
#include "app/flashlight.h" #include "app/flashlight.h"
#endif #endif
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
#include "app/fm.h" #include "app/fm.h"
#endif #endif
#ifdef ENABLE_FEAT_F4HWN_OVERLAY_APPS #ifdef ENABLE_FEAT_F4HWN_OVERLAY_APPS
@@ -33,7 +33,7 @@
#endif #endif
#include "app/scanner.h" #include "app/scanner.h"
#include "audio.h" #include "audio.h"
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
#include "driver/bk1080.h" #include "driver/bk1080.h"
#endif #endif
#include "driver/bk4819.h" #include "driver/bk4819.h"
@@ -62,7 +62,7 @@
static void ACTION_Beam(void); static void ACTION_Beam(void);
#endif #endif
#if defined(ENABLE_FMRADIO) #if defined(ENABLE_FMRADIO_EMBEDDED)
static void ACTION_Scan_FM(bool bRestart); static void ACTION_Scan_FM(bool bRestart);
#endif #endif
@@ -215,7 +215,7 @@ void ACTION_Monitor(void)
RADIO_SetupRegisters(true); RADIO_SetupRegisters(true);
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gFmRadioMode) { if (gFmRadioMode) {
FM_Start(); FM_Start();
gRequestDisplayScreen = DISPLAY_FM; gRequestDisplayScreen = DISPLAY_FM;
@@ -229,7 +229,7 @@ void ACTION_Scan(bool bRestart)
{ {
(void)bRestart; (void)bRestart;
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gFmRadioMode) { if (gFmRadioMode) {
ACTION_Scan_FM(bRestart); ACTION_Scan_FM(bRestart);
return; return;
@@ -322,7 +322,7 @@ void ACTION_SwitchDemodul(void)
} }
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
inline static bool ACTION_IsBlockedInFM(uint8_t action) inline static bool ACTION_IsBlockedInFM(uint8_t action)
{ {
switch (action) { switch (action) {
@@ -370,7 +370,7 @@ static void ACTION_Execute(uint8_t action)
return; return;
} }
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gFmRadioMode && ACTION_IsBlockedInFM(action)) { if (gFmRadioMode && ACTION_IsBlockedInFM(action)) {
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL; gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
return; return;
@@ -587,6 +587,7 @@ void ACTION_FM(void)
#endif /* !ENABLE_FEAT_F4HWN_OVERLAY_APPS */ #endif /* !ENABLE_FEAT_F4HWN_OVERLAY_APPS */
} }
#ifdef ENABLE_FMRADIO_EMBEDDED
static void ACTION_Scan_FM(bool bRestart) static void ACTION_Scan_FM(bool bRestart)
{ {
if (FUNCTION_IsRx()) if (FUNCTION_IsRx())
@@ -626,6 +627,7 @@ static void ACTION_Scan_FM(bool bRestart)
#endif #endif
} }
#endif
#endif #endif
@@ -785,7 +787,7 @@ void ACTION_Mute(void)
gMute = !gMute; gMute = !gMute;
// Update the registers // Update the registers
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
BK1080_WriteRegister(BK1080_REG_05_SYSTEM_CONFIGURATION2, gMute ? 0x0A10 : 0x0A1F); BK1080_WriteRegister(BK1080_REG_05_SYSTEM_CONFIGURATION2, gMute ? 0x0A10 : 0x0A1F);
#endif #endif
gEeprom.VOLUME_GAIN = gMute ? 0 : gEeprom.VOLUME_GAIN_BACKUP; gEeprom.VOLUME_GAIN = gMute ? 0 : gEeprom.VOLUME_GAIN_BACKUP;
+27 -23
View File
@@ -32,7 +32,7 @@
#ifdef ENABLE_FLASHLIGHT #ifdef ENABLE_FLASHLIGHT
#include "app/flashlight.h" #include "app/flashlight.h"
#endif #endif
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
#include "app/fm.h" #include "app/fm.h"
#endif #endif
#include "app/generic.h" #include "app/generic.h"
@@ -53,7 +53,7 @@
// #include "bsp/dp32g030/pwmplus.h" // #include "bsp/dp32g030/pwmplus.h"
#endif #endif
#include "driver/backlight.h" #include "driver/backlight.h"
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
#include "driver/bk1080.h" #include "driver/bk1080.h"
#endif #endif
#include "driver/bk4819.h" #include "driver/bk4819.h"
@@ -111,8 +111,12 @@ void (*const ProcessKeysFunctions[])(KEY_Code_t Key, bool bKeyPressed, bool bKey
[DISPLAY_MENU] = &MENU_ProcessKeys, [DISPLAY_MENU] = &MENU_ProcessKeys,
[DISPLAY_SCANNER] = &SCANNER_ProcessKeys, [DISPLAY_SCANNER] = &SCANNER_ProcessKeys,
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
[DISPLAY_FM] = &FM_ProcessKeys, [DISPLAY_FM] = &FM_ProcessKeys,
#elif defined(ENABLE_FMRADIO)
/* The modal FM overlay handles its own keys. Keep the enum slot populated
for configurations where DISPLAY_FM is the final display entry. */
[DISPLAY_FM] = &MAIN_ProcessKeys,
#endif #endif
#ifdef ENABLE_AIRCOPY #ifdef ENABLE_AIRCOPY
@@ -246,7 +250,7 @@ static bool ScreenSaverCanDisplay(bool modal)
gCurrentFunction == FUNCTION_TRANSMIT || gCurrentFunction == FUNCTION_TRANSMIT ||
FUNCTION_IsRx() || FUNCTION_IsRx() ||
gPttIsPressed gPttIsPressed
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
|| (gFM_ScanState != FM_SCAN_OFF && !gFM_FoundFrequency) || (gFM_ScanState != FM_SCAN_OFF && !gFM_FoundFrequency)
#endif #endif
#ifdef ENABLE_FEAT_F4HWN_BEAM #ifdef ENABLE_FEAT_F4HWN_BEAM
@@ -260,7 +264,7 @@ static bool ScreenSaverCanDisplay(bool modal)
if (modal || gScreenToDisplay == DISPLAY_MAIN) if (modal || gScreenToDisplay == DISPLAY_MAIN)
return true; return true;
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gScreenToDisplay == DISPLAY_FM) if (gScreenToDisplay == DISPLAY_FM)
return true; return true;
#endif #endif
@@ -374,7 +378,7 @@ static void CheckForIncoming(void)
if (!g_SquelchLost) if (!g_SquelchLost)
return; // squelch is closed return; // squelch is closed
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
// FM scan in progress: ignore main-channel RX so scanning is not interrupted. // FM scan in progress: ignore main-channel RX so scanning is not interrupted.
// Normal FM listening (FM_SCAN_OFF) still yields to channel signals as before. // Normal FM listening (FM_SCAN_OFF) still yields to channel signals as before.
if (gFmRadioMode && gFM_ScanState != FM_SCAN_OFF) if (gFmRadioMode && gFM_ScanState != FM_SCAN_OFF)
@@ -513,7 +517,7 @@ static void HandleIncoming(void)
} }
#endif #endif
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
// Defensive: do not leave FM scan for a main-channel signal. // Defensive: do not leave FM scan for a main-channel signal.
if (gFmRadioMode && gFM_ScanState != FM_SCAN_OFF) if (gFmRadioMode && gFM_ScanState != FM_SCAN_OFF)
return; return;
@@ -784,7 +788,7 @@ void APP_StartListening(FUNCTION_Type_t function)
return; return;
#endif #endif
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gFmRadioMode) if (gFmRadioMode)
BK1080_Init0(); BK1080_Init0();
#endif #endif
@@ -853,7 +857,7 @@ void APP_StartListening(FUNCTION_Type_t function)
RXTX_LOG_BeginRx(gRxVfo, function); RXTX_LOG_BeginRx(gRxVfo, function);
#endif #endif
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (function == FUNCTION_MONITOR || gFmRadioMode) if (function == FUNCTION_MONITOR || gFmRadioMode)
#else #else
if (function == FUNCTION_MONITOR) if (function == FUNCTION_MONITOR)
@@ -1159,7 +1163,7 @@ static void HandleVox(void)
gVoxPauseCountdown = 0; gVoxPauseCountdown = 0;
} }
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gFmRadioMode) if (gFmRadioMode)
return; return;
#endif #endif
@@ -1321,7 +1325,7 @@ void APP_Update(void)
if (gCurrentFunction != FUNCTION_TRANSMIT) if (gCurrentFunction != FUNCTION_TRANSMIT)
HandleFunction(); HandleFunction();
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
// if (gFmRadioCountdown_500ms > 0) // if (gFmRadioCountdown_500ms > 0)
if (gFmRadioMode && gFmRadioCountdown_500ms > 0) // 1of11 if (gFmRadioMode && gFmRadioCountdown_500ms > 0) // 1of11
return; return;
@@ -1366,7 +1370,7 @@ void APP_Update(void)
#ifdef ENABLE_VOICE #ifdef ENABLE_VOICE
&& gVoiceWriteIndex == 0 && gVoiceWriteIndex == 0
#endif #endif
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
&& !gFmRadioMode && !gFmRadioMode
#endif #endif
#ifdef ENABLE_DTMF_CALLING #ifdef ENABLE_DTMF_CALLING
@@ -1385,7 +1389,7 @@ void APP_Update(void)
gScheduleDualWatch = false; gScheduleDualWatch = false;
} }
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gScheduleFM && gFM_ScanState != FM_SCAN_OFF && !FUNCTION_IsRx()) { if (gScheduleFM && gFM_ScanState != FM_SCAN_OFF && !FUNCTION_IsRx()) {
// switch to FM radio mode // switch to FM radio mode
FM_Play(); FM_Play();
@@ -1405,7 +1409,7 @@ void APP_Update(void)
|| gScanStateDir != SCAN_OFF || gScanStateDir != SCAN_OFF
|| gCssBackgroundScan || gCssBackgroundScan
|| gScreenToDisplay != DISPLAY_MAIN || gScreenToDisplay != DISPLAY_MAIN
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
|| gFmRadioMode || gFmRadioMode
#endif #endif
#ifdef ENABLE_DTMF_CALLING #ifdef ENABLE_DTMF_CALLING
@@ -1760,7 +1764,7 @@ void APP_TimeSlice10ms(void)
// Skipping authentic device checks // Skipping authentic device checks
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gFmRadioMode && gFmRadioCountdown_500ms > 0) // 1of11 if (gFmRadioMode && gFmRadioCountdown_500ms > 0) // 1of11
return; return;
#endif #endif
@@ -1792,7 +1796,7 @@ void APP_TimeSlice10ms(void)
} }
} }
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gFmRadioMode && gFM_RestoreCountdown_10ms > 0) { if (gFmRadioMode && gFM_RestoreCountdown_10ms > 0) {
if (--gFM_RestoreCountdown_10ms == 0) { if (--gFM_RestoreCountdown_10ms == 0) {
FM_Start(); // switch back to FM radio mode FM_Start(); // switch back to FM radio mode
@@ -1880,7 +1884,7 @@ void APP_TimeSlice500ms(void)
{ {
if (IS_MR_CHANNEL(gTxVfo->CHANNEL_SAVE) && (gInputBoxIndex > 0 && gInputBoxIndex < 4) if (IS_MR_CHANNEL(gTxVfo->CHANNEL_SAVE) && (gInputBoxIndex > 0 && gInputBoxIndex < 4)
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
&& (!gFmRadioMode) && (!gFmRadioMode)
#endif #endif
) )
@@ -1927,7 +1931,7 @@ void APP_TimeSlice500ms(void)
// Skipped authentic device check // Skipped authentic device check
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gFmRadioCountdown_500ms > 0) if (gFmRadioCountdown_500ms > 0)
{ {
gFmRadioCountdown_500ms--; gFmRadioCountdown_500ms--;
@@ -2059,7 +2063,7 @@ void APP_TimeSlice500ms(void)
} }
if (!gCssBackgroundScan && gScanStateDir == SCAN_OFF && !SCANNER_IsScanning() if (!gCssBackgroundScan && gScanStateDir == SCAN_OFF && !SCANNER_IsScanning()
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
&& (gFM_ScanState == FM_SCAN_OFF || gAskToSave) && (gFM_ScanState == FM_SCAN_OFF || gAskToSave)
#endif #endif
#ifdef ENABLE_AIRCOPY #ifdef ENABLE_AIRCOPY
@@ -2114,7 +2118,7 @@ void APP_TimeSlice500ms(void)
GUI_DisplayType_t disp = DISPLAY_INVALID; GUI_DisplayType_t disp = DISPLAY_INVALID;
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gFmRadioMode && ! FUNCTION_IsRx()) { if (gFmRadioMode && ! FUNCTION_IsRx()) {
disp = DISPLAY_FM; disp = DISPLAY_FM;
} }
@@ -2136,7 +2140,7 @@ void APP_TimeSlice500ms(void)
if (!gPttIsPressed && gVFOStateResumeCountdown_500ms > 0 && --gVFOStateResumeCountdown_500ms == 0) { if (!gPttIsPressed && gVFOStateResumeCountdown_500ms > 0 && --gVFOStateResumeCountdown_500ms == 0) {
RADIO_SetVfoState(VFO_STATE_NORMAL); RADIO_SetVfoState(VFO_STATE_NORMAL);
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gFmRadioMode && !FUNCTION_IsRx()) { if (gFmRadioMode && !FUNCTION_IsRx()) {
// switch back to FM radio mode // switch back to FM radio mode
FM_Start(); FM_Start();
@@ -2289,7 +2293,7 @@ static void ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
flagSaveSettings = false; flagSaveSettings = false;
} }
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gFlagSaveFM) { if (gFlagSaveFM) {
SETTINGS_SaveFM(); SETTINGS_SaveFM();
gFlagSaveFM = false; gFlagSaveFM = false;
@@ -2583,7 +2587,7 @@ Skip:
gUpdateStatus = true; gUpdateStatus = true;
} }
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gRequestSaveFM) { if (gRequestSaveFM) {
gRequestSaveFM = false; gRequestSaveFM = false;
if (!bKeyHeld) if (!bKeyHeld)
+2 -2
View File
@@ -18,7 +18,7 @@
#include <stdio.h> // NULL #include <stdio.h> // NULL
#include "app/chFrScanner.h" #include "app/chFrScanner.h"
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
#include "app/fm.h" #include "app/fm.h"
#endif #endif
#include "app/scanner.h" #include "app/scanner.h"
@@ -279,7 +279,7 @@ void DTMF_HandleRequest(void)
gDTMF_ReplyState = DTMF_REPLY_AB; gDTMF_ReplyState = DTMF_REPLY_AB;
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gFmRadioMode) if (gFmRadioMode)
{ {
FM_TurnOff(); FM_TurnOff();
+3 -28
View File
@@ -33,6 +33,7 @@
#include "ui/ui.h" #include "ui/ui.h"
uint16_t gFM_Channels[FM_CHANNELS_MAX]; uint16_t gFM_Channels[FM_CHANNELS_MAX];
#ifdef ENABLE_FMRADIO_EMBEDDED
bool gFmRadioMode; bool gFmRadioMode;
uint8_t gFmRadioCountdown_500ms; uint8_t gFmRadioCountdown_500ms;
volatile uint16_t gFmPlayCountdown_10ms; volatile uint16_t gFmPlayCountdown_10ms;
@@ -52,7 +53,6 @@ const uint8_t BUTTON_EVENT_HELD = BUTTON_STATE_PRESSED | BUTTON_STATE_HELD;
const uint8_t BUTTON_EVENT_SHORT = 0; const uint8_t BUTTON_EVENT_SHORT = 0;
const uint8_t BUTTON_EVENT_LONG = BUTTON_STATE_HELD; const uint8_t BUTTON_EVENT_LONG = BUTTON_STATE_HELD;
#ifndef ENABLE_FEAT_F4HWN_OVERLAY_APPS
static void Key_FUNC(KEY_Code_t Key, uint8_t state); static void Key_FUNC(KEY_Code_t Key, uint8_t state);
#endif #endif
@@ -95,7 +95,7 @@ int FM_ConfigureChannelState(void)
return 0; return 0;
} }
#ifndef ENABLE_FEAT_F4HWN_OVERLAY_APPS #ifdef ENABLE_FMRADIO_EMBEDDED
void FM_SetFrequency(void) void FM_SetFrequency(void)
{ {
BK1080_SetFrequency(gEeprom.FM_FrequencyPlaying, gEeprom.FM_Band/*, gEeprom.FM_Space*/); BK1080_SetFrequency(gEeprom.FM_FrequencyPlaying, gEeprom.FM_Band/*, gEeprom.FM_Space*/);
@@ -243,7 +243,7 @@ int FM_CheckFrequencyLock(uint16_t Frequency, uint16_t LowerLimit)
return 0; return 0;
} }
#ifndef ENABLE_FEAT_F4HWN_OVERLAY_APPS #ifdef ENABLE_FMRADIO_EMBEDDED
static void Key_DIGITS(KEY_Code_t Key, uint8_t state) static void Key_DIGITS(KEY_Code_t Key, uint8_t state)
{ {
enum { STATE_FREQ_MODE, STATE_MR_MODE, STATE_SAVE }; enum { STATE_FREQ_MODE, STATE_MR_MODE, STATE_SAVE };
@@ -666,31 +666,6 @@ void FM_Start(void)
SETTINGS_WriteCurrentState(); SETTINGS_WriteCurrentState();
#endif #endif
} }
#else
/*
* Broadcast FM is sovereign in Overlay builds: its app owns tuning, scanning,
* audio and persistence through app_api. Keep only the shared channel/state
* loader and FM_CheckFrequencyLock above; these tiny compatibility entry points
* satisfy generic firmware paths which cannot become active because Overlay
* builds never set gFmRadioMode or gFM_ScanState.
*/
void FM_TurnOff(void) {}
void FM_EraseChannels(void) {}
void FM_Tune(uint16_t Frequency, int8_t Step, bool bFlag)
{
(void)Frequency;
(void)Step;
(void)bFlag;
}
void FM_PlayAndUpdate(void) {}
void FM_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
{
(void)Key;
(void)bKeyPressed;
(void)bKeyHeld;
}
void FM_Play(void) {}
void FM_Start(void) {}
#endif #endif
#endif #endif
+13 -8
View File
@@ -19,9 +19,12 @@
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO
#include "driver/keyboard.h"
#include "misc.h" #include "misc.h"
#ifdef ENABLE_FMRADIO_EMBEDDED
#include "driver/keyboard.h"
#endif
#define FM_CHANNEL_UP 0x01 #define FM_CHANNEL_UP 0x01
#define FM_CHANNEL_DOWN 0xFF #define FM_CHANNEL_DOWN 0xFF
@@ -30,32 +33,34 @@ enum {
}; };
extern uint16_t gFM_Channels[FM_CHANNELS_MAX]; extern uint16_t gFM_Channels[FM_CHANNELS_MAX];
bool FM_CheckValidChannel(uint8_t Channel);
// returns first valid channel starting at Channel
uint8_t FM_FindNextChannel(uint8_t Channel, uint8_t Direction);
int FM_ConfigureChannelState(void);
int FM_CheckFrequencyLock(uint16_t Frequency, uint16_t LowerLimit);
#ifdef ENABLE_FMRADIO_EMBEDDED
extern bool gFmRadioMode; extern bool gFmRadioMode;
extern uint8_t gFmRadioCountdown_500ms; extern uint8_t gFmRadioCountdown_500ms;
extern volatile uint16_t gFmPlayCountdown_10ms; extern volatile uint16_t gFmPlayCountdown_10ms;
extern volatile int8_t gFM_ScanState; extern volatile int8_t gFM_ScanState;
extern bool gFM_AutoScan; extern bool gFM_AutoScan;
extern uint8_t gFM_ChannelPosition; extern uint8_t gFM_ChannelPosition;
// Doubts about whether this should be signed or not
extern uint16_t gFM_FrequencyDeviation;
extern bool gFM_FoundFrequency; extern bool gFM_FoundFrequency;
extern uint16_t gFM_RestoreCountdown_10ms; extern uint16_t gFM_RestoreCountdown_10ms;
bool FM_CheckValidChannel(uint8_t Channel);
// returns first valid channel starting at Channel
uint8_t FM_FindNextChannel(uint8_t Channel, uint8_t Direction);
int FM_ConfigureChannelState(void);
void FM_TurnOff(void); void FM_TurnOff(void);
void FM_EraseChannels(void); void FM_EraseChannels(void);
void FM_Tune(uint16_t Frequency, int8_t Step, bool bFlag); void FM_Tune(uint16_t Frequency, int8_t Step, bool bFlag);
void FM_PlayAndUpdate(void); void FM_PlayAndUpdate(void);
int FM_CheckFrequencyLock(uint16_t Frequency, uint16_t LowerLimit);
void FM_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld); void FM_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld);
void FM_Play(void); void FM_Play(void);
void FM_Start(void); void FM_Start(void);
#endif
#endif #endif
+7 -7
View File
@@ -20,7 +20,7 @@
#include "app/chFrScanner.h" #include "app/chFrScanner.h"
#include "app/common.h" #include "app/common.h"
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
#include "app/fm.h" #include "app/fm.h"
#endif #endif
@@ -56,7 +56,7 @@ void GENERIC_Key_F(bool bKeyPressed, bool bKeyHeld)
COMMON_KeypadLockToggle(); COMMON_KeypadLockToggle();
} }
else { // released else { // released
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if ((gFmRadioMode || gScreenToDisplay != DISPLAY_MAIN) && gScreenToDisplay != DISPLAY_FM) if ((gFmRadioMode || gScreenToDisplay != DISPLAY_MAIN) && gScreenToDisplay != DISPLAY_FM)
return; return;
#else #else
@@ -77,7 +77,7 @@ void GENERIC_Key_F(bool bKeyPressed, bool bKeyHeld)
} }
} }
else { // short pressed else { // short pressed
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gScreenToDisplay != DISPLAY_FM) if (gScreenToDisplay != DISPLAY_FM)
#endif #endif
{ {
@@ -85,7 +85,7 @@ void GENERIC_Key_F(bool bKeyPressed, bool bKeyHeld)
return; return;
} }
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gFM_ScanState == FM_SCAN_OFF) { // not scanning if (gFM_ScanState == FM_SCAN_OFF) { // not scanning
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL; gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
return; return;
@@ -132,7 +132,7 @@ void GENERIC_Key_PTT(bool bKeyPressed)
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gFM_ScanState != FM_SCAN_OFF) { // FM radio is scanning .. stop if (gFM_ScanState != FM_SCAN_OFF) { // FM radio is scanning .. stop
FM_PlayAndUpdate(); FM_PlayAndUpdate();
#ifdef ENABLE_VOICE #ifdef ENABLE_VOICE
@@ -143,7 +143,7 @@ void GENERIC_Key_PTT(bool bKeyPressed)
} }
#endif #endif
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gScreenToDisplay == DISPLAY_FM) if (gScreenToDisplay == DISPLAY_FM)
goto start_tx; // listening to the FM radio .. start TX'ing goto start_tx; // listening to the FM radio .. start TX'ing
#endif #endif
@@ -200,7 +200,7 @@ cancel_tx:
done: done:
gPttDebounceCounter = 0; gPttDebounceCounter = 0;
if (gScreenToDisplay != DISPLAY_MENU if (gScreenToDisplay != DISPLAY_MENU
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
&& gRequestDisplayScreen != DISPLAY_FM && gRequestDisplayScreen != DISPLAY_FM
#endif #endif
) { ) {
+4 -4
View File
@@ -20,7 +20,7 @@
#include "app/app.h" #include "app/app.h"
#include "app/chFrScanner.h" #include "app/chFrScanner.h"
#include "app/common.h" #include "app/common.h"
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
#include "app/fm.h" #include "app/fm.h"
#endif #endif
#include "app/generic.h" #include "app/generic.h"
@@ -728,7 +728,7 @@ static void MAIN_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
} }
#endif #endif
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (!gFmRadioMode) if (!gFmRadioMode)
#endif #endif
{ {
@@ -763,7 +763,7 @@ static void MAIN_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
return; return;
} }
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
ACTION_FM(); ACTION_FM();
#endif #endif
return; return;
@@ -1064,7 +1064,7 @@ static void MAIN_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
void MAIN_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) void MAIN_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
{ {
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gFmRadioMode && Key != KEY_PTT && Key != KEY_EXIT) { if (gFmRadioMode && Key != KEY_PTT && Key != KEY_EXIT) {
if (!bKeyHeld && bKeyPressed) if (!bKeyHeld && bKeyPressed)
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL; gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
+5 -5
View File
@@ -20,7 +20,7 @@
#if !defined(ENABLE_OVERLAY) #if !defined(ENABLE_OVERLAY)
#include "py32f0xx.h" #include "py32f0xx.h"
#endif #endif
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
#include "app/fm.h" #include "app/fm.h"
#endif #endif
#include "app/uart.h" #include "app/uart.h"
@@ -360,7 +360,7 @@ static void CMD_0514(uint32_t Port, const uint8_t *pBuffer)
} }
#endif #endif
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
gFmRadioCountdown_500ms = fm_radio_countdown_500ms; gFmRadioCountdown_500ms = fm_radio_countdown_500ms;
#endif #endif
@@ -404,7 +404,7 @@ static void CMD_051B(uint32_t Port, const uint8_t *pBuffer)
gSerialConfigCountDown_500ms = 12; // 6 sec gSerialConfigCountDown_500ms = 12; // 6 sec
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
gFmRadioCountdown_500ms = fm_radio_countdown_500ms; gFmRadioCountdown_500ms = fm_radio_countdown_500ms;
#endif #endif
@@ -467,7 +467,7 @@ static void CMD_051D(uint32_t Port, const uint8_t *pBuffer)
bReloadEeprom = false; bReloadEeprom = false;
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
gFmRadioCountdown_500ms = fm_radio_countdown_500ms; gFmRadioCountdown_500ms = fm_radio_countdown_500ms;
#endif #endif
@@ -537,7 +537,7 @@ static void CMD_052D(uint32_t Port, const uint8_t *pBuffer)
REPLY_052D_t Reply; REPLY_052D_t Reply;
bool bIsLocked; bool bIsLocked;
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
gFmRadioCountdown_500ms = fm_radio_countdown_500ms; gFmRadioCountdown_500ms = fm_radio_countdown_500ms;
#endif #endif
Reply.Header.ID = 0x052E; Reply.Header.ID = 0x052E;
+8 -8
View File
@@ -15,11 +15,11 @@
* limitations under the License. * limitations under the License.
*/ */
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
#include "app/fm.h" #include "app/fm.h"
#endif #endif
#include "audio.h" #include "audio.h"
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
#include "driver/bk1080.h" #include "driver/bk1080.h"
#endif #endif
#include "driver/bk4819.h" #include "driver/bk4819.h"
@@ -70,7 +70,7 @@ void AUDIO_PlayBeep(BEEP_Type_t Beep)
if (Beep >= ARRAY_SIZE(BEEP_Classic_array)) if (Beep >= ARRAY_SIZE(BEEP_Classic_array))
return; return;
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gFmRadioMode) if (gFmRadioMode)
BK1080_Mute(true); BK1080_Mute(true);
#endif #endif
@@ -112,7 +112,7 @@ void AUDIO_PlayBeep(BEEP_Type_t Beep)
SYSTEM_DelayMs(5); SYSTEM_DelayMs(5);
BK4819_WriteRegister(BK4819_REG_71, ToneConfig); BK4819_WriteRegister(BK4819_REG_71, ToneConfig);
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
const bool isFmRadio = gFmRadioMode; const bool isFmRadio = gFmRadioMode;
if (isFmRadio) if (isFmRadio)
@@ -122,7 +122,7 @@ void AUDIO_PlayBeep(BEEP_Type_t Beep)
if (gEnableSpeaker) if (gEnableSpeaker)
AUDIO_AudioPathOn(); AUDIO_AudioPathOn();
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (isFmRadio) if (isFmRadio)
BK1080_Mute(false); BK1080_Mute(false);
#endif #endif
@@ -275,7 +275,7 @@ void AUDIO_PlaySingleVoice(bool bFlag)
if (FUNCTION_IsRx()) // 1of11 if (FUNCTION_IsRx()) // 1of11
BK4819_SetAF(BK4819_AF_MUTE); BK4819_SetAF(BK4819_AF_MUTE);
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gFmRadioMode) if (gFmRadioMode)
BK1080_Mute(true); BK1080_Mute(true);
#endif #endif
@@ -299,7 +299,7 @@ void AUDIO_PlaySingleVoice(bool bFlag)
if (FUNCTION_IsRx()) // 1of11 if (FUNCTION_IsRx()) // 1of11
RADIO_SetModulation(gRxVfo->Modulation); RADIO_SetModulation(gRxVfo->Modulation);
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gFmRadioMode) if (gFmRadioMode)
BK1080_Mute(false); BK1080_Mute(false);
#endif #endif
@@ -440,7 +440,7 @@ void AUDIO_PlayQueuedVoice(void)
RADIO_SetModulation(gRxVfo->Modulation); // 1of11 RADIO_SetModulation(gRxVfo->Modulation); // 1of11
} }
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gFmRadioMode) if (gFmRadioMode)
BK1080_Mute(false); BK1080_Mute(false);
#endif #endif
+5 -5
View File
@@ -17,13 +17,13 @@
#include <string.h> #include <string.h>
#include "app/dtmf.h" #include "app/dtmf.h"
#if defined(ENABLE_FMRADIO) #if defined(ENABLE_FMRADIO_EMBEDDED)
#include "app/fm.h" #include "app/fm.h"
#endif #endif
#include "audio.h" #include "audio.h"
#include "dcs.h" #include "dcs.h"
#include "driver/backlight.h" #include "driver/backlight.h"
#if defined(ENABLE_FMRADIO) #if defined(ENABLE_FMRADIO_EMBEDDED)
#include "driver/bk1080.h" #include "driver/bk1080.h"
#endif #endif
#include "driver/bk4819.h" #include "driver/bk4819.h"
@@ -103,7 +103,7 @@ void FUNCTION_Foreground(const FUNCTION_Type_t PreviousFunction)
return; return;
} }
#if defined(ENABLE_FMRADIO) #if defined(ENABLE_FMRADIO_EMBEDDED)
if (gFmRadioMode) if (gFmRadioMode)
gFM_RestoreCountdown_10ms = fm_restore_countdown_10ms; gFM_RestoreCountdown_10ms = fm_restore_countdown_10ms;
#endif #endif
@@ -156,7 +156,7 @@ void FUNCTION_Transmit()
gDTMF_RX_live_timeout = 0; gDTMF_RX_live_timeout = 0;
DTMF_clear_input_box_memory(); DTMF_clear_input_box_memory();
#if defined(ENABLE_FMRADIO) #if defined(ENABLE_FMRADIO_EMBEDDED)
if (gFmRadioMode) if (gFmRadioMode)
BK1080_Init0(); BK1080_Init0();
#endif #endif
@@ -284,7 +284,7 @@ void FUNCTION_Select(FUNCTION_Type_t Function)
gBatterySaveCountdown_10ms = battery_save_count_10ms; gBatterySaveCountdown_10ms = battery_save_count_10ms;
gSchedulePowerSave = false; gSchedulePowerSave = false;
#if defined(ENABLE_FMRADIO) #if defined(ENABLE_FMRADIO_EMBEDDED)
if(Function != FUNCTION_INCOMING) if(Function != FUNCTION_INCOMING)
gFM_RestoreCountdown_10ms = 0; gFM_RestoreCountdown_10ms = 0;
#endif #endif
+3 -3
View File
@@ -251,7 +251,7 @@ bool gFlagResetVfos;
bool gRequestSaveVFO; bool gRequestSaveVFO;
uint16_t gRequestSaveChannel; uint16_t gRequestSaveChannel;
bool gRequestSaveSettings; bool gRequestSaveSettings;
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
bool gRequestSaveFM; bool gRequestSaveFM;
#endif #endif
bool gFlagPrepareTX; bool gFlagPrepareTX;
@@ -259,7 +259,7 @@ bool gFlagPrepareTX;
bool gFlagAcceptSetting; bool gFlagAcceptSetting;
bool gFlagRefreshSetting; bool gFlagRefreshSetting;
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
bool gFlagSaveFM; bool gFlagSaveFM;
#endif #endif
bool g_CDCSS_Lost; bool g_CDCSS_Lost;
@@ -312,7 +312,7 @@ volatile bool gNextTimeslice40ms;
volatile bool gScheduleNOAA = true; volatile bool gScheduleNOAA = true;
#endif #endif
volatile bool gFlagTailNoteEliminationComplete; volatile bool gFlagTailNoteEliminationComplete;
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
volatile bool gScheduleFM; volatile bool gScheduleFM;
#endif #endif
+4 -4
View File
@@ -389,7 +389,7 @@ extern bool gFlagResetVfos;
extern bool gRequestSaveVFO; extern bool gRequestSaveVFO;
extern uint16_t gRequestSaveChannel; extern uint16_t gRequestSaveChannel;
extern bool gRequestSaveSettings; extern bool gRequestSaveSettings;
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
extern bool gRequestSaveFM; extern bool gRequestSaveFM;
#endif #endif
extern uint8_t gKeypadLocked; extern uint8_t gKeypadLocked;
@@ -398,7 +398,7 @@ extern bool gFlagPrepareTX;
extern bool gFlagAcceptSetting; // accept menu setting extern bool gFlagAcceptSetting; // accept menu setting
extern bool gFlagRefreshSetting; // refresh menu display extern bool gFlagRefreshSetting; // refresh menu display
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
extern bool gFlagSaveFM; extern bool gFlagSaveFM;
#endif #endif
extern bool g_CDCSS_Lost; extern bool g_CDCSS_Lost;
@@ -437,7 +437,7 @@ extern uint8_t gFSKWriteIndex;
extern volatile bool gNextTimeslice; extern volatile bool gNextTimeslice;
extern bool gUpdateDisplay; extern bool gUpdateDisplay;
extern bool gF_LOCK; extern bool gF_LOCK;
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
extern uint8_t gFM_ChannelPosition; extern uint8_t gFM_ChannelPosition;
#endif #endif
extern uint8_t gShowChPrefix; extern uint8_t gShowChPrefix;
@@ -453,7 +453,7 @@ extern volatile bool gNextTimeslice40ms;
#endif #endif
extern volatile bool gFlagTailNoteEliminationComplete; extern volatile bool gFlagTailNoteEliminationComplete;
extern volatile uint8_t gVFOStateResumeCountdown_500ms; extern volatile uint8_t gVFOStateResumeCountdown_500ms;
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
extern volatile bool gScheduleFM; extern volatile bool gScheduleFM;
#endif #endif
extern uint8_t gIsLocked; extern uint8_t gIsLocked;
+2 -2
View File
@@ -21,7 +21,7 @@
#ifdef ENABLE_FEAT_F4HWN_RXTX_LOG #ifdef ENABLE_FEAT_F4HWN_RXTX_LOG
#include "app/rxtx_log.h" #include "app/rxtx_log.h"
#endif #endif
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
#include "app/fm.h" #include "app/fm.h"
#endif #endif
#include "audio.h" #include "audio.h"
@@ -887,7 +887,7 @@ void RADIO_SetupRegisters(bool switchToForeground)
#ifdef ENABLE_NOAA #ifdef ENABLE_NOAA
&& !IS_NOAA_CHANNEL(gCurrentVfo->CHANNEL_SAVE) && !IS_NOAA_CHANNEL(gCurrentVfo->CHANNEL_SAVE)
#endif #endif
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
&& !gFmRadioMode && !gFmRadioMode
#endif #endif
){ ){
+2 -2
View File
@@ -16,7 +16,7 @@
#include "scheduler.h" #include "scheduler.h"
#include "app/chFrScanner.h" #include "app/chFrScanner.h"
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
#include "app/fm.h" #include "app/fm.h"
#endif #endif
#include "app/scanner.h" #include "app/scanner.h"
@@ -136,7 +136,7 @@ void SysTick_Handler(void)
DECREMENT_AND_TRIGGER(gCountdownToPlayNextVoice_10ms, gFlagPlayQueuedVoice); DECREMENT_AND_TRIGGER(gCountdownToPlayNextVoice_10ms, gFlagPlayQueuedVoice);
#endif #endif
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
if (gFM_ScanState != FM_SCAN_OFF && gCurrentFunction != FUNCTION_MONITOR) if (gFM_ScanState != FM_SCAN_OFF && gCurrentFunction != FUNCTION_MONITOR)
if (gCurrentFunction != FUNCTION_TRANSMIT && gCurrentFunction != FUNCTION_RECEIVE) if (gCurrentFunction != FUNCTION_TRANSMIT && gCurrentFunction != FUNCTION_RECEIVE)
DECREMENT_AND_TRIGGER(gFmPlayCountdown_10ms, gScheduleFM); DECREMENT_AND_TRIGGER(gFmPlayCountdown_10ms, gScheduleFM);
+1 -1
View File
@@ -21,7 +21,7 @@
#ifdef ENABLE_FEAT_F4HWN_RXTX_LOG #ifdef ENABLE_FEAT_F4HWN_RXTX_LOG
#include "app/rxtx_log.h" #include "app/rxtx_log.h"
#endif #endif
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
#include "app/fm.h" #include "app/fm.h"
#endif #endif
#include "app/scanner.h" #include "app/scanner.h"
+4 -4
View File
@@ -19,7 +19,7 @@
#include "app/chFrScanner.h" #include "app/chFrScanner.h"
#include "app/dtmf.h" #include "app/dtmf.h"
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
#include "app/fm.h" #include "app/fm.h"
#endif #endif
#include "driver/keyboard.h" #include "driver/keyboard.h"
@@ -27,7 +27,7 @@
#ifdef ENABLE_AIRCOPY #ifdef ENABLE_AIRCOPY
#include "ui/aircopy.h" #include "ui/aircopy.h"
#endif #endif
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
#include "ui/fmradio.h" #include "ui/fmradio.h"
#endif #endif
#ifdef ENABLE_FEAT_F4HWN_RXTX_LOG #ifdef ENABLE_FEAT_F4HWN_RXTX_LOG
@@ -53,7 +53,7 @@ void (*const UI_DisplayFunctions[])(void) = {
[DISPLAY_MENU] = &UI_DisplayMenu, [DISPLAY_MENU] = &UI_DisplayMenu,
[DISPLAY_SCANNER] = &UI_DisplayScanner, [DISPLAY_SCANNER] = &UI_DisplayScanner,
#if defined(ENABLE_FMRADIO) && !defined(ENABLE_FEAT_F4HWN_OVERLAY_APPS) #ifdef ENABLE_FMRADIO_EMBEDDED
[DISPLAY_FM] = &UI_DisplayFM, [DISPLAY_FM] = &UI_DisplayFM,
#elif defined(ENABLE_FMRADIO) #elif defined(ENABLE_FMRADIO)
/* The FM overlay app replaces the resident FM screen (ui/fmradio.c is not /* The FM overlay app replaces the resident FM screen (ui/fmradio.c is not
@@ -94,7 +94,7 @@ void GUI_SelectNextDisplay(GUI_DisplayType_t Display)
gIsInSubMenu = false; gIsInSubMenu = false;
gCssBackgroundScan = false; gCssBackgroundScan = false;
gScanStateDir = SCAN_OFF; gScanStateDir = SCAN_OFF;
#ifdef ENABLE_FMRADIO #ifdef ENABLE_FMRADIO_EMBEDDED
gFM_ScanState = FM_SCAN_OFF; gFM_ScanState = FM_SCAN_OFF;
#endif #endif
gAskForConfirmation = 0; gAskForConfirmation = 0;