Renamed remaining BK4819 GPIOs.

This commit is contained in:
Dual Tachyon 2023-10-17 18:38:27 +01:00
parent 0908821dc2
commit 41f1e84766
6 changed files with 19 additions and 19 deletions

View File

@ -51,7 +51,7 @@ void AIRCOPY_SendMessage(void)
RADIO_SetTxParameters();
BK4819_SendFSKData(g_FSK_Buffer);
BK4819_SetupPowerAmplifier(0, 0);
BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29, false);
BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29_PA_ENABLE, false);
gAircopySendCountdown = 30;
}

View File

@ -777,7 +777,7 @@ void APP_Update(void)
gRxIdleMode = true;
BK4819_DisableVox();
BK4819_Sleep();
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28, false);
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28_RX_ENABLE, false);
// Authentic device checked removed
} else {
DUALWATCH_Alternate();
@ -930,7 +930,7 @@ void APP_TimeSlice10ms(void)
gAlarmState = ALARM_STATE_ALARM;
RADIO_EnableCxCSS();
BK4819_SetupPowerAmplifier(0, 0);
BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29, false);
BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29_PA_ENABLE, false);
BK4819_Enable_AfDac_DiscMode_TxDsp();
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1_RED, false);
GUI_DisplayScreen();

View File

@ -95,10 +95,10 @@ enum BK4819_REGISTER_t {
typedef enum BK4819_REGISTER_t BK4819_REGISTER_t;
enum BK4819_GPIO_PIN_t {
BK4819_GPIO0_PIN28 = 0,
BK4819_GPIO1_PIN29 = 1,
BK4819_GPIO3_PIN31 = 3,
BK4819_GPIO4_PIN32 = 4,
BK4819_GPIO0_PIN28_RX_ENABLE = 0,
BK4819_GPIO1_PIN29_PA_ENABLE = 1,
BK4819_GPIO3_PIN31_UHF_LNA = 3,
BK4819_GPIO4_PIN32_VHF_LNA = 4,
BK4819_GPIO5_PIN1_RED = 5,
BK4819_GPIO6_PIN2_GREEN = 6,
};

View File

@ -377,14 +377,14 @@ void BK4819_RX_TurnOn(void)
void BK4819_SelectFilter(uint32_t Frequency)
{
if (Frequency < 28000000) {
BK4819_ToggleGpioOut(BK4819_GPIO4_PIN32, true);
BK4819_ToggleGpioOut(BK4819_GPIO3_PIN31, false);
BK4819_ToggleGpioOut(BK4819_GPIO4_PIN32_VHF_LNA, true);
BK4819_ToggleGpioOut(BK4819_GPIO3_PIN31_UHF_LNA, false);
} else if (Frequency == 0xFFFFFFFF) {
BK4819_ToggleGpioOut(BK4819_GPIO4_PIN32, false);
BK4819_ToggleGpioOut(BK4819_GPIO3_PIN31, false);
BK4819_ToggleGpioOut(BK4819_GPIO4_PIN32_VHF_LNA, false);
BK4819_ToggleGpioOut(BK4819_GPIO3_PIN31_UHF_LNA, false);
} else {
BK4819_ToggleGpioOut(BK4819_GPIO4_PIN32, false);
BK4819_ToggleGpioOut(BK4819_GPIO3_PIN31, true);
BK4819_ToggleGpioOut(BK4819_GPIO4_PIN32_VHF_LNA, false);
BK4819_ToggleGpioOut(BK4819_GPIO3_PIN31_UHF_LNA, true);
}
}
@ -545,7 +545,7 @@ void BK4819_ExitSubAu(void)
void BK4819_Conditional_RX_TurnOn_and_GPIO6_Enable(void)
{
if (gRxIdleMode) {
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28, true);
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28_RX_ENABLE, true);
BK4819_RX_TurnOn();
}
}

View File

@ -117,7 +117,7 @@ void FUNCTION_Select(FUNCTION_Type_t Function)
gRxIdleMode = true;
BK4819_DisableVox();
BK4819_Sleep();
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28, false);
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28_RX_ENABLE, false);
gBatterySaveCountdownExpired = false;
gUpdateStatus = true;
GUI_SelectNextDisplay(DISPLAY_MAIN);

View File

@ -495,7 +495,7 @@ void RADIO_SetupRegisters(bool bSwitchToFunction0)
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1_RED, false);
BK4819_SetupPowerAmplifier(0, 0);
BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29, false);
BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29_PA_ENABLE, false);
while (1) {
Status = BK4819_ReadRegister(BK4819_REG_0C);
@ -522,7 +522,7 @@ void RADIO_SetupRegisters(bool bSwitchToFunction0)
gRxVfo->SquelchOpenNoise, gRxVfo->SquelchCloseNoise,
gRxVfo->SquelchCloseGlitch, gRxVfo->SquelchOpenGlitch);
BK4819_SelectFilter(Frequency);
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28, true);
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28_RX_ENABLE, true);
BK4819_WriteRegister(BK4819_REG_48, 0xB3A8);
InterruptMask = 0
@ -663,7 +663,7 @@ void RADIO_SetTxParameters(void)
gEnableSpeaker = false;
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28, false);
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28_RX_ENABLE, false);
Bandwidth = gCurrentVfo->CHANNEL_BANDWIDTH;
if (Bandwidth != BK4819_FILTER_BW_WIDE) {
Bandwidth = BK4819_FILTER_BW_NARROW;
@ -674,7 +674,7 @@ void RADIO_SetTxParameters(void)
SYSTEM_DelayMs(10);
BK4819_SelectFilter(gCurrentVfo->pTX->Frequency);
BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29, true);
BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29_PA_ENABLE, true);
SYSTEM_DelayMs(5);
BK4819_SetupPowerAmplifier(gCurrentVfo->TXP_CalculatedSetting, gCurrentVfo->pTX->Frequency);