pub struct SettingsAccess<'a> { /* private fields */ }Expand description
Read-only access to the system settings region.
Provides raw byte access and typed field accessors for the settings
region at bytes 0x0000-0x1FFF. Hardware-verified offsets are
confirmed on a real TH-D75; remaining offsets are from firmware
analysis and marked accordingly.
Implementations§
Source§impl<'a> SettingsAccess<'a>
impl<'a> SettingsAccess<'a>
Sourcepub fn raw(&self) -> Option<&[u8]>
pub fn raw(&self) -> Option<&[u8]>
Get the raw system settings bytes (0x0000-0x1FFF).
Returns None if the image is too small.
Sourcepub fn power_on_message(&self) -> String
pub fn power_on_message(&self) -> String
Get the power-on message (up to 16 characters).
Stored at MCP offset 0x11C0. Returns the null-terminated ASCII
string.
Sourcepub fn model_name(&self) -> String
pub fn model_name(&self) -> String
Get the internal model name (up to 16 characters).
Stored at MCP offset 0x11D0.
Sourcepub fn callsign_raw(&self, len: usize) -> Option<&[u8]>
pub fn callsign_raw(&self, len: usize) -> Option<&[u8]>
Get the raw callsign data at MCP offset 0x1300.
The exact structure of this region is not yet fully mapped.
Returns up to len bytes, or None if out of bounds.
Sourcepub fn read_bytes(&self, offset: usize, len: usize) -> Option<&[u8]>
pub fn read_bytes(&self, offset: usize, len: usize) -> Option<&[u8]>
Read an arbitrary byte range from the settings region.
The offset is relative to the start of the image (MCP byte
address). Returns None if the range extends past the image.
Sourcepub fn beep_volume(&self) -> u8
pub fn beep_volume(&self) -> u8
Read beep volume (1-7, 0 if unreadable).
MCP offset 0x1072.
Sourcepub fn backlight(&self) -> u8
pub fn backlight(&self) -> u8
Read LCD backlight control setting (0 if unreadable).
MCP offset 0x1069.
Sourcepub fn auto_power_off(&self) -> AutoPowerOff
pub fn auto_power_off(&self) -> AutoPowerOff
Read auto power off setting.
MCP offset 0x10D0.
Sourcepub fn battery_saver(&self) -> bool
pub fn battery_saver(&self) -> bool
Read battery saver setting.
MCP offset 0x10C0.
Sourcepub fn key_lock_type(&self) -> KeyLockType
pub fn key_lock_type(&self) -> KeyLockType
Read key lock type.
MCP offset 0x1061.
Sourcepub fn display_units(&self) -> DisplayUnits
pub fn display_units(&self) -> DisplayUnits
Read display unit settings.
MCP offsets 0x1077 (speed/distance), 0x1083 (altitude/rain),
0x1084 (temperature).
Sourcepub fn vox_enabled(&self) -> bool
pub fn vox_enabled(&self) -> bool
Read VOX enabled setting (0=off, 1=on).
MCP offset 0x101B.
Sourcepub fn vox_delay(&self) -> u8
pub fn vox_delay(&self) -> u8
Read VOX delay (in 100 ms units, 0 if unreadable).
MCP offset 0x101D.
Sourcepub fn squelch_a(&self) -> u8
pub fn squelch_a(&self) -> u8
Read squelch level for Band A (0-6, 0 if unreadable).
MCP offset 0x100D.
Sourcepub fn squelch_b(&self) -> u8
pub fn squelch_b(&self) -> u8
Read squelch level for Band B (0-6, 0 if unreadable).
MCP offset 0x100E.
Sourcepub fn ssb_high_cut(&self) -> u8
pub fn ssb_high_cut(&self) -> u8
Read SSB high-cut filter setting (0 if unreadable).
MCP offset 0x1011.
Sourcepub fn cw_high_cut(&self) -> u8
pub fn cw_high_cut(&self) -> u8
Read CW high-cut filter setting (0 if unreadable).
MCP offset 0x1012.
Sourcepub fn am_high_cut(&self) -> u8
pub fn am_high_cut(&self) -> u8
Read AM high-cut filter setting (0 if unreadable).
MCP offset 0x1013.
Sourcepub fn auto_filter(&self) -> u8
pub fn auto_filter(&self) -> u8
Read auto filter setting (0 if unreadable).
MCP offset 0x100C.
Sourcepub fn scan_resume(&self) -> u8
pub fn scan_resume(&self) -> u8
Read scan resume setting (0 if unreadable).
MCP offset 0x1007.
Sourcepub fn digital_scan_resume(&self) -> u8
pub fn digital_scan_resume(&self) -> u8
Read digital scan resume setting (0 if unreadable).
MCP offset 0x1008.
Sourcepub fn scan_restart_time(&self) -> u8
pub fn scan_restart_time(&self) -> u8
Read scan restart time (0 if unreadable).
MCP offset 0x1009.
Sourcepub fn scan_restart_carrier(&self) -> u8
pub fn scan_restart_carrier(&self) -> u8
Read scan restart carrier setting (0 if unreadable).
MCP offset 0x100A.
Sourcepub fn timeout_timer(&self) -> u8
pub fn timeout_timer(&self) -> u8
Read timeout timer setting (0 if unreadable).
MCP offset 0x1018.
Sourcepub fn tx_inhibit(&self) -> bool
pub fn tx_inhibit(&self) -> bool
Read TX inhibit setting (false if unreadable).
MCP offset 0x1019.
Sourcepub fn beat_shift(&self) -> bool
pub fn beat_shift(&self) -> bool
Read beat shift setting (false if unreadable).
MCP offset 0x101A.
Sourcepub fn vox_tx_on_busy(&self) -> bool
pub fn vox_tx_on_busy(&self) -> bool
Read VOX TX-on-busy setting (false if unreadable).
MCP offset 0x101E.
Sourcepub fn cw_break_in(&self) -> bool
pub fn cw_break_in(&self) -> bool
Read CW break-in setting (false if unreadable).
MCP offset 0x101F.
Sourcepub fn cw_delay_time(&self) -> u8
pub fn cw_delay_time(&self) -> u8
Read CW delay time (0 if unreadable).
MCP offset 0x1020.
Sourcepub fn dtmf_speed(&self) -> u8
pub fn dtmf_speed(&self) -> u8
Read DTMF speed (0 if unreadable).
MCP offset 0x1024.
Sourcepub fn dtmf_pause_time(&self) -> u8
pub fn dtmf_pause_time(&self) -> u8
Read DTMF pause time (0 if unreadable).
MCP offset 0x1026.
Sourcepub fn dtmf_tx_hold(&self) -> bool
pub fn dtmf_tx_hold(&self) -> bool
Read DTMF TX hold setting (false if unreadable).
MCP offset 0x1027.
Sourcepub fn repeater_auto_offset(&self) -> bool
pub fn repeater_auto_offset(&self) -> bool
Read repeater auto offset setting (false if unreadable).
MCP offset 0x1030.
Sourcepub fn repeater_call_key(&self) -> u8
pub fn repeater_call_key(&self) -> u8
Read repeater call key setting (0 if unreadable).
MCP offset 0x1031.
Sourcepub fn mic_sensitivity(&self) -> u8
pub fn mic_sensitivity(&self) -> u8
Read microphone sensitivity (0 if unreadable).
MCP offset 0x1040.
Sourcepub fn lock_key_a(&self) -> bool
pub fn lock_key_a(&self) -> bool
Read lock key A setting (false if unreadable).
MCP offset 0x1062.
Sourcepub fn lock_key_b(&self) -> bool
pub fn lock_key_b(&self) -> bool
Read lock key B setting (false if unreadable).
MCP offset 0x1063.
Sourcepub fn lock_key_c(&self) -> bool
pub fn lock_key_c(&self) -> bool
Read lock key C setting (false if unreadable).
MCP offset 0x1064.
Sourcepub fn lock_key_ptt(&self) -> bool
pub fn lock_key_ptt(&self) -> bool
Read lock PTT key setting (false if unreadable).
MCP offset 0x1065.
Sourcepub fn aprs_lock(&self) -> bool
pub fn aprs_lock(&self) -> bool
Read APRS lock setting (false if unreadable).
MCP offset 0x1097.
Sourcepub fn dual_display_size(&self) -> u8
pub fn dual_display_size(&self) -> u8
Read dual display size (0 if unreadable).
MCP offset 0x1066.
Sourcepub fn display_area(&self) -> u8
pub fn display_area(&self) -> u8
Read display area setting (0 if unreadable).
MCP offset 0x1067.
Sourcepub fn backlight_control(&self) -> u8
pub fn backlight_control(&self) -> u8
Read backlight control setting (0 if unreadable).
MCP offset 0x1069.
Sourcepub fn backlight_timer(&self) -> u8
pub fn backlight_timer(&self) -> u8
Read backlight timer (0 if unreadable).
MCP offset 0x106A.
Sourcepub fn display_hold_time(&self) -> u8
pub fn display_hold_time(&self) -> u8
Read display hold time (0 if unreadable).
MCP offset 0x106B.
Sourcepub fn display_method(&self) -> u8
pub fn display_method(&self) -> u8
Read display method (0 if unreadable).
MCP offset 0x106C.
Sourcepub fn power_on_display(&self) -> u8
pub fn power_on_display(&self) -> u8
Read power-on display setting (0 if unreadable).
MCP offset 0x106D.
Sourcepub fn emr_volume_level(&self) -> u8
pub fn emr_volume_level(&self) -> u8
Read EMR volume level (0 if unreadable).
MCP offset 0x106E.
Sourcepub fn auto_mute_return_time(&self) -> u8
pub fn auto_mute_return_time(&self) -> u8
Read auto mute return time (0 if unreadable).
MCP offset 0x106F.
Sourcepub fn voice_language(&self) -> u8
pub fn voice_language(&self) -> u8
Read voice language setting (0 if unreadable).
MCP offset 0x1073.
Sourcepub fn voice_volume(&self) -> u8
pub fn voice_volume(&self) -> u8
Read voice volume (0 if unreadable).
MCP offset 0x1074.
Sourcepub fn voice_speed(&self) -> u8
pub fn voice_speed(&self) -> u8
Read voice speed (0 if unreadable).
MCP offset 0x1075.
Sourcepub fn volume_lock(&self) -> bool
pub fn volume_lock(&self) -> bool
Read volume lock setting (false if unreadable).
MCP offset 0x1076.
Sourcepub fn bt_auto_connect(&self) -> bool
pub fn bt_auto_connect(&self) -> bool
Read Bluetooth auto-connect setting (false if unreadable).
MCP offset 0x1079.
Sourcepub fn gps_bt_interface(&self) -> u8
pub fn gps_bt_interface(&self) -> u8
Read GPS Bluetooth interface setting (0 if unreadable).
MCP offset 0x1080.
Sourcepub fn pc_output_mode(&self) -> u8
pub fn pc_output_mode(&self) -> u8
Read PC output mode (0 if unreadable).
MCP offset 0x1085.
Sourcepub fn aprs_usb_mode(&self) -> u8
pub fn aprs_usb_mode(&self) -> u8
Read APRS USB mode (0 if unreadable).
MCP offset 0x1086.
Sourcepub fn usb_audio_output(&self) -> bool
pub fn usb_audio_output(&self) -> bool
Read USB audio output setting (false if unreadable).
MCP offset 0x1094.
Sourcepub fn internet_link(&self) -> bool
pub fn internet_link(&self) -> bool
Read internet link setting (false if unreadable).
MCP offset 0x1095.
Sourcepub fn power_on_message_flag(&self) -> bool
pub fn power_on_message_flag(&self) -> bool
Read power-on message flag (false if unreadable).
MCP offset 0x1087.
Sourcepub fn dual_band_mcp(&self) -> bool
pub fn dual_band_mcp(&self) -> bool
Read dual band MCP setting (false if unreadable).
MCP offset 0x1096.
Sourcepub fn power_level_a(&self) -> PowerLevel
pub fn power_level_a(&self) -> PowerLevel
Read Band A power level.
MCP offset 0x0359.
Returns High if the byte is out of range or unreadable.
Sourcepub fn attenuator_a(&self) -> bool
pub fn attenuator_a(&self) -> bool
Read Band A attenuator setting (0=off, 1=on).
MCP offset 0x035C.
Sourcepub fn dual_band(&self) -> bool
pub fn dual_band(&self) -> bool
Read dual-band display setting (0=single, 1=dual).
MCP offset 0x0396.
Sourcepub fn bluetooth(&self) -> bool
pub fn bluetooth(&self) -> bool
Read Bluetooth on/off setting (0=off, 1=on).
MCP offset 0x1078.
Sourcepub fn vfo_raw(&self, index: usize) -> Option<&[u8]>
pub fn vfo_raw(&self, index: usize) -> Option<&[u8]>
Read the raw 40-byte VFO entry for a given index (0-5).
The VFO data block at 0x0020 contains 6 entries in the same
40-byte format as channel memory records. Returns None if the
index is out of range or the region extends past the image.
§VFO index mapping (estimated)
The exact band-to-index mapping needs confirmation via differential dump, but typical Kenwood convention is:
| Index | Band |
|---|---|
| 0 | Band A VHF |
| 1 | Band A 220 MHz |
| 2 | Band A UHF |
| 3 | Band B VHF |
| 4 | Band B 220 MHz |
| 5 | Band B UHF |
Sourcepub fn vfo_frequency(&self, index: usize) -> Option<Frequency>
pub fn vfo_frequency(&self, index: usize) -> Option<Frequency>
Read the RX frequency from a VFO entry (0-5).
Returns the frequency in Hz as a Frequency, or None if the
index is out of range or the VFO entry is empty (all 0xFF).
Located at 0x0020 + index * 40. Confirmed via memory dump.
Sourcepub fn vfo_mode(&self, index: usize) -> Option<MemoryMode>
pub fn vfo_mode(&self, index: usize) -> Option<MemoryMode>
Read the operating mode from a VFO entry (0-5).
Returns the flash-encoded mode, or None if the index is out of
range or the VFO entry is empty. The mode is in byte 0x09 bits
[6:4] of the 40-byte VFO record.
Located at 0x0020 + index * 40 + 0x09. Confirmed via memory dump.
Sourcepub fn vfo_tx_offset(&self, index: usize) -> Option<Frequency>
pub fn vfo_tx_offset(&self, index: usize) -> Option<Frequency>
Read the TX offset or split frequency from a VFO entry (0-5).
Returns the offset/split frequency in Hz, or None if the index
is out of range or the VFO entry is empty.
Located at 0x0020 + index * 40 + 0x04. Confirmed via memory dump.
Sourcepub fn key_lock_type_raw(&self) -> u8
pub fn key_lock_type_raw(&self) -> u8
Read key lock type as raw byte (0=KeyOnly, 1=KeyAndPtt, 2=KeyPttAndDial).
MCP offset 0x1061.
Sourcepub fn auto_power_off_raw(&self) -> u8
pub fn auto_power_off_raw(&self) -> u8
Read auto power off as raw byte (0=Off, 1=30m, 2=60m, 3=90m, 4=120m).
MCP offset 0x10D0.
Sourcepub fn speed_distance_unit_raw(&self) -> u8
pub fn speed_distance_unit_raw(&self) -> u8
Read speed/distance unit as raw byte (0=mph, 1=km/h, 2=knots).
MCP offset 0x1077.
Sourcepub fn altitude_rain_unit_raw(&self) -> u8
pub fn altitude_rain_unit_raw(&self) -> u8
Read altitude/rain unit as raw byte (0=ft/in, 1=m/mm).
MCP offset 0x1083.
Sourcepub fn temperature_unit_raw(&self) -> u8
pub fn temperature_unit_raw(&self) -> u8
Read temperature unit as raw byte (0=°F, 1=°C).
MCP offset 0x1084.