mirror of
https://github.com/egzumer/uv-k5-firmware-custom
synced 2024-11-21 17:19:57 +00:00
Various updates
This commit is contained in:
parent
e43dfb3f6b
commit
1ea5470254
24
app/action.c
24
app/action.c
@ -224,8 +224,8 @@ void ACTION_FM(void)
|
||||
|
||||
void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
{
|
||||
uint8_t Short;
|
||||
uint8_t Long;
|
||||
uint8_t Short = ACTION_OPT_NONE;
|
||||
uint8_t Long = ACTION_OPT_NONE;
|
||||
|
||||
if (gScreenToDisplay == DISPLAY_MAIN && gDTMF_InputMode)
|
||||
{
|
||||
@ -260,6 +260,7 @@ void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
Long = gEeprom.KEY_1_LONG_PRESS_ACTION;
|
||||
}
|
||||
else
|
||||
if (Key == KEY_SIDE2)
|
||||
{
|
||||
Short = gEeprom.KEY_2_SHORT_PRESS_ACTION;
|
||||
Long = gEeprom.KEY_2_LONG_PRESS_ACTION;
|
||||
@ -277,36 +278,39 @@ void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
return;
|
||||
|
||||
Short = Long;
|
||||
|
||||
if (!bKeyPressed)
|
||||
return;
|
||||
}
|
||||
|
||||
switch (Short)
|
||||
{
|
||||
case 1:
|
||||
default:
|
||||
break;
|
||||
case ACTION_OPT_FLASHLIGHT:
|
||||
ACTION_FlashLight();
|
||||
break;
|
||||
case 2:
|
||||
case ACTION_OPT_POWER:
|
||||
ACTION_Power();
|
||||
break;
|
||||
case 3:
|
||||
case ACTION_OPT_MONITOR:
|
||||
ACTION_Monitor();
|
||||
break;
|
||||
case 4:
|
||||
case ACTION_OPT_SCAN:
|
||||
ACTION_Scan(true);
|
||||
break;
|
||||
case 5:
|
||||
case ACTION_OPT_VOX:
|
||||
ACTION_Vox();
|
||||
break;
|
||||
case 6:
|
||||
case ACTION_OPT_ALARM:
|
||||
#ifndef DISABLE_ALARM
|
||||
ACTION_AlarmOr1750(false);
|
||||
#endif
|
||||
break;
|
||||
case 7:
|
||||
case ACTION_OPT_FM:
|
||||
ACTION_FM();
|
||||
break;
|
||||
case 8:
|
||||
case ACTION_OPT_1750:
|
||||
#ifndef DISABLE_ALARM
|
||||
ACTION_AlarmOr1750(true);
|
||||
#endif
|
||||
|
@ -246,6 +246,7 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
|
||||
break;
|
||||
}
|
||||
|
||||
Channel = RADIO_FindNextChannel(gEeprom.MrChannel[gEeprom.TX_CHANNEL], 1, false, 0);
|
||||
if (Channel != 0xFF)
|
||||
{
|
||||
@ -260,6 +261,7 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
break;
|
||||
|
||||
@ -277,7 +279,9 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
// TODO: something wrong here !!
|
||||
#ifndef DISABLE_NOAA
|
||||
if (IS_NOT_NOAA_CHANNEL(gTxVfo->CHANNEL_SAVE))
|
||||
{
|
||||
gEeprom.ScreenChannel[Vfo] = gEeprom.NoaaChannel[gEeprom.TX_CHANNEL];
|
||||
}
|
||||
else
|
||||
{
|
||||
gEeprom.ScreenChannel[Vfo] = gEeprom.FreqChannel[gEeprom.TX_CHANNEL];
|
||||
|
176
board.c
176
board.c
@ -44,8 +44,10 @@ void BOARD_FLASH_Init(void)
|
||||
FLASH_Init(FLASH_READ_MODE_1_CYCLE);
|
||||
FLASH_ConfigureTrimValues();
|
||||
SYSTEM_ConfigureClocks();
|
||||
overlay_FLASH_MainClock = 48000000;
|
||||
|
||||
overlay_FLASH_MainClock = 48000000;
|
||||
overlay_FLASH_ClockMultiplier = 48;
|
||||
|
||||
FLASH_Init(FLASH_READ_MODE_2_CYCLE);
|
||||
}
|
||||
|
||||
@ -55,30 +57,24 @@ void BOARD_GPIO_Init(void)
|
||||
| GPIO_DIR_10_BITS_OUTPUT
|
||||
| GPIO_DIR_11_BITS_OUTPUT
|
||||
| GPIO_DIR_12_BITS_OUTPUT
|
||||
| GPIO_DIR_13_BITS_OUTPUT
|
||||
;
|
||||
| GPIO_DIR_13_BITS_OUTPUT;
|
||||
GPIOA->DIR &= ~(0
|
||||
| GPIO_DIR_3_MASK
|
||||
| GPIO_DIR_4_MASK
|
||||
| GPIO_DIR_5_MASK
|
||||
| GPIO_DIR_6_MASK
|
||||
);
|
||||
| GPIO_DIR_6_MASK);
|
||||
GPIOB->DIR |= 0
|
||||
| GPIO_DIR_6_BITS_OUTPUT
|
||||
| GPIO_DIR_9_BITS_OUTPUT
|
||||
| GPIO_DIR_11_BITS_OUTPUT
|
||||
| GPIO_DIR_15_BITS_OUTPUT
|
||||
;
|
||||
| GPIO_DIR_15_BITS_OUTPUT;
|
||||
GPIOC->DIR |= 0
|
||||
| GPIO_DIR_0_BITS_OUTPUT
|
||||
| GPIO_DIR_1_BITS_OUTPUT
|
||||
| GPIO_DIR_2_BITS_OUTPUT
|
||||
| GPIO_DIR_3_BITS_OUTPUT
|
||||
| GPIO_DIR_4_BITS_OUTPUT
|
||||
;
|
||||
GPIOC->DIR &= ~(0
|
||||
| GPIO_DIR_5_MASK
|
||||
);
|
||||
| GPIO_DIR_4_BITS_OUTPUT;
|
||||
GPIOC->DIR &= ~(GPIO_DIR_5_MASK);
|
||||
|
||||
GPIO_SetBit(&GPIOB->DATA, GPIOB_PIN_BK1080);
|
||||
}
|
||||
@ -93,27 +89,23 @@ void BOARD_PORTCON_Init(void)
|
||||
| PORTCON_PORTA_SEL0_A0_MASK
|
||||
| PORTCON_PORTA_SEL0_A1_MASK
|
||||
| PORTCON_PORTA_SEL0_A2_MASK
|
||||
| PORTCON_PORTA_SEL0_A7_MASK
|
||||
;
|
||||
| PORTCON_PORTA_SEL0_A7_MASK;
|
||||
PORTCON_PORTA_SEL0 |= 0
|
||||
| PORTCON_PORTA_SEL0_A0_BITS_GPIOA0
|
||||
| PORTCON_PORTA_SEL0_A1_BITS_GPIOA1
|
||||
| PORTCON_PORTA_SEL0_A2_BITS_GPIOA2
|
||||
| PORTCON_PORTA_SEL0_A7_BITS_UART1_TX
|
||||
;
|
||||
| PORTCON_PORTA_SEL0_A7_BITS_UART1_TX;
|
||||
|
||||
PORTCON_PORTA_SEL1 &= 0
|
||||
| PORTCON_PORTA_SEL1_A8_MASK
|
||||
| PORTCON_PORTA_SEL1_A9_MASK
|
||||
| PORTCON_PORTA_SEL1_A14_MASK
|
||||
| PORTCON_PORTA_SEL1_A15_MASK
|
||||
;
|
||||
| PORTCON_PORTA_SEL1_A15_MASK;
|
||||
PORTCON_PORTA_SEL1 |= 0
|
||||
| PORTCON_PORTA_SEL1_A8_BITS_UART1_RX
|
||||
| PORTCON_PORTA_SEL1_A9_BITS_SARADC_CH4
|
||||
| PORTCON_PORTA_SEL1_A14_BITS_SARADC_CH9
|
||||
| PORTCON_PORTA_SEL1_A15_BITS_GPIOA15
|
||||
;
|
||||
| PORTCON_PORTA_SEL1_A15_BITS_GPIOA15;
|
||||
|
||||
// PORT B pin selection
|
||||
|
||||
@ -123,8 +115,7 @@ void BOARD_PORTCON_Init(void)
|
||||
| PORTCON_PORTB_SEL0_B2_MASK
|
||||
| PORTCON_PORTB_SEL0_B3_MASK
|
||||
| PORTCON_PORTB_SEL0_B4_MASK
|
||||
| PORTCON_PORTB_SEL0_B5_MASK
|
||||
;
|
||||
| PORTCON_PORTB_SEL0_B5_MASK;
|
||||
PORTCON_PORTB_SEL0 |= 0
|
||||
| PORTCON_PORTB_SEL0_B0_BITS_GPIOB0
|
||||
| PORTCON_PORTB_SEL0_B1_BITS_GPIOB1
|
||||
@ -132,30 +123,26 @@ void BOARD_PORTCON_Init(void)
|
||||
| PORTCON_PORTB_SEL0_B3_BITS_GPIOB3
|
||||
| PORTCON_PORTB_SEL0_B4_BITS_GPIOB4
|
||||
| PORTCON_PORTB_SEL0_B5_BITS_GPIOB5
|
||||
| PORTCON_PORTB_SEL0_B7_BITS_SPI0_SSN
|
||||
;
|
||||
| PORTCON_PORTB_SEL0_B7_BITS_SPI0_SSN;
|
||||
|
||||
PORTCON_PORTB_SEL1 &= 0
|
||||
| PORTCON_PORTB_SEL1_B8_MASK
|
||||
| PORTCON_PORTB_SEL1_B10_MASK
|
||||
| PORTCON_PORTB_SEL1_B12_MASK
|
||||
| PORTCON_PORTB_SEL1_B13_MASK
|
||||
;
|
||||
| PORTCON_PORTB_SEL1_B13_MASK;
|
||||
PORTCON_PORTB_SEL1 |= 0
|
||||
| PORTCON_PORTB_SEL1_B8_BITS_SPI0_CLK
|
||||
| PORTCON_PORTB_SEL1_B10_BITS_SPI0_MOSI
|
||||
| PORTCON_PORTB_SEL1_B11_BITS_SWDIO
|
||||
| PORTCON_PORTB_SEL1_B12_BITS_GPIOB12
|
||||
| PORTCON_PORTB_SEL1_B13_BITS_GPIOB13
|
||||
| PORTCON_PORTB_SEL1_B14_BITS_SWCLK
|
||||
;
|
||||
| PORTCON_PORTB_SEL1_B14_BITS_SWCLK;
|
||||
|
||||
// PORT C pin selection
|
||||
|
||||
PORTCON_PORTC_SEL0 &= 0
|
||||
| PORTCON_PORTC_SEL0_C6_MASK
|
||||
| PORTCON_PORTC_SEL0_C7_MASK
|
||||
;
|
||||
| PORTCON_PORTC_SEL0_C7_MASK;
|
||||
|
||||
// PORT A pin configuration
|
||||
|
||||
@ -164,27 +151,23 @@ void BOARD_PORTCON_Init(void)
|
||||
| PORTCON_PORTA_IE_A4_BITS_ENABLE
|
||||
| PORTCON_PORTA_IE_A5_BITS_ENABLE
|
||||
| PORTCON_PORTA_IE_A6_BITS_ENABLE
|
||||
| PORTCON_PORTA_IE_A8_BITS_ENABLE
|
||||
;
|
||||
| PORTCON_PORTA_IE_A8_BITS_ENABLE;
|
||||
PORTCON_PORTA_IE &= ~(0
|
||||
| PORTCON_PORTA_IE_A10_MASK
|
||||
| PORTCON_PORTA_IE_A11_MASK
|
||||
| PORTCON_PORTA_IE_A12_MASK
|
||||
| PORTCON_PORTA_IE_A13_MASK
|
||||
);
|
||||
| PORTCON_PORTA_IE_A13_MASK);
|
||||
|
||||
PORTCON_PORTA_PU |= 0
|
||||
| PORTCON_PORTA_PU_A3_BITS_ENABLE
|
||||
| PORTCON_PORTA_PU_A4_BITS_ENABLE
|
||||
| PORTCON_PORTA_PU_A5_BITS_ENABLE
|
||||
| PORTCON_PORTA_PU_A6_BITS_ENABLE
|
||||
;
|
||||
| PORTCON_PORTA_PU_A6_BITS_ENABLE;
|
||||
PORTCON_PORTA_PU &= ~(0
|
||||
| PORTCON_PORTA_PU_A10_MASK
|
||||
| PORTCON_PORTA_PU_A11_MASK
|
||||
| PORTCON_PORTA_PU_A12_MASK
|
||||
| PORTCON_PORTA_PU_A13_MASK
|
||||
);
|
||||
| PORTCON_PORTA_PU_A13_MASK);
|
||||
|
||||
PORTCON_PORTA_PD &= ~(0
|
||||
| PORTCON_PORTA_PD_A3_MASK
|
||||
@ -194,86 +177,73 @@ void BOARD_PORTCON_Init(void)
|
||||
| PORTCON_PORTA_PD_A10_MASK
|
||||
| PORTCON_PORTA_PD_A11_MASK
|
||||
| PORTCON_PORTA_PD_A12_MASK
|
||||
| PORTCON_PORTA_PD_A13_MASK
|
||||
);
|
||||
| PORTCON_PORTA_PD_A13_MASK);
|
||||
|
||||
PORTCON_PORTA_OD |= 0
|
||||
| PORTCON_PORTA_OD_A3_BITS_ENABLE
|
||||
| PORTCON_PORTA_OD_A4_BITS_ENABLE
|
||||
| PORTCON_PORTA_OD_A5_BITS_ENABLE
|
||||
| PORTCON_PORTA_OD_A6_BITS_ENABLE
|
||||
;
|
||||
| PORTCON_PORTA_OD_A6_BITS_ENABLE;
|
||||
PORTCON_PORTA_OD &= ~(0
|
||||
| PORTCON_PORTA_OD_A10_MASK
|
||||
| PORTCON_PORTA_OD_A11_MASK
|
||||
| PORTCON_PORTA_OD_A12_MASK
|
||||
| PORTCON_PORTA_OD_A13_MASK
|
||||
);
|
||||
| PORTCON_PORTA_OD_A13_MASK);
|
||||
|
||||
// PORT B pin configuration
|
||||
|
||||
PORTCON_PORTB_IE |= 0
|
||||
| PORTCON_PORTB_IE_B14_BITS_ENABLE
|
||||
;
|
||||
| PORTCON_PORTB_IE_B14_BITS_ENABLE;
|
||||
PORTCON_PORTB_IE &= ~(0
|
||||
| PORTCON_PORTB_IE_B6_MASK
|
||||
| PORTCON_PORTB_IE_B7_MASK
|
||||
| PORTCON_PORTB_IE_B8_MASK
|
||||
| PORTCON_PORTB_IE_B9_MASK
|
||||
| PORTCON_PORTB_IE_B10_MASK
|
||||
| PORTCON_PORTB_IE_B15_MASK
|
||||
);
|
||||
| PORTCON_PORTB_IE_B15_MASK);
|
||||
|
||||
PORTCON_PORTB_PU &= ~(0
|
||||
| PORTCON_PORTB_PU_B6_MASK
|
||||
| PORTCON_PORTB_PU_B9_MASK
|
||||
| PORTCON_PORTB_PU_B11_MASK
|
||||
| PORTCON_PORTB_PU_B14_MASK
|
||||
| PORTCON_PORTB_PU_B15_MASK
|
||||
);
|
||||
| PORTCON_PORTB_PU_B15_MASK);
|
||||
|
||||
PORTCON_PORTB_PD &= ~(0
|
||||
| PORTCON_PORTB_PD_B6_MASK
|
||||
| PORTCON_PORTB_PD_B9_MASK
|
||||
| PORTCON_PORTB_PD_B11_MASK
|
||||
| PORTCON_PORTB_PD_B14_MASK
|
||||
| PORTCON_PORTB_PD_B15_MASK
|
||||
);
|
||||
| PORTCON_PORTB_PD_B15_MASK);
|
||||
|
||||
PORTCON_PORTB_OD &= ~(0
|
||||
| PORTCON_PORTB_OD_B6_MASK
|
||||
| PORTCON_PORTB_OD_B9_MASK
|
||||
| PORTCON_PORTB_OD_B11_MASK
|
||||
| PORTCON_PORTB_OD_B15_MASK
|
||||
);
|
||||
| PORTCON_PORTB_OD_B15_MASK);
|
||||
|
||||
PORTCON_PORTB_OD |= 0
|
||||
| PORTCON_PORTB_OD_B14_BITS_ENABLE
|
||||
;
|
||||
| PORTCON_PORTB_OD_B14_BITS_ENABLE;
|
||||
|
||||
// PORT C pin configuration
|
||||
|
||||
PORTCON_PORTC_IE |= 0
|
||||
| PORTCON_PORTC_IE_C5_BITS_ENABLE
|
||||
;
|
||||
| PORTCON_PORTC_IE_C5_BITS_ENABLE;
|
||||
PORTCON_PORTC_IE &= ~(0
|
||||
| PORTCON_PORTC_IE_C0_MASK
|
||||
| PORTCON_PORTC_IE_C1_MASK
|
||||
| PORTCON_PORTC_IE_C2_MASK
|
||||
| PORTCON_PORTC_IE_C3_MASK
|
||||
| PORTCON_PORTC_IE_C4_MASK
|
||||
);
|
||||
| PORTCON_PORTC_IE_C4_MASK);
|
||||
|
||||
PORTCON_PORTC_PU |= 0
|
||||
| PORTCON_PORTC_PU_C5_BITS_ENABLE
|
||||
;
|
||||
| PORTCON_PORTC_PU_C5_BITS_ENABLE;
|
||||
PORTCON_PORTC_PU &= ~(0
|
||||
| PORTCON_PORTC_PU_C0_MASK
|
||||
| PORTCON_PORTC_PU_C1_MASK
|
||||
| PORTCON_PORTC_PU_C2_MASK
|
||||
| PORTCON_PORTC_PU_C3_MASK
|
||||
| PORTCON_PORTC_PU_C4_MASK
|
||||
);
|
||||
| PORTCON_PORTC_PU_C4_MASK);
|
||||
|
||||
PORTCON_PORTC_PD &= ~(0
|
||||
| PORTCON_PORTC_PD_C0_MASK
|
||||
@ -281,19 +251,16 @@ void BOARD_PORTCON_Init(void)
|
||||
| PORTCON_PORTC_PD_C2_MASK
|
||||
| PORTCON_PORTC_PD_C3_MASK
|
||||
| PORTCON_PORTC_PD_C4_MASK
|
||||
| PORTCON_PORTC_PD_C5_MASK
|
||||
);
|
||||
| PORTCON_PORTC_PD_C5_MASK);
|
||||
|
||||
PORTCON_PORTC_OD &= ~(0
|
||||
| PORTCON_PORTC_OD_C0_MASK
|
||||
| PORTCON_PORTC_OD_C1_MASK
|
||||
| PORTCON_PORTC_OD_C2_MASK
|
||||
| PORTCON_PORTC_OD_C3_MASK
|
||||
| PORTCON_PORTC_OD_C4_MASK
|
||||
);
|
||||
| PORTCON_PORTC_OD_C4_MASK);
|
||||
PORTCON_PORTC_OD |= 0
|
||||
| PORTCON_PORTC_OD_C5_BITS_ENABLE
|
||||
;
|
||||
| PORTCON_PORTC_OD_C5_BITS_ENABLE;
|
||||
}
|
||||
|
||||
void BOARD_ADC_Init(void)
|
||||
@ -351,14 +318,14 @@ void BOARD_EEPROM_Init(void)
|
||||
// 0E70..0E77
|
||||
EEPROM_ReadBuffer(0x0E70, Data, 8);
|
||||
gEeprom.CHAN_1_CALL = IS_MR_CHANNEL(Data[0]) ? Data[0] : MR_CHANNEL_FIRST;
|
||||
gEeprom.SQUELCH_LEVEL = (Data[1] < 10) ? Data[1] : 4;
|
||||
gEeprom.TX_TIMEOUT_TIMER = (Data[2] < 11) ? Data[2] : 2;
|
||||
gEeprom.SQUELCH_LEVEL = (Data[1] < 10) ? Data[1] : 1;
|
||||
gEeprom.TX_TIMEOUT_TIMER = (Data[2] < 11) ? Data[2] : 1;
|
||||
#ifndef DISABLE_NOAA
|
||||
gEeprom.NOAA_AUTO_SCAN = (Data[3] < 2) ? Data[3] : true;
|
||||
gEeprom.NOAA_AUTO_SCAN = (Data[3] < 2) ? Data[3] : false;
|
||||
#endif
|
||||
gEeprom.KEY_LOCK = (Data[4] < 2) ? Data[4] : false;
|
||||
gEeprom.VOX_SWITCH = (Data[5] < 2) ? Data[5] : false;
|
||||
gEeprom.VOX_LEVEL = (Data[6] < 10) ? Data[6] : 5;
|
||||
gEeprom.VOX_LEVEL = (Data[6] < 10) ? Data[6] : 1;
|
||||
gEeprom.MIC_SENSITIVITY = (Data[7] < 5) ? Data[7] : 4;
|
||||
|
||||
// 0E78..0E7F
|
||||
@ -371,8 +338,8 @@ void BOARD_EEPROM_Init(void)
|
||||
gEeprom.CROSS_BAND_RX_TX = (Data[2] < 3) ? Data[2] : CROSS_BAND_OFF;
|
||||
gEeprom.BATTERY_SAVE = (Data[3] < 5) ? Data[3] : 4;
|
||||
gEeprom.DUAL_WATCH = (Data[4] < 3) ? Data[4] : DUAL_WATCH_CHAN_A;
|
||||
gEeprom.BACKLIGHT = (Data[5] < 6) ? Data[5] : 5;
|
||||
gEeprom.TAIL_NOTE_ELIMINATION = (Data[6] < 2) ? Data[6] : true;
|
||||
gEeprom.BACKLIGHT = (Data[5] < 6) ? Data[5] : 4;
|
||||
gEeprom.TAIL_NOTE_ELIMINATION = (Data[6] < 2) ? Data[6] : false;
|
||||
gEeprom.VFO_OPEN = (Data[7] < 2) ? Data[7] : true;
|
||||
|
||||
// 0E80..0E87
|
||||
@ -388,40 +355,41 @@ void BOARD_EEPROM_Init(void)
|
||||
gEeprom.NoaaChannel[1] = IS_NOAA_CHANNEL(Data[7]) ? Data[7] : NOAA_CHANNEL_FIRST;
|
||||
#endif
|
||||
|
||||
// 0E88..0E8F
|
||||
struct
|
||||
{
|
||||
uint16_t SelectedFrequency;
|
||||
uint8_t SelectedChannel;
|
||||
uint8_t IsMrMode;
|
||||
uint8_t Padding[8];
|
||||
} FM;
|
||||
|
||||
EEPROM_ReadBuffer(0x0E88, &FM, 8);
|
||||
gEeprom.FM_LowerLimit = 760;
|
||||
gEeprom.FM_UpperLimit = 1080;
|
||||
if (FM.SelectedFrequency < gEeprom.FM_LowerLimit || FM.SelectedFrequency > gEeprom.FM_UpperLimit)
|
||||
gEeprom.FM_SelectedFrequency = 760;
|
||||
else
|
||||
gEeprom.FM_SelectedFrequency = FM.SelectedFrequency;
|
||||
|
||||
gEeprom.FM_SelectedChannel = FM.SelectedChannel;
|
||||
gEeprom.FM_IsMrMode = (FM.IsMrMode < 2) ? FM.IsMrMode : false;
|
||||
{ // 0E88..0E8F
|
||||
struct
|
||||
{
|
||||
uint16_t SelectedFrequency;
|
||||
uint8_t SelectedChannel;
|
||||
uint8_t IsMrMode;
|
||||
uint8_t Padding[8];
|
||||
} __attribute__((packed)) FM;
|
||||
|
||||
EEPROM_ReadBuffer(0x0E88, &FM, 8);
|
||||
gEeprom.FM_LowerLimit = 760;
|
||||
gEeprom.FM_UpperLimit = 1080;
|
||||
if (FM.SelectedFrequency < gEeprom.FM_LowerLimit || FM.SelectedFrequency > gEeprom.FM_UpperLimit)
|
||||
gEeprom.FM_SelectedFrequency = 960;
|
||||
else
|
||||
gEeprom.FM_SelectedFrequency = FM.SelectedFrequency;
|
||||
|
||||
gEeprom.FM_SelectedChannel = FM.SelectedChannel;
|
||||
gEeprom.FM_IsMrMode = (FM.IsMrMode < 2) ? FM.IsMrMode : false;
|
||||
}
|
||||
|
||||
// 0E40..0E67
|
||||
EEPROM_ReadBuffer(0x0E40, gFM_Channels, sizeof(gFM_Channels));
|
||||
FM_ConfigureChannelState();
|
||||
|
||||
// 0E90..0E97
|
||||
EEPROM_ReadBuffer(0x0E90, Data, 8);
|
||||
gEeprom.BEEP_CONTROL = (Data[0] < 2) ? Data[0] : true;
|
||||
gEeprom.KEY_1_SHORT_PRESS_ACTION = (Data[1] < 9) ? Data[1] : 3;
|
||||
gEeprom.KEY_1_LONG_PRESS_ACTION = (Data[2] < 9) ? Data[2] : 8;
|
||||
gEeprom.KEY_2_SHORT_PRESS_ACTION = (Data[3] < 9) ? Data[3] : 1;
|
||||
gEeprom.KEY_2_LONG_PRESS_ACTION = (Data[4] < 9) ? Data[4] : 6;
|
||||
gEeprom.SCAN_RESUME_MODE = (Data[5] < 3) ? Data[5] : SCAN_RESUME_CO;
|
||||
gEeprom.AUTO_KEYPAD_LOCK = (Data[6] < 2) ? Data[6] : true;
|
||||
gEeprom.POWER_ON_DISPLAY_MODE = (Data[7] < 3) ? Data[7] : POWER_ON_DISPLAY_MODE_MESSAGE;
|
||||
gEeprom.BEEP_CONTROL = (Data[0] < 2) ? Data[0] : true;
|
||||
gEeprom.KEY_1_SHORT_PRESS_ACTION = (Data[1] < ACTION_OPT_LEN) ? Data[1] : ACTION_OPT_MONITOR;
|
||||
gEeprom.KEY_1_LONG_PRESS_ACTION = (Data[2] < ACTION_OPT_LEN) ? Data[2] : ACTION_OPT_FLASHLIGHT;
|
||||
gEeprom.KEY_2_SHORT_PRESS_ACTION = (Data[3] < ACTION_OPT_LEN) ? Data[3] : ACTION_OPT_SCAN;
|
||||
gEeprom.KEY_2_LONG_PRESS_ACTION = (Data[4] < ACTION_OPT_LEN) ? Data[4] : ACTION_OPT_FM;
|
||||
gEeprom.SCAN_RESUME_MODE = (Data[5] < 3) ? Data[5] : SCAN_RESUME_CO;
|
||||
gEeprom.AUTO_KEYPAD_LOCK = (Data[6] < 2) ? Data[6] : false;
|
||||
gEeprom.POWER_ON_DISPLAY_MODE = (Data[7] < 3) ? Data[7] : POWER_ON_DISPLAY_MODE_MESSAGE;
|
||||
|
||||
// 0E98..0E9F
|
||||
EEPROM_ReadBuffer(0x0E98, Data, 8);
|
||||
@ -497,9 +465,7 @@ void BOARD_EEPROM_Init(void)
|
||||
|
||||
// 0F18..0F1F
|
||||
EEPROM_ReadBuffer(0x0F18, Data, 8);
|
||||
|
||||
gEeprom.SCAN_LIST_DEFAULT = (Data[0] < 2) ? Data[0] : false;
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
const unsigned int j = 1 + (i * 3);
|
||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
195
font.c
195
font.c
@ -16,104 +16,105 @@
|
||||
|
||||
#include "font.h"
|
||||
|
||||
const uint8_t gFontBig[95][16] =
|
||||
//const uint8_t gFontBig[95][16] =
|
||||
const uint8_t gFontBig[95][15] =
|
||||
{
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x70, 0xF8, 0xF8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x1B, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x1E, 0x3E, 0x00, 0x00, 0x3E, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
{0x40, 0xF0, 0xF0, 0x40, 0xF0, 0xF0, 0x40, 0x00, 0x04, 0x1F, 0x1F, 0x04, 0x1F, 0x1F, 0x04, 0x00},
|
||||
{0x70, 0xF8, 0x88, 0x8F, 0x8F, 0x98, 0x30, 0x00, 0x06, 0x0C, 0x08, 0x38, 0x38, 0x0F, 0x07, 0x00},
|
||||
{0x60, 0x60, 0x00, 0x00, 0x80, 0xC0, 0x60, 0x00, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x18, 0x18, 0x00},
|
||||
{0x00, 0xB0, 0xF8, 0xC8, 0x78, 0xB0, 0x80, 0x00, 0x0F, 0x1F, 0x10, 0x11, 0x0F, 0x1F, 0x10, 0x00},
|
||||
{0x00, 0x20, 0x3E, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0xE0, 0xF0, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0F, 0x18, 0x10, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x08, 0x18, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x18, 0x0F, 0x07, 0x00, 0x00},
|
||||
{0x00, 0x40, 0xC0, 0x80, 0x80, 0xC0, 0x40, 0x00, 0x01, 0x05, 0x07, 0x03, 0x03, 0x07, 0x05, 0x01},
|
||||
{0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x07, 0x07, 0x01, 0x01, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3C, 0x1C, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0x60, 0x00, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x00, 0x00, 0x00},
|
||||
{0xF0, 0xF8, 0x08, 0x88, 0x48, 0xF8, 0xF0, 0x00, 0x0F, 0x1F, 0x12, 0x11, 0x10, 0x1F, 0x0F, 0x00},
|
||||
{0x00, 0x20, 0x30, 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1F, 0x1F, 0x10, 0x10, 0x00},
|
||||
{0x10, 0x18, 0x08, 0x88, 0xC8, 0x78, 0x30, 0x00, 0x1C, 0x1E, 0x13, 0x11, 0x10, 0x18, 0x18, 0x00},
|
||||
{0x10, 0x18, 0x88, 0x88, 0x88, 0xF8, 0x70, 0x00, 0x08, 0x18, 0x10, 0x10, 0x10, 0x1F, 0x0F, 0x00},
|
||||
{0x80, 0xC0, 0x60, 0x30, 0xF8, 0xF8, 0x00, 0x00, 0x01, 0x01, 0x01, 0x11, 0x1F, 0x1F, 0x11, 0x00},
|
||||
{0xF8, 0xF8, 0x88, 0x88, 0x88, 0x88, 0x08, 0x00, 0x08, 0x18, 0x10, 0x10, 0x11, 0x1F, 0x0F, 0x00},
|
||||
{0xE0, 0xF0, 0x98, 0x88, 0x88, 0x80, 0x00, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x0F, 0x00},
|
||||
{0x18, 0x18, 0x08, 0x08, 0x88, 0xF8, 0x78, 0x00, 0x00, 0x00, 0x1E, 0x1F, 0x01, 0x00, 0x00, 0x00},
|
||||
{0x70, 0xF8, 0x88, 0x88, 0x88, 0xF8, 0x70, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x0F, 0x00},
|
||||
{0x70, 0xF8, 0x88, 0x88, 0x88, 0xF8, 0xF0, 0x00, 0x00, 0x10, 0x10, 0x10, 0x18, 0x0F, 0x07, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1C, 0x0C, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x80, 0xC0, 0x60, 0x30, 0x10, 0x00, 0x00, 0x01, 0x03, 0x06, 0x0C, 0x18, 0x10, 0x00},
|
||||
{0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00},
|
||||
{0x00, 0x10, 0x30, 0x60, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x10, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x00},
|
||||
{0x30, 0x38, 0x08, 0x88, 0xC8, 0x78, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x1B, 0x00, 0x00, 0x00},
|
||||
{0xE0, 0xF0, 0x10, 0x90, 0x90, 0xF0, 0xE0, 0x00, 0x0F, 0x1F, 0x10, 0x17, 0x17, 0x17, 0x03, 0x00},
|
||||
{0xC0, 0xE0, 0x30, 0x18, 0x30, 0xE0, 0xC0, 0x00, 0x1F, 0x1F, 0x01, 0x01, 0x01, 0x1F, 0x1F, 0x00},
|
||||
{0x08, 0xF8, 0xF8, 0x88, 0x88, 0xF8, 0x70, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x10, 0x1F, 0x0F, 0x00},
|
||||
{0xE0, 0xF0, 0x18, 0x08, 0x08, 0x18, 0x30, 0x00, 0x07, 0x0F, 0x18, 0x10, 0x10, 0x18, 0x0C, 0x00},
|
||||
{0x08, 0xF8, 0xF8, 0x08, 0x18, 0xF0, 0xE0, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x18, 0x0F, 0x07, 0x00},
|
||||
{0x08, 0xF8, 0xF8, 0x88, 0xC8, 0x18, 0x38, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x11, 0x18, 0x1C, 0x00},
|
||||
{0x08, 0xF8, 0xF8, 0x88, 0xC8, 0x18, 0x38, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x01, 0x00, 0x00, 0x00},
|
||||
{0xE0, 0xF0, 0x18, 0x08, 0x08, 0x18, 0x30, 0x00, 0x07, 0x0F, 0x18, 0x11, 0x11, 0x0F, 0x1F, 0x00},
|
||||
{0xF8, 0xF8, 0x80, 0x80, 0x80, 0xF8, 0xF8, 0x00, 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x1F, 0x1F, 0x00},
|
||||
{0x00, 0x00, 0x08, 0xF8, 0xF8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x08, 0xF8, 0xF8, 0x08, 0x00, 0x0E, 0x1E, 0x10, 0x10, 0x1F, 0x0F, 0x00, 0x00},
|
||||
{0x08, 0xF8, 0xF8, 0x80, 0xE0, 0x78, 0x18, 0x00, 0x10, 0x1F, 0x1F, 0x01, 0x03, 0x1E, 0x1C, 0x00},
|
||||
{0x08, 0xF8, 0xF8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x10, 0x18, 0x1C, 0x00},
|
||||
{0xF8, 0xF8, 0x70, 0xE0, 0x70, 0xF8, 0xF8, 0x00, 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x1F, 0x1F, 0x00},
|
||||
{0xF8, 0xF8, 0x70, 0xE0, 0xC0, 0xF8, 0xF8, 0x00, 0x1F, 0x1F, 0x00, 0x00, 0x01, 0x1F, 0x1F, 0x00},
|
||||
{0xE0, 0xF0, 0x18, 0x08, 0x18, 0xF0, 0xE0, 0x00, 0x07, 0x0F, 0x18, 0x10, 0x18, 0x0F, 0x07, 0x00},
|
||||
{0x08, 0xF8, 0xF8, 0x88, 0x88, 0xF8, 0x70, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00, 0x00, 0x00, 0x00},
|
||||
{0xF0, 0xF8, 0x08, 0x08, 0x08, 0xF8, 0xF0, 0x00, 0x0F, 0x1F, 0x10, 0x1C, 0x78, 0x7F, 0x4F, 0x00},
|
||||
{0x08, 0xF8, 0xF8, 0x88, 0x88, 0xF8, 0x70, 0x00, 0x10, 0x1F, 0x1F, 0x00, 0x01, 0x1F, 0x1E, 0x00},
|
||||
{0x30, 0x78, 0xC8, 0x88, 0x88, 0x38, 0x30, 0x00, 0x0C, 0x1C, 0x10, 0x10, 0x11, 0x1F, 0x0E, 0x00},
|
||||
{0x00, 0x38, 0x18, 0xF8, 0xF8, 0x18, 0x38, 0x00, 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00, 0x00},
|
||||
{0xF8, 0xF8, 0x00, 0x00, 0x00, 0xF8, 0xF8, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x0F, 0x00},
|
||||
{0xF8, 0xF8, 0x00, 0x00, 0x00, 0xF8, 0xF8, 0x00, 0x03, 0x07, 0x0C, 0x18, 0x0C, 0x07, 0x03, 0x00},
|
||||
{0xF8, 0xF8, 0x00, 0x00, 0x00, 0xF8, 0xF8, 0x00, 0x07, 0x1F, 0x1C, 0x07, 0x1C, 0x1F, 0x07, 0x00},
|
||||
{0x18, 0x78, 0xE0, 0x80, 0xE0, 0x78, 0x18, 0x00, 0x18, 0x1E, 0x07, 0x01, 0x07, 0x1E, 0x18, 0x00},
|
||||
{0x00, 0x78, 0xF8, 0x80, 0x80, 0xF8, 0x78, 0x00, 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00, 0x00},
|
||||
{0x38, 0x18, 0x08, 0x88, 0xC8, 0x78, 0x38, 0x00, 0x1C, 0x1E, 0x13, 0x11, 0x10, 0x18, 0x1C, 0x00},
|
||||
{0x00, 0x00, 0xF8, 0xF8, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x1F, 0x10, 0x10, 0x00, 0x00},
|
||||
{0x70, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0E, 0x1C, 0x00},
|
||||
{0x00, 0x00, 0x08, 0x08, 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1F, 0x1F, 0x00, 0x00},
|
||||
{0x10, 0x18, 0x0E, 0x07, 0x0E, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40},
|
||||
{0x00, 0x00, 0x07, 0x0F, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x40, 0x40, 0x40, 0xC0, 0x80, 0x00, 0x00, 0x0E, 0x1F, 0x11, 0x11, 0x0F, 0x1F, 0x10, 0x00},
|
||||
{0x08, 0xF8, 0xF8, 0x40, 0xC0, 0x80, 0x00, 0x00, 0x10, 0x1F, 0x0F, 0x10, 0x10, 0x1F, 0x0F, 0x00},
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x40, 0xC0, 0x80, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x10, 0x18, 0x08, 0x00},
|
||||
{0x00, 0x80, 0xC0, 0x48, 0xF8, 0xF8, 0x00, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x0F, 0x1F, 0x10, 0x00},
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x40, 0xC0, 0x80, 0x00, 0x0F, 0x1F, 0x11, 0x11, 0x11, 0x19, 0x09, 0x00},
|
||||
{0x80, 0xF0, 0xF8, 0x88, 0x18, 0x30, 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00, 0x00, 0x00, 0x00},
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x80, 0xC0, 0x40, 0x00, 0x4F, 0xDF, 0x90, 0x90, 0xFF, 0x7F, 0x00, 0x00},
|
||||
{0x08, 0xF8, 0xF8, 0x80, 0x40, 0xC0, 0x80, 0x00, 0x10, 0x1F, 0x1F, 0x00, 0x00, 0x1F, 0x1F, 0x00},
|
||||
{0x00, 0x00, 0x40, 0xD8, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x00, 0x40, 0xD8, 0xD8, 0x00, 0x00, 0x60, 0xE0, 0x80, 0x80, 0xFF, 0x7F, 0x00},
|
||||
{0x08, 0xF8, 0xF8, 0x00, 0x80, 0xC0, 0x40, 0x00, 0x10, 0x1F, 0x1F, 0x03, 0x07, 0x1C, 0x18, 0x00},
|
||||
{0x00, 0x00, 0x08, 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00, 0x00},
|
||||
{0xC0, 0xC0, 0xC0, 0x80, 0xC0, 0xC0, 0x80, 0x00, 0x1F, 0x1F, 0x00, 0x1F, 0x00, 0x1F, 0x1F, 0x00},
|
||||
{0x40, 0xC0, 0x80, 0x40, 0x40, 0xC0, 0x80, 0x00, 0x00, 0x1F, 0x1F, 0x00, 0x00, 0x1F, 0x1F, 0x00},
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x40, 0xC0, 0x80, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x0F, 0x00},
|
||||
{0x40, 0xC0, 0x80, 0x40, 0x40, 0xC0, 0x80, 0x00, 0x80, 0xFF, 0xFF, 0x90, 0x10, 0x1F, 0x0F, 0x00},
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x80, 0xC0, 0x40, 0x00, 0x0F, 0x1F, 0x10, 0x90, 0xFF, 0xFF, 0x80, 0x00},
|
||||
{0x40, 0xC0, 0x80, 0xC0, 0x40, 0xC0, 0x80, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00, 0x00, 0x01, 0x00},
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x40, 0xC0, 0x80, 0x00, 0x08, 0x19, 0x13, 0x12, 0x16, 0x1C, 0x08, 0x00},
|
||||
{0x40, 0x40, 0xF0, 0xF8, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x1F, 0x10, 0x18, 0x08, 0x00},
|
||||
{0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x0F, 0x1F, 0x10, 0x00},
|
||||
{0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x07, 0x0F, 0x18, 0x18, 0x0F, 0x07, 0x00},
|
||||
{0xC0, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x0F, 0x1F, 0x18, 0x0E, 0x18, 0x1F, 0x0F, 0x00},
|
||||
{0x40, 0xC0, 0x80, 0x00, 0x80, 0xC0, 0x40, 0x00, 0x10, 0x18, 0x0F, 0x07, 0x0F, 0x18, 0x10, 0x00},
|
||||
{0xC0, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x8F, 0x9F, 0x90, 0x90, 0xD0, 0x7F, 0x3F, 0x00},
|
||||
{0xC0, 0xC0, 0x40, 0x40, 0xC0, 0xC0, 0x40, 0x00, 0x18, 0x1C, 0x16, 0x13, 0x11, 0x18, 0x18, 0x00},
|
||||
{0x00, 0x80, 0x80, 0xF0, 0x78, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x78, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x1F, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x08, 0x08, 0x78, 0xF0, 0x80, 0x80, 0x00, 0x00, 0x10, 0x10, 0x1F, 0x0F, 0x00, 0x00, 0x00},
|
||||
{0x10, 0x18, 0x08, 0x18, 0x10, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
};
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // , 0x00}, // ' '
|
||||
{0x00, 0x00, 0x70, 0xF8, 0xF8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x1B, 0x00, 0x00}, // , 0x00}, // '!'
|
||||
{0x00, 0x1E, 0x3E, 0x00, 0x00, 0x3E, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // , 0x00}, // '"'
|
||||
{0x40, 0xF0, 0xF0, 0x40, 0xF0, 0xF0, 0x40, 0x00, 0x04, 0x1F, 0x1F, 0x04, 0x1F, 0x1F, 0x04}, // , 0x00}, // '#'
|
||||
{0x70, 0xF8, 0x88, 0x8F, 0x8F, 0x98, 0x30, 0x00, 0x06, 0x0C, 0x08, 0x38, 0x38, 0x0F, 0x07}, // , 0x00}, // '$'
|
||||
{0x60, 0x60, 0x00, 0x00, 0x80, 0xC0, 0x60, 0x00, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x18, 0x18}, // , 0x00}, // '%'
|
||||
{0x00, 0xB0, 0xF8, 0xC8, 0x78, 0xB0, 0x80, 0x00, 0x0F, 0x1F, 0x10, 0x11, 0x0F, 0x1F, 0x10}, // , 0x00}, // '&'
|
||||
{0x00, 0x20, 0x3E, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // , 0x00}, // '''
|
||||
{0x00, 0x00, 0xE0, 0xF0, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0F, 0x18, 0x10, 0x00}, // , 0x00}, // '('
|
||||
{0x00, 0x00, 0x08, 0x18, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x18, 0x0F, 0x07, 0x00}, // , 0x00}, // ')'
|
||||
{0x00, 0x40, 0xC0, 0x80, 0x80, 0xC0, 0x40, 0x00, 0x01, 0x05, 0x07, 0x03, 0x03, 0x07, 0x05}, // , 0x01}, // '*'
|
||||
{0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x07, 0x07, 0x01, 0x01}, // , 0x00}, // '+'
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3C, 0x1C, 0x00, 0x00}, // , 0x00}, // ','
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01}, // , 0x00}, // '-'
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00}, // , 0x00}, // '.'
|
||||
{0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0x60, 0x00, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x00, 0x00}, // , 0x00}, // '/'
|
||||
{0xF0, 0xF8, 0x08, 0x88, 0x48, 0xF8, 0xF0, 0x00, 0x0F, 0x1F, 0x12, 0x11, 0x10, 0x1F, 0x0F}, // , 0x00}, // '0'
|
||||
{0x00, 0x20, 0x30, 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1F, 0x1F, 0x10, 0x10}, // , 0x00}, // '1'
|
||||
{0x10, 0x18, 0x08, 0x88, 0xC8, 0x78, 0x30, 0x00, 0x1C, 0x1E, 0x13, 0x11, 0x10, 0x18, 0x18}, // , 0x00}, // '2'
|
||||
{0x10, 0x18, 0x88, 0x88, 0x88, 0xF8, 0x70, 0x00, 0x08, 0x18, 0x10, 0x10, 0x10, 0x1F, 0x0F}, // , 0x00}, // '3'
|
||||
{0x80, 0xC0, 0x60, 0x30, 0xF8, 0xF8, 0x00, 0x00, 0x01, 0x01, 0x01, 0x11, 0x1F, 0x1F, 0x11}, // , 0x00}, // '4'
|
||||
{0xF8, 0xF8, 0x88, 0x88, 0x88, 0x88, 0x08, 0x00, 0x08, 0x18, 0x10, 0x10, 0x11, 0x1F, 0x0F}, // , 0x00}, // '5'
|
||||
{0xE0, 0xF0, 0x98, 0x88, 0x88, 0x80, 0x00, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x0F}, // , 0x00}, // '6'
|
||||
{0x18, 0x18, 0x08, 0x08, 0x88, 0xF8, 0x78, 0x00, 0x00, 0x00, 0x1E, 0x1F, 0x01, 0x00, 0x00}, // , 0x00}, // '7'
|
||||
{0x70, 0xF8, 0x88, 0x88, 0x88, 0xF8, 0x70, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x0F}, // , 0x00}, // '8'
|
||||
{0x70, 0xF8, 0x88, 0x88, 0x88, 0xF8, 0xF0, 0x00, 0x00, 0x10, 0x10, 0x10, 0x18, 0x0F, 0x07}, // , 0x00}, // '9'
|
||||
{0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x00, 0x00}, // , 0x00}, // ':'
|
||||
{0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1C, 0x0C, 0x00, 0x00}, // , 0x00}, // ';'
|
||||
{0x00, 0x00, 0x80, 0xC0, 0x60, 0x30, 0x10, 0x00, 0x00, 0x01, 0x03, 0x06, 0x0C, 0x18, 0x10}, // , 0x00}, // '<'
|
||||
{0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04}, // , 0x00}, // '='
|
||||
{0x00, 0x10, 0x30, 0x60, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x10, 0x18, 0x0C, 0x06, 0x03, 0x01}, // , 0x00}, // '>'
|
||||
{0x30, 0x38, 0x08, 0x88, 0xC8, 0x78, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x1B, 0x00, 0x00}, // , 0x00}, // '?'
|
||||
{0xE0, 0xF0, 0x10, 0x90, 0x90, 0xF0, 0xE0, 0x00, 0x0F, 0x1F, 0x10, 0x17, 0x17, 0x17, 0x03}, // , 0x00}, // '@'
|
||||
{0xC0, 0xE0, 0x30, 0x18, 0x30, 0xE0, 0xC0, 0x00, 0x1F, 0x1F, 0x01, 0x01, 0x01, 0x1F, 0x1F}, // , 0x00}, // 'A'
|
||||
{0x08, 0xF8, 0xF8, 0x88, 0x88, 0xF8, 0x70, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x10, 0x1F, 0x0F}, // , 0x00}, // 'B'
|
||||
{0xE0, 0xF0, 0x18, 0x08, 0x08, 0x18, 0x30, 0x00, 0x07, 0x0F, 0x18, 0x10, 0x10, 0x18, 0x0C}, // , 0x00}, // 'C'
|
||||
{0x08, 0xF8, 0xF8, 0x08, 0x18, 0xF0, 0xE0, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x18, 0x0F, 0x07}, // , 0x00}, // 'D'
|
||||
{0x08, 0xF8, 0xF8, 0x88, 0xC8, 0x18, 0x38, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x11, 0x18, 0x1C}, // , 0x00}, // 'E'
|
||||
{0x08, 0xF8, 0xF8, 0x88, 0xC8, 0x18, 0x38, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x01, 0x00, 0x00}, // , 0x00}, // 'F'
|
||||
{0xE0, 0xF0, 0x18, 0x08, 0x08, 0x18, 0x30, 0x00, 0x07, 0x0F, 0x18, 0x11, 0x11, 0x0F, 0x1F}, // , 0x00}, // 'G'
|
||||
{0xF8, 0xF8, 0x80, 0x80, 0x80, 0xF8, 0xF8, 0x00, 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x1F, 0x1F}, // , 0x00}, // 'H'
|
||||
{0x00, 0x00, 0x08, 0xF8, 0xF8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00}, // , 0x00}, // 'I'
|
||||
{0x00, 0x00, 0x00, 0x08, 0xF8, 0xF8, 0x08, 0x00, 0x0E, 0x1E, 0x10, 0x10, 0x1F, 0x0F, 0x00}, // , 0x00}, // 'J'
|
||||
{0x08, 0xF8, 0xF8, 0x80, 0xE0, 0x78, 0x18, 0x00, 0x10, 0x1F, 0x1F, 0x01, 0x03, 0x1E, 0x1C}, // , 0x00}, // 'K'
|
||||
{0x08, 0xF8, 0xF8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x10, 0x18, 0x1C}, // , 0x00}, // 'L'
|
||||
{0xF8, 0xF8, 0x70, 0xE0, 0x70, 0xF8, 0xF8, 0x00, 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x1F, 0x1F}, // , 0x00}, // 'M'
|
||||
{0xF8, 0xF8, 0x70, 0xE0, 0xC0, 0xF8, 0xF8, 0x00, 0x1F, 0x1F, 0x00, 0x00, 0x01, 0x1F, 0x1F}, // , 0x00}, // 'N'
|
||||
{0xE0, 0xF0, 0x18, 0x08, 0x18, 0xF0, 0xE0, 0x00, 0x07, 0x0F, 0x18, 0x10, 0x18, 0x0F, 0x07}, // , 0x00}, // 'O'
|
||||
{0x08, 0xF8, 0xF8, 0x88, 0x88, 0xF8, 0x70, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00, 0x00, 0x00}, // , 0x00}, // 'P'
|
||||
{0xF0, 0xF8, 0x08, 0x08, 0x08, 0xF8, 0xF0, 0x00, 0x0F, 0x1F, 0x10, 0x1C, 0x78, 0x7F, 0x4F}, // , 0x00}, // 'Q'
|
||||
{0x08, 0xF8, 0xF8, 0x88, 0x88, 0xF8, 0x70, 0x00, 0x10, 0x1F, 0x1F, 0x00, 0x01, 0x1F, 0x1E}, // , 0x00}, // 'R'
|
||||
{0x30, 0x78, 0xC8, 0x88, 0x88, 0x38, 0x30, 0x00, 0x0C, 0x1C, 0x10, 0x10, 0x11, 0x1F, 0x0E}, // , 0x00}, // 'S'
|
||||
{0x00, 0x38, 0x18, 0xF8, 0xF8, 0x18, 0x38, 0x00, 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00}, // , 0x00}, // 'T'
|
||||
{0xF8, 0xF8, 0x00, 0x00, 0x00, 0xF8, 0xF8, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x0F}, // , 0x00}, // 'U'
|
||||
{0xF8, 0xF8, 0x00, 0x00, 0x00, 0xF8, 0xF8, 0x00, 0x03, 0x07, 0x0C, 0x18, 0x0C, 0x07, 0x03}, // , 0x00}, // 'V'
|
||||
{0xF8, 0xF8, 0x00, 0x00, 0x00, 0xF8, 0xF8, 0x00, 0x07, 0x1F, 0x1C, 0x07, 0x1C, 0x1F, 0x07}, // , 0x00}, // 'W'
|
||||
{0x18, 0x78, 0xE0, 0x80, 0xE0, 0x78, 0x18, 0x00, 0x18, 0x1E, 0x07, 0x01, 0x07, 0x1E, 0x18}, // , 0x00}, // 'X'
|
||||
{0x00, 0x78, 0xF8, 0x80, 0x80, 0xF8, 0x78, 0x00, 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00}, // , 0x00}, // 'Y'
|
||||
{0x38, 0x18, 0x08, 0x88, 0xC8, 0x78, 0x38, 0x00, 0x1C, 0x1E, 0x13, 0x11, 0x10, 0x18, 0x1C}, // , 0x00}, // 'Z'
|
||||
{0x00, 0x00, 0xF8, 0xF8, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x1F, 0x10, 0x10, 0x00}, // , 0x00}, // '['
|
||||
{0x70, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0E, 0x1C}, // , 0x00}, // '"\'
|
||||
{0x00, 0x00, 0x08, 0x08, 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1F, 0x1F, 0x00}, // , 0x00}, // ']'
|
||||
{0x10, 0x18, 0x0E, 0x07, 0x0E, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // , 0x00}, // '^'
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40}, // , 0x40}, // '_'
|
||||
{0x00, 0x00, 0x07, 0x0F, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // , 0x00}, // '`'
|
||||
{0x00, 0x40, 0x40, 0x40, 0xC0, 0x80, 0x00, 0x00, 0x0E, 0x1F, 0x11, 0x11, 0x0F, 0x1F, 0x10}, // , 0x00}, // 'a'
|
||||
{0x08, 0xF8, 0xF8, 0x40, 0xC0, 0x80, 0x00, 0x00, 0x10, 0x1F, 0x0F, 0x10, 0x10, 0x1F, 0x0F}, // , 0x00}, // 'b'
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x40, 0xC0, 0x80, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x10, 0x18, 0x08}, // , 0x00}, // 'c'
|
||||
{0x00, 0x80, 0xC0, 0x48, 0xF8, 0xF8, 0x00, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x0F, 0x1F, 0x10}, // , 0x00}, // 'd'
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x40, 0xC0, 0x80, 0x00, 0x0F, 0x1F, 0x11, 0x11, 0x11, 0x19, 0x09}, // , 0x00}, // 'e'
|
||||
{0x80, 0xF0, 0xF8, 0x88, 0x18, 0x30, 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00, 0x00, 0x00}, // , 0x00}, // 'f'
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x80, 0xC0, 0x40, 0x00, 0x4F, 0xDF, 0x90, 0x90, 0xFF, 0x7F, 0x00}, // , 0x00}, // 'g'
|
||||
{0x08, 0xF8, 0xF8, 0x80, 0x40, 0xC0, 0x80, 0x00, 0x10, 0x1F, 0x1F, 0x00, 0x00, 0x1F, 0x1F}, // , 0x00}, // 'h'
|
||||
{0x00, 0x00, 0x40, 0xD8, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00}, // , 0x00}, // 'i'
|
||||
{0x00, 0x00, 0x00, 0x00, 0x40, 0xD8, 0xD8, 0x00, 0x00, 0x60, 0xE0, 0x80, 0x80, 0xFF, 0x7F}, // , 0x00}, // 'j'
|
||||
{0x08, 0xF8, 0xF8, 0x00, 0x80, 0xC0, 0x40, 0x00, 0x10, 0x1F, 0x1F, 0x03, 0x07, 0x1C, 0x18}, // , 0x00}, // 'k'
|
||||
{0x00, 0x00, 0x08, 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00}, // , 0x00}, // 'l'
|
||||
{0xC0, 0xC0, 0xC0, 0x80, 0xC0, 0xC0, 0x80, 0x00, 0x1F, 0x1F, 0x00, 0x1F, 0x00, 0x1F, 0x1F}, // , 0x00}, // 'm'
|
||||
{0x40, 0xC0, 0x80, 0x40, 0x40, 0xC0, 0x80, 0x00, 0x00, 0x1F, 0x1F, 0x00, 0x00, 0x1F, 0x1F}, // , 0x00}, // 'n'
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x40, 0xC0, 0x80, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x0F}, // , 0x00}, // 'o'
|
||||
{0x40, 0xC0, 0x80, 0x40, 0x40, 0xC0, 0x80, 0x00, 0x80, 0xFF, 0xFF, 0x90, 0x10, 0x1F, 0x0F}, // , 0x00}, // 'p'
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x80, 0xC0, 0x40, 0x00, 0x0F, 0x1F, 0x10, 0x90, 0xFF, 0xFF, 0x80}, // , 0x00}, // 'q'
|
||||
{0x40, 0xC0, 0x80, 0xC0, 0x40, 0xC0, 0x80, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00, 0x00, 0x01}, // , 0x00}, // 'r'
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x40, 0xC0, 0x80, 0x00, 0x08, 0x19, 0x13, 0x12, 0x16, 0x1C, 0x08}, // , 0x00}, // 's'
|
||||
{0x40, 0x40, 0xF0, 0xF8, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x1F, 0x10, 0x18, 0x08}, // , 0x00}, // 't'
|
||||
{0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x0F, 0x1F, 0x10}, // , 0x00}, // 'u'
|
||||
{0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x07, 0x0F, 0x18, 0x18, 0x0F, 0x07}, // , 0x00}, // 'v'
|
||||
{0xC0, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x0F, 0x1F, 0x18, 0x0E, 0x18, 0x1F, 0x0F}, // , 0x00}, // 'w'
|
||||
{0x40, 0xC0, 0x80, 0x00, 0x80, 0xC0, 0x40, 0x00, 0x10, 0x18, 0x0F, 0x07, 0x0F, 0x18, 0x10}, // , 0x00}, // 'x'
|
||||
{0xC0, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x8F, 0x9F, 0x90, 0x90, 0xD0, 0x7F, 0x3F}, // , 0x00}, // 'y'
|
||||
{0xC0, 0xC0, 0x40, 0x40, 0xC0, 0xC0, 0x40, 0x00, 0x18, 0x1C, 0x16, 0x13, 0x11, 0x18, 0x18}, // , 0x00}, // 'z'
|
||||
{0x00, 0x80, 0x80, 0xF0, 0x78, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x1F, 0x10, 0x10}, // , 0x00}, // '{'
|
||||
{0x00, 0x00, 0x00, 0x78, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x1F, 0x00, 0x00}, // , 0x00}, // '|'
|
||||
{0x00, 0x08, 0x08, 0x78, 0xF0, 0x80, 0x80, 0x00, 0x00, 0x10, 0x10, 0x1F, 0x0F, 0x00, 0x00}, // , 0x00}, // '}'
|
||||
{0x10, 0x18, 0x08, 0x18, 0x10, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} // , 0x00} // '->'
|
||||
};
|
||||
|
||||
#if 0
|
||||
// original font
|
||||
|
3
font.h
3
font.h
@ -19,7 +19,8 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern const uint8_t gFontBig[95][16];
|
||||
//extern const uint8_t gFontBig[95][16];
|
||||
extern const uint8_t gFontBig[95][15];
|
||||
extern const uint8_t gFontBigDigits[11][26];
|
||||
extern const uint8_t gFontSmallDigits[11][7];
|
||||
|
||||
|
39
radio.c
39
radio.c
@ -258,6 +258,12 @@ void RADIO_ConfigureChannel(uint8_t VFO, uint32_t Arg)
|
||||
Tmp = Data[0];
|
||||
switch (gEeprom.VfoInfo[VFO].ConfigRX.CodeType)
|
||||
{
|
||||
default:
|
||||
case CODE_TYPE_OFF:
|
||||
gEeprom.VfoInfo[VFO].ConfigRX.CodeType = CODE_TYPE_OFF;
|
||||
Tmp = 0;
|
||||
break;
|
||||
|
||||
case CODE_TYPE_CONTINUOUS_TONE:
|
||||
if (Tmp >= 50)
|
||||
Tmp = 0;
|
||||
@ -268,11 +274,6 @@ void RADIO_ConfigureChannel(uint8_t VFO, uint32_t Arg)
|
||||
if (Tmp >= 104)
|
||||
Tmp = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
gEeprom.VfoInfo[VFO].ConfigRX.CodeType = CODE_TYPE_OFF;
|
||||
Tmp = 0;
|
||||
break;
|
||||
}
|
||||
gEeprom.VfoInfo[VFO].ConfigRX.Code = Tmp;
|
||||
|
||||
@ -342,7 +343,6 @@ void RADIO_ConfigureChannel(uint8_t VFO, uint32_t Arg)
|
||||
|
||||
Frequency = pRadio->ConfigRX.Frequency;
|
||||
|
||||
// TODO: FIX-ME !!!
|
||||
if (Frequency < gLowerLimitFrequencyBandTable[Band])
|
||||
Frequency = gLowerLimitFrequencyBandTable[Band];
|
||||
else
|
||||
@ -585,6 +585,16 @@ void RADIO_SetupRegisters(bool bSwitchToFunction0)
|
||||
|
||||
switch (CodeType)
|
||||
{
|
||||
default:
|
||||
case CODE_TYPE_OFF:
|
||||
BK4819_SetCTCSSFrequency(670);
|
||||
BK4819_Set55HzTailDetection();
|
||||
InterruptMask = 0
|
||||
| BK4819_REG_3F_CxCSS_TAIL
|
||||
| BK4819_REG_3F_SQUELCH_FOUND
|
||||
| BK4819_REG_3F_SQUELCH_LOST;
|
||||
break;
|
||||
|
||||
case CODE_TYPE_DIGITAL:
|
||||
case CODE_TYPE_REVERSE_DIGITAL:
|
||||
BK4819_SetCDCSSCodeWord(DCS_GetGolayCodeWord(CodeType, Code));
|
||||
@ -606,15 +616,6 @@ void RADIO_SetupRegisters(bool bSwitchToFunction0)
|
||||
| BK4819_REG_3F_SQUELCH_FOUND
|
||||
| BK4819_REG_3F_SQUELCH_LOST;
|
||||
break;
|
||||
|
||||
default:
|
||||
BK4819_SetCTCSSFrequency(670);
|
||||
BK4819_Set55HzTailDetection();
|
||||
InterruptMask = 0
|
||||
| BK4819_REG_3F_CxCSS_TAIL
|
||||
| BK4819_REG_3F_SQUELCH_FOUND
|
||||
| BK4819_REG_3F_SQUELCH_LOST;
|
||||
break;
|
||||
}
|
||||
|
||||
if (gRxVfo->SCRAMBLING_TYPE == 0 || !gSetting_ScrambleEnable)
|
||||
@ -773,9 +774,9 @@ void RADIO_SetVfoState(VfoState_t State)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (State == VFO_STATE_VOL_HIGH)
|
||||
if (State == VFO_STATE_VOLTAGE_HIGH)
|
||||
{
|
||||
VfoState[0] = VFO_STATE_VOL_HIGH;
|
||||
VfoState[0] = VFO_STATE_VOLTAGE_HIGH;
|
||||
VfoState[1] = VFO_STATE_TX_DISABLE;
|
||||
}
|
||||
else
|
||||
@ -827,8 +828,8 @@ void RADIO_PrepareTX(void)
|
||||
if (gBatteryDisplayLevel == 0)
|
||||
State = VFO_STATE_BAT_LOW;
|
||||
else
|
||||
if (gBatteryDisplayLevel == 6)
|
||||
State = VFO_STATE_VOL_HIGH;
|
||||
if (gBatteryDisplayLevel >= 6)
|
||||
State = VFO_STATE_VOLTAGE_HIGH;
|
||||
else
|
||||
goto Skip;
|
||||
}
|
||||
|
2
radio.h
2
radio.h
@ -81,7 +81,7 @@ enum VfoState_t
|
||||
VFO_STATE_TX_DISABLE,
|
||||
VFO_STATE_TIMEOUT,
|
||||
VFO_STATE_ALARM,
|
||||
VFO_STATE_VOL_HIGH
|
||||
VFO_STATE_VOLTAGE_HIGH
|
||||
};
|
||||
|
||||
typedef enum VfoState_t VfoState_t;
|
||||
|
13
settings.h
13
settings.h
@ -69,6 +69,19 @@ enum {
|
||||
OUTPUT_POWER_HIGH
|
||||
};
|
||||
|
||||
enum {
|
||||
ACTION_OPT_NONE = 0,
|
||||
ACTION_OPT_FLASHLIGHT,
|
||||
ACTION_OPT_POWER,
|
||||
ACTION_OPT_MONITOR,
|
||||
ACTION_OPT_SCAN,
|
||||
ACTION_OPT_VOX,
|
||||
ACTION_OPT_ALARM,
|
||||
ACTION_OPT_FM,
|
||||
ACTION_OPT_1750,
|
||||
ACTION_OPT_LEN
|
||||
};
|
||||
|
||||
#ifndef DISABLE_VOICE
|
||||
enum VOICE_Prompt_t
|
||||
{
|
||||
|
@ -77,7 +77,7 @@ void UI_PrintString(const char *pString, uint8_t Start, uint8_t End, uint8_t Lin
|
||||
const unsigned int Index = pString[i] - ' ';
|
||||
const unsigned int ofs = (unsigned int)Start + (i * Width);
|
||||
memcpy(gFrameBuffer[Line + 0] + ofs, &gFontBig[Index][0], 8);
|
||||
memcpy(gFrameBuffer[Line + 1] + ofs, &gFontBig[Index][8], 8);
|
||||
memcpy(gFrameBuffer[Line + 1] + ofs, &gFontBig[Index][8], 7);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
13
ui/main.c
13
ui/main.c
@ -220,7 +220,7 @@ void UI_DisplayMain(void)
|
||||
strcpy(String, "BAT LOW");
|
||||
break;
|
||||
case VFO_STATE_TX_DISABLE:
|
||||
strcpy(String, "DISABLE");
|
||||
strcpy(String, "TX DISABLE");
|
||||
break;
|
||||
case VFO_STATE_TIMEOUT:
|
||||
strcpy(String, "TIMEOUT");
|
||||
@ -228,13 +228,18 @@ void UI_DisplayMain(void)
|
||||
case VFO_STATE_ALARM:
|
||||
strcpy(String, "ALARM");
|
||||
break;
|
||||
case VFO_STATE_VOL_HIGH:
|
||||
sprintf(String, "VOL HIGH");
|
||||
case VFO_STATE_VOLTAGE_HIGH:
|
||||
sprintf(String, "VOLT HIGH");
|
||||
Width = 8;
|
||||
break;
|
||||
}
|
||||
|
||||
UI_PrintString(String, 31, 111, Line, Width, true);
|
||||
#if 0
|
||||
UI_PrintString(String, 31, 111, Line, Width, true);
|
||||
#else
|
||||
(void)Width;
|
||||
UI_PrintString(String, 31, 111, Line, 8, false);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{ // normal state
|
||||
|
Loading…
Reference in New Issue
Block a user