Apply my changes v1
Some checks failed
Build Firmware / build (push) Failing after 3m21s

This commit is contained in:
2025-02-27 16:49:04 +01:00
parent ba5257f2f6
commit f4ff2e6048
37 changed files with 3890 additions and 4607 deletions

View File

@@ -68,12 +68,6 @@ void BACKLIGHT_InitHardware()
static void BACKLIGHT_Sound(void)
{
if (gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_SOUND || gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_ALL)
{
AUDIO_PlayBeep(BEEP_880HZ_60MS_DOUBLE_BEEP);
AUDIO_PlayBeep(BEEP_880HZ_60MS_DOUBLE_BEEP);
}
gK5startup = false;
}

View File

@@ -74,6 +74,7 @@ enum BK4819_REGISTER_t {
BK4819_REG_3D = 0x3DU,
BK4819_REG_3E = 0x3EU,
BK4819_REG_3F = 0x3FU,
BK4819_REG_40 = 0x40U,
BK4819_REG_43 = 0x43U,
BK4819_REG_46 = 0x46U,
BK4819_REG_47 = 0x47U,
@@ -96,6 +97,7 @@ enum BK4819_REGISTER_t {
BK4819_REG_5A = 0x5AU,
BK4819_REG_5B = 0x5BU,
BK4819_REG_5C = 0x5CU,
BK4819_REG_5E = 0x5EU,
BK4819_REG_5D = 0x5DU,
BK4819_REG_5F = 0x5FU,
BK4819_REG_63 = 0x63U,

View File

@@ -48,6 +48,21 @@ __inline uint16_t scale_freq(const uint16_t freq)
return (((uint32_t)freq * 1353245u) + (1u << 16)) >> 17; // with rounding
}
void BK4819_FskEnableTx(void){
const uint16_t fsk_reg59 = BK4819_ReadRegister(BK4819_REG_59);
BK4819_WriteRegister(BK4819_REG_59, (1u << 11) | fsk_reg59);
}
void BK4819_FskClearFifo(void){
const uint16_t fsk_reg59 = BK4819_ReadRegister(BK4819_REG_59);
BK4819_WriteRegister(BK4819_REG_59, (1u << 15) | (1u << 14) | fsk_reg59);
}
void BK4819_FskEnableRx(void){
const uint16_t fsk_reg59 = BK4819_ReadRegister(BK4819_REG_59);
BK4819_WriteRegister(BK4819_REG_59, (1u << 12) | fsk_reg59);
}
void BK4819_Init(void)
{
GPIO_SetBit(&GPIOC->DATA, GPIOC_PIN_BK4819_SCN);

View File

@@ -77,6 +77,11 @@ void BK4819_InitAGC(bool amModulation);
void BK4819_ToggleGpioOut(BK4819_GPIO_PIN_t Pin, bool bSet);
void BK4819_ResetFSK(void);
void BK4819_FskClearFifo(void);
void BK4819_FskEnableRx(void);
void BK4819_FskEnableTx(void);
void BK4819_SetCDCSSCodeWord(uint32_t CodeWord);
void BK4819_SetCTCSSFrequency(uint32_t BaudRate);
void BK4819_SetTailDetection(const uint32_t freq_10Hz);

View File

@@ -26,6 +26,8 @@ KEY_Code_t gKeyReading0 = KEY_INVALID;
KEY_Code_t gKeyReading1 = KEY_INVALID;
uint16_t gDebounceCounter = 0;
bool gWasFKeyPressed = false;
uint8_t prevLetter = 0;
KEY_Code_t prevKey = KEY_INVALID;
static const struct {

View File

@@ -47,8 +47,10 @@ typedef enum KEY_Code_e KEY_Code_t;
extern KEY_Code_t gKeyReading0;
extern KEY_Code_t gKeyReading1;
extern uint16_t gDebounceCounter;
extern bool gWasFKeyPressed;
extern uint16_t gDebounceCounter;
extern bool gWasFKeyPressed;
extern uint8_t prevLetter;
extern KEY_Code_t prevKey;
KEY_Code_t KEYBOARD_Poll(void);