Write build options to EEPROM for CHIRP to use.
This commit is contained in:
2
main.c
2
main.c
@@ -84,7 +84,7 @@ void Main(void)
|
|||||||
BOARD_ADC_GetBatteryInfo(&gBatteryCurrentVoltage, &gBatteryCurrent);
|
BOARD_ADC_GetBatteryInfo(&gBatteryCurrentVoltage, &gBatteryCurrent);
|
||||||
|
|
||||||
SETTINGS_InitEEPROM();
|
SETTINGS_InitEEPROM();
|
||||||
|
SETTINGS_WriteBuildOptions();
|
||||||
SETTINGS_LoadCalibration();
|
SETTINGS_LoadCalibration();
|
||||||
|
|
||||||
RADIO_ConfigureChannel(0, VFO_CONFIGURE_RELOAD);
|
RADIO_ConfigureChannel(0, VFO_CONFIGURE_RELOAD);
|
||||||
|
47
settings.c
47
settings.c
@@ -711,3 +711,50 @@ void SETTINGS_UpdateChannel(uint8_t channel, const VFO_Info_t *pVFO, bool keep)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SETTINGS_WriteBuildOptions(void)
|
||||||
|
{
|
||||||
|
uint8_t buf[8]= {};
|
||||||
|
buf[0] = 0
|
||||||
|
#ifdef ENABLE_FMRADIO
|
||||||
|
| (1 << 0)
|
||||||
|
#endif
|
||||||
|
#ifdef ENABLE_NOAA
|
||||||
|
| (1 << 1)
|
||||||
|
#endif
|
||||||
|
#ifdef ENABLE_VOICE
|
||||||
|
| (1 << 2)
|
||||||
|
#endif
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
|
| (1 << 3)
|
||||||
|
#endif
|
||||||
|
#ifdef ENABLE_ALARM
|
||||||
|
| (1 << 4)
|
||||||
|
#endif
|
||||||
|
#ifdef ENABLE_TX1750
|
||||||
|
| (1 << 5)
|
||||||
|
#endif
|
||||||
|
#ifdef ENABLE_PWRON_PASSWORD
|
||||||
|
| (1 << 6)
|
||||||
|
#endif
|
||||||
|
#ifdef ENABLE_DTMF_CALLING
|
||||||
|
| (1 << 7)
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
|
||||||
|
buf[1] = 0
|
||||||
|
#ifdef ENABLE_FLASHLIGHT
|
||||||
|
| (1 << 0)
|
||||||
|
#endif
|
||||||
|
#ifdef ENABLE_WIDE_RX
|
||||||
|
| (1 << 1)
|
||||||
|
#endif
|
||||||
|
#ifdef ENABLE_BYP_RAW_DEMODULATORS
|
||||||
|
| (1 << 2)
|
||||||
|
#endif
|
||||||
|
#ifdef ENABLE_BLMIN_TMP_OFF
|
||||||
|
| (1 << 3)
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
EEPROM_WriteBuffer(0x1FF0, buf);
|
||||||
|
}
|
@@ -267,5 +267,6 @@ void SETTINGS_SaveChannelName(uint8_t channel, const char * name);
|
|||||||
void SETTINGS_SaveChannel(uint8_t Channel, uint8_t VFO, const VFO_Info_t *pVFO, uint8_t Mode);
|
void SETTINGS_SaveChannel(uint8_t Channel, uint8_t VFO, const VFO_Info_t *pVFO, uint8_t Mode);
|
||||||
void SETTINGS_SaveBatteryCalibration(const uint16_t * batteryCalibration);
|
void SETTINGS_SaveBatteryCalibration(const uint16_t * batteryCalibration);
|
||||||
void SETTINGS_UpdateChannel(uint8_t channel, const VFO_Info_t *pVFO, bool keep);
|
void SETTINGS_UpdateChannel(uint8_t channel, const VFO_Info_t *pVFO, bool keep);
|
||||||
|
void SETTINGS_WriteBuildOptions(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user