mirror of
https://github.com/silenty4ng/uv-k5-firmware-chinese-lts
synced 2025-01-15 14:54:40 +00:00
MDC RX
This commit is contained in:
parent
3db141428c
commit
ee072c8e5c
5 changed files with 44 additions and 22 deletions
|
@ -20,7 +20,13 @@
|
|||
</configurations>
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="cea36e80-e289-4d69-9030-7186d540ac0e" name="更改" comment="MDC RX" />
|
||||
<list default="true" id="cea36e80-e289-4d69-9030-7186d540ac0e" name="更改" comment="MDC RX">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/main.c" beforeDir="false" afterPath="$PROJECT_DIR$/main.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/misc.c" beforeDir="false" afterPath="$PROJECT_DIR$/misc.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/misc.h" beforeDir="false" afterPath="$PROJECT_DIR$/misc.h" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/radio.c" beforeDir="false" afterPath="$PROJECT_DIR$/radio.c" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
|
@ -126,7 +132,7 @@
|
|||
<workItem from="1701413653518" duration="3544000" />
|
||||
<workItem from="1701430185864" duration="10115000" />
|
||||
<workItem from="1701559895523" duration="22519000" />
|
||||
<workItem from="1701678199532" duration="355000" />
|
||||
<workItem from="1701678199532" duration="2557000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="bug fix">
|
||||
<created>1701136012311</created>
|
||||
|
@ -324,7 +330,21 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1701678519893</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="29" />
|
||||
<task id="LOCAL-00029" summary="MDC RX">
|
||||
<created>1701678580088</created>
|
||||
<option name="number" value="00029" />
|
||||
<option name="presentableId" value="LOCAL-00029" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1701678580088</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00030" summary="MDC RX">
|
||||
<created>1701678635953</created>
|
||||
<option name="number" value="00030" />
|
||||
<option name="presentableId" value="LOCAL-00030" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1701678635953</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="31" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
|
|
32
main.c
32
main.c
|
@ -49,7 +49,7 @@ void _putchar(char c)
|
|||
|
||||
void Main(void)
|
||||
{
|
||||
BOOT_Mode_t BootMode;
|
||||
//BOOT_Mode_t BootMode;
|
||||
|
||||
// Enable clock gating of blocks we need
|
||||
SYSCON_DEV_CLK_GATE = 0
|
||||
|
@ -86,7 +86,9 @@ void Main(void)
|
|||
SETTINGS_InitEEPROM();
|
||||
|
||||
SETTINGS_LoadCalibration();
|
||||
|
||||
#ifdef ENABLE_MDC1200
|
||||
MDC1200_init();
|
||||
#endif
|
||||
RADIO_ConfigureChannel(0, VFO_CONFIGURE_RELOAD);
|
||||
RADIO_ConfigureChannel(1, VFO_CONFIGURE_RELOAD);
|
||||
|
||||
|
@ -98,27 +100,23 @@ void Main(void)
|
|||
BOARD_ADC_GetBatteryInfo(&gBatteryVoltages[i], &gBatteryCurrent);
|
||||
|
||||
BATTERY_GetReadings(false);
|
||||
#ifdef ENABLE_MDC1200
|
||||
MDC1200_init();
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_AM_FIX
|
||||
AM_fix_init();
|
||||
#endif
|
||||
|
||||
BootMode = BOOT_GetMode();
|
||||
//BootMode = BOOT_GetMode();
|
||||
|
||||
// if (BootMode == BOOT_MODE_F_LOCK)
|
||||
gMenuListCount = 48;
|
||||
|
||||
if (BootMode == BOOT_MODE_F_LOCK)
|
||||
{
|
||||
gF_LOCK = true; // flag to say include the hidden menu items
|
||||
gMenuListCount = 49;
|
||||
}else gMenuListCount=41;
|
||||
|
||||
// wait for user to release all butts before moving on
|
||||
if (/*!GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT) ||*/
|
||||
KEYBOARD_Poll() != KEY_INVALID ||
|
||||
BootMode != BOOT_MODE_NORMAL)
|
||||
{ // keys are pressed
|
||||
UI_DisplayReleaseKeys(BootMode);
|
||||
// if (/*!GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT) ||*/
|
||||
// KEYBOARD_Poll() != KEY_INVALID ||
|
||||
// BootMode != BOOT_MODE_NORMAL)
|
||||
// { // keys are pressed
|
||||
// UI_DisplayReleaseKeys(BootMode);
|
||||
BACKLIGHT_TurnOn();
|
||||
while (KEYBOARD_Poll() != KEY_INVALID) // 500ms
|
||||
{
|
||||
|
@ -126,7 +124,7 @@ void Main(void)
|
|||
gKeyReading0 = KEY_INVALID;
|
||||
gKeyReading1 = KEY_INVALID;
|
||||
gDebounceCounter = 0;
|
||||
}
|
||||
// }
|
||||
//close PS
|
||||
// if (!gChargingWithTypeC && gBatteryDisplayLevel == 0)
|
||||
// {
|
||||
|
|
1
misc.c
1
misc.c
|
@ -226,7 +226,6 @@ bool gIsNoaaMode;
|
|||
|
||||
bool gUpdateDisplay;
|
||||
|
||||
bool gF_LOCK = false;
|
||||
|
||||
uint8_t gShowChPrefix;
|
||||
|
||||
|
|
1
misc.h
1
misc.h
|
@ -310,7 +310,6 @@ extern bool gIsNoaaMode;
|
|||
#endif
|
||||
extern volatile bool gNextTimeslice;
|
||||
extern bool gUpdateDisplay;
|
||||
extern bool gF_LOCK;
|
||||
#ifdef ENABLE_FMRADIO
|
||||
extern uint8_t gFM_ChannelPosition;
|
||||
#endif
|
||||
|
|
6
radio.c
6
radio.c
|
@ -780,6 +780,12 @@ void RADIO_SetupRegisters(bool switchToForeground)
|
|||
BK4819_DisableDTMF();
|
||||
BK4819_EnableDTMF();
|
||||
InterruptMask |= BK4819_REG_3F_DTMF_5TONE_FOUND;
|
||||
|
||||
#ifdef ENABLE_MDC1200
|
||||
BK4819_enable_mdc1200_rx(true);
|
||||
InterruptMask |= BK4819_REG_3F_FSK_RX_SYNC | BK4819_REG_3F_FSK_RX_FINISHED | BK4819_REG_3F_FSK_FIFO_ALMOST_FULL;
|
||||
#endif
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue