First try to define the MEM_FORMAT variable.
This commit is contained in:
parent
9994cb40d3
commit
ef8c21b819
1 changed files with 178 additions and 191 deletions
|
@ -61,219 +61,206 @@ DEBUG_SHOW_MEMORY_ACTIONS = False
|
|||
MEM_FORMAT = """
|
||||
#seekto 0x0000;
|
||||
struct {
|
||||
ul32 freq;
|
||||
ul32 offset;
|
||||
u8 rxcode;
|
||||
u8 txcode;
|
||||
// FREQ_Config_t start
|
||||
u32 freq;
|
||||
// DCS_CodeType_t
|
||||
u8 freq_CodeType;
|
||||
u8 freq_Code;
|
||||
u8 freq_Padding[2];
|
||||
// end
|
||||
// end
|
||||
// FREQ_Config_t start
|
||||
u32 offset;
|
||||
// DCS_CodeType_t start
|
||||
u8 offset_CodeType;
|
||||
u8 offset_Code;
|
||||
u8 offset_Padding[2];
|
||||
// end
|
||||
// end
|
||||
|
||||
u8 unknown1:2,
|
||||
txcodeflag:2,
|
||||
unknown2:2,
|
||||
rxcodeflag:2;
|
||||
u8 pRX;
|
||||
u8 pTX;
|
||||
|
||||
u32 TX_OFFSET_FREQUENCY;
|
||||
u16 StepFrequency;
|
||||
|
||||
//u8 flags1;
|
||||
u8 flags1_unknown7:1,
|
||||
flags1_unknown6:1,
|
||||
enable_extramodes:1,
|
||||
enable_am:1,
|
||||
flags1_unknown3:1,
|
||||
is_in_scanlist:1,
|
||||
shift:2;
|
||||
u8 SquelchOpenRSSIThresh;
|
||||
u8 SquelchOpenNoiseThresh;
|
||||
u8 SquelchCloseGlitchThresh;
|
||||
u8 SquelchCloseRSSIThresh;
|
||||
u8 SquelchCloseNoiseThresh;
|
||||
u8 SquelchOpenGlitchThresh;
|
||||
|
||||
//u8 flags2;
|
||||
u8 flags2_unknown7:1,
|
||||
flags2_unknown6:1,
|
||||
bclo:1,
|
||||
txpower:2,
|
||||
bandwidth:2,
|
||||
freq_reverse:1;
|
||||
// STEP_Setting_t
|
||||
u16 STEP_SETTING;
|
||||
|
||||
//u8 dtmf_flags;
|
||||
u8 dtmf_flags_unknown7:1,
|
||||
dtmf_flags_unknown6:1,
|
||||
dtmf_pttid:5,
|
||||
dtmf_decode:1;
|
||||
u8 OUTPUT_POWER;
|
||||
u8 TXP_CalculatedSetting;
|
||||
bool FrequencyReverse;
|
||||
|
||||
u8 SCRAMBLING_TYPE;
|
||||
u8 CHANNEL_BANDWIDTH;
|
||||
|
||||
u8 step;
|
||||
u8 scrambler;
|
||||
} channel[200];
|
||||
u8 SCANLIST1_PARTICIPATION;
|
||||
u8 SCANLIST2_PARTICIPATION;
|
||||
|
||||
#seekto 0xd60;
|
||||
u8 Band;
|
||||
|
||||
u8 DTMF_DECODING_ENABLE;
|
||||
|
||||
// PTT_ID_t
|
||||
u8 DTMF_PTT_ID_TX_MODE;
|
||||
|
||||
u8 BUSY_CHANNEL_LOCK;
|
||||
|
||||
// ModulationMode_t
|
||||
u8 Modulation;
|
||||
|
||||
u8 Compander;
|
||||
|
||||
char name[16];
|
||||
} channel[207];
|
||||
|
||||
#seekto 0x0D60;
|
||||
struct {
|
||||
u8 is_scanlist1:1,
|
||||
is_scanlist2:1,
|
||||
unknown1:1,
|
||||
unknown2:1,
|
||||
is_free:1,
|
||||
band:3;
|
||||
} channel_attributes[200];
|
||||
// ChannelAttributes_t start
|
||||
u8 band;
|
||||
u8 compander;
|
||||
u8 is_scanlist2;
|
||||
u8 is_scanlist1;
|
||||
// end
|
||||
} channel_attributes[207];
|
||||
|
||||
#seekto 0xd7e;
|
||||
u8 compander;
|
||||
#seekto 0x0E70;
|
||||
u8 CHAN_1_CALL;
|
||||
u8 SQUELCH_LEVEL;
|
||||
u8 TX_TIMEOUT_TIMER;
|
||||
u8 NOAA_AUTO_SCAN;
|
||||
u8 KEY_LOCK;
|
||||
u8 VOX_SWITCH;
|
||||
u8 VOX_LEVEL;
|
||||
u8 MIC_SENSITIVITY;
|
||||
|
||||
#seekto 0xe40;
|
||||
ul16 fmfreq[20];
|
||||
|
||||
#seekto 0xe70;
|
||||
u8 call_channel;
|
||||
u8 squelch_a;
|
||||
u8 max_talk_time;
|
||||
u8 squelch_b;
|
||||
u8 key_lock;
|
||||
u8 vox_switch;
|
||||
u8 vox_level;
|
||||
u8 mic_gain;
|
||||
u8 unknown3;
|
||||
u8 channel_display_mode;
|
||||
u8 crossband;
|
||||
u8 battery_save;
|
||||
u8 dual_watch;
|
||||
u8 backlight_auto_mode;
|
||||
u8 tail_note_elimination;
|
||||
u8 vfo_open;
|
||||
|
||||
#seekto 0xe90;
|
||||
u8 beep_control;
|
||||
u8 key1_shortpress_action;
|
||||
u8 key1_longpress_action;
|
||||
u8 key2_shortpress_action;
|
||||
u8 key2_longpress_action;
|
||||
u8 scan_resume_mode;
|
||||
u8 auto_keypad_lock;
|
||||
u8 power_on_dispmode;
|
||||
u8 password[4];
|
||||
|
||||
#seekto 0xea0;
|
||||
u8 keypad_tone;
|
||||
u8 language;
|
||||
|
||||
#seekto 0xea0;
|
||||
char qrz_label[8];
|
||||
|
||||
#seekto 0xea8;
|
||||
u8 alarm_mode;
|
||||
u8 reminding_of_end_talk;
|
||||
u8 repeater_tail_elimination;
|
||||
|
||||
#seekto 0xeab;
|
||||
u8 bands_tx;
|
||||
|
||||
#seekto 0xeb0;
|
||||
char logo_line1[16];
|
||||
char logo_line2[16];
|
||||
|
||||
#seekto 0xed0;
|
||||
#seekto 0x0E78;
|
||||
struct {
|
||||
u8 side_tone;
|
||||
char separate_code;
|
||||
char group_call_code;
|
||||
u8 decode_response;
|
||||
u8 auto_reset_time;
|
||||
u8 preload_time;
|
||||
u8 first_code_persist_time;
|
||||
u8 hash_persist_time;
|
||||
u8 code_persist_time;
|
||||
u8 code_interval_time;
|
||||
u8 permit_remote_kill;
|
||||
} dtmf_settings;
|
||||
u8 BACKLIGHT_MIN:4, BACKLIGHT_MAX:4;
|
||||
} backlight;
|
||||
u8 CHANNEL_DISPLAY_MODE;
|
||||
u8 CROSS_BAND_RX_TX;
|
||||
u8 BATTERY_SAVE;
|
||||
u8 DUAL_WATCH;
|
||||
u8 BACKLIGHT_TIME;
|
||||
u8 TAIL_TONE_ELIMINATION;
|
||||
u8 VFO_OPEN;
|
||||
|
||||
#seekto 0xee0;
|
||||
#seekto 0x0E80;
|
||||
u8 ScreenChannel[0];
|
||||
u8 ScreenChannel[1];
|
||||
u8 MrChannel[0];
|
||||
u8 MrChannel[1];
|
||||
u8 FreqChannel[0];
|
||||
u8 FreqChannel[1];
|
||||
u8 NoaaChannel[0];
|
||||
u8 NoaaChannel[1];
|
||||
|
||||
#seekto 0x0E90;
|
||||
struct {
|
||||
char dtmf_local_code[8];
|
||||
char kill_code[5];
|
||||
char unused1[3];
|
||||
char revive_code[5];
|
||||
char unused2[3];
|
||||
char dtmf_up_code[8];
|
||||
char unused3[8];
|
||||
char dtmf_down_code[8];
|
||||
} dtmf_settings_numbers;
|
||||
u8 BEEP_CONTROL:1, KEY_M_LONG_PRESS_ACTION: 7;
|
||||
} beep_key_long_press;
|
||||
|
||||
#seekto 0xf18;
|
||||
u8 scanlist_default;
|
||||
u8 scanlist1_priority_scan;
|
||||
u8 scanlist1_priority_ch1;
|
||||
u8 scanlist1_priority_ch2;
|
||||
u8 scanlist2_priority_scan;
|
||||
u8 scanlist2_priority_ch1;
|
||||
u8 scanlist2_priority_ch2;
|
||||
u8 scanlist_unknown_0xff;
|
||||
u8 KEY_1_SHORT_PRESS_ACTION;
|
||||
u8 KEY_1_LONG_PRESS_ACTION;
|
||||
u8 KEY_2_SHORT_PRESS_ACTION;
|
||||
u8 KEY_2_LONG_PRESS_ACTION;
|
||||
u8 SCAN_RESUME_MODE;
|
||||
u8 AUTO_KEYPAD_LOCK;
|
||||
u8 POWER_ON_DISPLAY_MODE;
|
||||
|
||||
|
||||
#seekto 0xf40;
|
||||
#seekto 0x0E98
|
||||
struct {
|
||||
u8 flock;
|
||||
u8 tx350;
|
||||
u8 killed;
|
||||
u8 tx200;
|
||||
u8 tx500;
|
||||
u32 POWER_ON_PASSWORD:4, unknown_1:4;
|
||||
} password;
|
||||
|
||||
#seekto 0x0EA0;
|
||||
u8 VOICE_PROMPT;
|
||||
u8 S0_LEVEL;
|
||||
u8 S9_LEVEL;
|
||||
|
||||
#seekto 0x0EA8;
|
||||
u8 ALARM_MODE;
|
||||
u8 ROGER;
|
||||
u8 REPEATER_TAIL_TONE_ELIMINATION;
|
||||
u8 TX_VFO;
|
||||
u8 BATTERY_TYPE;
|
||||
|
||||
#seekto 0x0EB0;
|
||||
char EEPROM_WELCOMESTRING1[16];
|
||||
char EEPROM_WELCOMESTRING2[16];
|
||||
|
||||
#seekto 0x0ED0;
|
||||
u8 DTMF_SIDE_TONE;
|
||||
char DTMF_SEPARATE_CODE;
|
||||
char DTMF_GROUP_CALL_CODE;
|
||||
u8 DTMF_DECODE_RESPONSE;
|
||||
u8 DTMF_auto_reset_time;
|
||||
u8 DTMF_PRELOAD_TIME;
|
||||
u8 DTMF_FIRST_CODE_PERSIST_TIME;
|
||||
u8 DTMF_HASH_CODE_PERSIST_TIME;
|
||||
u8 DTMF_CODE_PERSIST_TIME;
|
||||
u8 DTMF_CODE_INTERVAL_TIME;
|
||||
u8 PERMIT_REMOTE_KILL;
|
||||
|
||||
#seekto 0x0EE0;
|
||||
char ANI_DTMF_ID[8];
|
||||
|
||||
#seekto 0x0EE8;
|
||||
char KILL_CODE[8];
|
||||
|
||||
#seekto 0x0EF0;
|
||||
char REVIVE_CODE[8];
|
||||
|
||||
#seekto 0x0EF8;
|
||||
char DTMF_UP_CODE[16];
|
||||
|
||||
#seekto 0x0F08;
|
||||
char DTMF_DOWN_CODE[16];
|
||||
|
||||
#seekto 0x0F18;
|
||||
u8 SCANLIST_DEFAULT;
|
||||
u8 SCANLIST1_ENABLED;
|
||||
u8 SCANLIST1_PRIORITY_CH1;
|
||||
u8 SCANLIST1_PRIORITY_CH2;
|
||||
u8 SCANLIST2_ENABLED;
|
||||
u8 SCANLIST2_PRIORITY_CH1;
|
||||
u8 SCANLIST2_PRIORITY_CH2;
|
||||
|
||||
#seekto 0x0F30;
|
||||
bool bHasCustomAesKey;
|
||||
|
||||
#seekto 0x0F40;
|
||||
u8 F_LOCK;
|
||||
u8 350TX;
|
||||
u8 KILLED;
|
||||
u8 200TX;
|
||||
u8 350EN;
|
||||
u8 en350;
|
||||
} lock;
|
||||
u8 ScrambleEnable;
|
||||
u8 live_DTMF_decoder_bat_txt_micbar_am_fix_bl_txrx;
|
||||
|
||||
#seekto 0xf46;
|
||||
u8 beacon;
|
||||
#seekto 0x1D50;
|
||||
u8 CEC_LiveSeekMode;
|
||||
u8 CW_KEYTYPE;
|
||||
u8 CW_SPEED;
|
||||
u8 CW_TONE;
|
||||
|
||||
#seekto 0xf47;
|
||||
u8 micbar;
|
||||
|
||||
#seekto 0xf47;
|
||||
u8 bl_mode;
|
||||
|
||||
#seekto 0xf47;
|
||||
u8 tx_enable;
|
||||
|
||||
#seekto 0xf4f;
|
||||
u8 single_vfo;
|
||||
|
||||
#seekto 0xf4f;
|
||||
u8 signal_meter;
|
||||
|
||||
#seekto 0xf4f;
|
||||
u8 satcom;
|
||||
|
||||
#seekto 0xf4f;
|
||||
u8 upconv;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#seekto 0xf50;
|
||||
#seekto 0x1C00;
|
||||
struct {
|
||||
char name[16];
|
||||
} channelname[200];
|
||||
|
||||
#seekto 0x1c00;
|
||||
struct {
|
||||
char name[8];
|
||||
char number[3];
|
||||
char unused_00[5];
|
||||
char name[8];
|
||||
char number[3];
|
||||
char unused_00[5];
|
||||
} dtmfcontact[16];
|
||||
|
||||
#seekto 0x1ed0;
|
||||
struct {
|
||||
struct {
|
||||
u8 start;
|
||||
u8 mid;
|
||||
u8 end;
|
||||
} low;
|
||||
struct {
|
||||
u8 start;
|
||||
u8 mid;
|
||||
u8 end;
|
||||
} medium;
|
||||
struct {
|
||||
u8 start;
|
||||
u8 mid;
|
||||
u8 end;
|
||||
} high;
|
||||
u8 unused_00[7];
|
||||
} perbandpowersettings[7];
|
||||
|
||||
#seekto 0x1f40;
|
||||
ul16 battery_level[6];
|
||||
"""
|
||||
|
||||
# bits that we will save from the channel structure (mostly unknown)
|
||||
SAVE_MASK_0A = 0b11001100
|
||||
SAVE_MASK_0B = 0b11101100
|
||||
|
|
Loading…
Reference in a new issue