SettingsAccess

Struct SettingsAccess 

Source
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>

Source

pub fn raw(&self) -> Option<&[u8]>

Get the raw system settings bytes (0x0000-0x1FFF).

Returns None if the image is too small.

Source

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.

Source

pub fn model_name(&self) -> String

Get the internal model name (up to 16 characters).

Stored at MCP offset 0x11D0.

Source

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.

Source

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.

Source

pub fn key_beep(&self) -> bool

Read key beep setting (0=off, 1=on).

MCP offset 0x1071.

Source

pub fn beep_volume(&self) -> u8

Read beep volume (1-7, 0 if unreadable).

MCP offset 0x1072.

Source

pub fn backlight(&self) -> u8

Read LCD backlight control setting (0 if unreadable).

MCP offset 0x1069.

Source

pub fn auto_power_off(&self) -> AutoPowerOff

Read auto power off setting.

MCP offset 0x10D0.

Source

pub fn battery_saver(&self) -> bool

Read battery saver setting.

MCP offset 0x10C0.

Source

pub fn key_lock_type(&self) -> KeyLockType

Read key lock type.

MCP offset 0x1061.

Source

pub fn display_units(&self) -> DisplayUnits

Read display unit settings.

MCP offsets 0x1077 (speed/distance), 0x1083 (altitude/rain), 0x1084 (temperature).

Source

pub fn language(&self) -> Language

Read language setting.

MCP offset 0x1006.

Source

pub fn vox_enabled(&self) -> bool

Read VOX enabled setting (0=off, 1=on).

MCP offset 0x101B.

Source

pub fn vox_gain(&self) -> u8

Read VOX gain (0-9, 0 if unreadable).

MCP offset 0x101C.

Source

pub fn vox_delay(&self) -> u8

Read VOX delay (in 100 ms units, 0 if unreadable).

MCP offset 0x101D.

Source

pub fn squelch_a(&self) -> u8

Read squelch level for Band A (0-6, 0 if unreadable).

MCP offset 0x100D.

Source

pub fn squelch_b(&self) -> u8

Read squelch level for Band B (0-6, 0 if unreadable).

MCP offset 0x100E.

Source

pub fn fm_narrow(&self) -> u8

Read FM narrow setting (0 if unreadable).

MCP offset 0x100F.

Source

pub fn ssb_high_cut(&self) -> u8

Read SSB high-cut filter setting (0 if unreadable).

MCP offset 0x1011.

Source

pub fn cw_high_cut(&self) -> u8

Read CW high-cut filter setting (0 if unreadable).

MCP offset 0x1012.

Source

pub fn am_high_cut(&self) -> u8

Read AM high-cut filter setting (0 if unreadable).

MCP offset 0x1013.

Source

pub fn auto_filter(&self) -> u8

Read auto filter setting (0 if unreadable).

MCP offset 0x100C.

Source

pub fn scan_resume(&self) -> u8

Read scan resume setting (0 if unreadable).

MCP offset 0x1007.

Source

pub fn digital_scan_resume(&self) -> u8

Read digital scan resume setting (0 if unreadable).

MCP offset 0x1008.

Source

pub fn scan_restart_time(&self) -> u8

Read scan restart time (0 if unreadable).

MCP offset 0x1009.

Source

pub fn scan_restart_carrier(&self) -> u8

Read scan restart carrier setting (0 if unreadable).

MCP offset 0x100A.

Source

pub fn timeout_timer(&self) -> u8

Read timeout timer setting (0 if unreadable).

MCP offset 0x1018.

Source

pub fn tx_inhibit(&self) -> bool

Read TX inhibit setting (false if unreadable).

MCP offset 0x1019.

Source

pub fn beat_shift(&self) -> bool

Read beat shift setting (false if unreadable).

MCP offset 0x101A.

Source

pub fn vox_tx_on_busy(&self) -> bool

Read VOX TX-on-busy setting (false if unreadable).

MCP offset 0x101E.

Source

pub fn cw_break_in(&self) -> bool

Read CW break-in setting (false if unreadable).

MCP offset 0x101F.

Source

pub fn cw_delay_time(&self) -> u8

Read CW delay time (0 if unreadable).

MCP offset 0x1020.

Source

pub fn cw_pitch(&self) -> u8

Read CW pitch (0 if unreadable).

MCP offset 0x1021.

Source

pub fn dtmf_speed(&self) -> u8

Read DTMF speed (0 if unreadable).

MCP offset 0x1024.

Source

pub fn dtmf_pause_time(&self) -> u8

Read DTMF pause time (0 if unreadable).

MCP offset 0x1026.

Source

pub fn dtmf_tx_hold(&self) -> bool

Read DTMF TX hold setting (false if unreadable).

MCP offset 0x1027.

Source

pub fn repeater_auto_offset(&self) -> bool

Read repeater auto offset setting (false if unreadable).

MCP offset 0x1030.

Source

pub fn repeater_call_key(&self) -> u8

Read repeater call key setting (0 if unreadable).

MCP offset 0x1031.

Source

pub fn mic_sensitivity(&self) -> u8

Read microphone sensitivity (0 if unreadable).

MCP offset 0x1040.

Source

pub fn pf_key1(&self) -> u8

Read PF key 1 assignment (0 if unreadable).

MCP offset 0x1041.

Source

pub fn pf_key2(&self) -> u8

Read PF key 2 assignment (0 if unreadable).

MCP offset 0x1042.

Source

pub fn lock_key_a(&self) -> bool

Read lock key A setting (false if unreadable).

MCP offset 0x1062.

Source

pub fn lock_key_b(&self) -> bool

Read lock key B setting (false if unreadable).

MCP offset 0x1063.

Source

pub fn lock_key_c(&self) -> bool

Read lock key C setting (false if unreadable).

MCP offset 0x1064.

Source

pub fn lock_key_ptt(&self) -> bool

Read lock PTT key setting (false if unreadable).

MCP offset 0x1065.

Source

pub fn aprs_lock(&self) -> bool

Read APRS lock setting (false if unreadable).

MCP offset 0x1097.

Source

pub fn dual_display_size(&self) -> u8

Read dual display size (0 if unreadable).

MCP offset 0x1066.

Source

pub fn display_area(&self) -> u8

Read display area setting (0 if unreadable).

MCP offset 0x1067.

Source

pub fn info_line(&self) -> u8

Read info line setting (0 if unreadable).

MCP offset 0x1068.

Source

pub fn backlight_control(&self) -> u8

Read backlight control setting (0 if unreadable).

MCP offset 0x1069.

Source

pub fn backlight_timer(&self) -> u8

Read backlight timer (0 if unreadable).

MCP offset 0x106A.

Source

pub fn display_hold_time(&self) -> u8

Read display hold time (0 if unreadable).

MCP offset 0x106B.

Source

pub fn display_method(&self) -> u8

Read display method (0 if unreadable).

MCP offset 0x106C.

Source

pub fn power_on_display(&self) -> u8

Read power-on display setting (0 if unreadable).

MCP offset 0x106D.

Source

pub fn emr_volume_level(&self) -> u8

Read EMR volume level (0 if unreadable).

MCP offset 0x106E.

Source

pub fn auto_mute_return_time(&self) -> u8

Read auto mute return time (0 if unreadable).

MCP offset 0x106F.

Source

pub fn announce(&self) -> bool

Read announce setting (false if unreadable).

MCP offset 0x1070.

Source

pub fn voice_language(&self) -> u8

Read voice language setting (0 if unreadable).

MCP offset 0x1073.

Source

pub fn voice_volume(&self) -> u8

Read voice volume (0 if unreadable).

MCP offset 0x1074.

Source

pub fn voice_speed(&self) -> u8

Read voice speed (0 if unreadable).

MCP offset 0x1075.

Source

pub fn volume_lock(&self) -> bool

Read volume lock setting (false if unreadable).

MCP offset 0x1076.

Source

pub fn bt_auto_connect(&self) -> bool

Read Bluetooth auto-connect setting (false if unreadable).

MCP offset 0x1079.

Source

pub fn gps_bt_interface(&self) -> u8

Read GPS Bluetooth interface setting (0 if unreadable).

MCP offset 0x1080.

Source

pub fn pc_output_mode(&self) -> u8

Read PC output mode (0 if unreadable).

MCP offset 0x1085.

Source

pub fn aprs_usb_mode(&self) -> u8

Read APRS USB mode (0 if unreadable).

MCP offset 0x1086.

Source

pub fn usb_audio_output(&self) -> bool

Read USB audio output setting (false if unreadable).

MCP offset 0x1094.

Read internet link setting (false if unreadable).

MCP offset 0x1095.

Source

pub fn power_on_message_flag(&self) -> bool

Read power-on message flag (false if unreadable).

MCP offset 0x1087.

Source

pub fn dual_band_mcp(&self) -> bool

Read dual band MCP setting (false if unreadable).

MCP offset 0x1096.

Source

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.

Source

pub fn attenuator_a(&self) -> bool

Read Band A attenuator setting (0=off, 1=on).

MCP offset 0x035C.

Source

pub fn dual_band(&self) -> bool

Read dual-band display setting (0=single, 1=dual).

MCP offset 0x0396.

Source

pub fn lock(&self) -> bool

Read lock setting (0=unlocked, 1=locked).

MCP offset 0x1060.

Source

pub fn bluetooth(&self) -> bool

Read Bluetooth on/off setting (0=off, 1=on).

MCP offset 0x1078.

Source

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:

IndexBand
0Band A VHF
1Band A 220 MHz
2Band A UHF
3Band B VHF
4Band B 220 MHz
5Band B UHF
Source

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.

Source

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.

Source

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.

Source

pub fn vfo_count(&self) -> usize

Get the number of non-empty VFO entries (out of 6).

Source

pub fn key_lock_type_raw(&self) -> u8

Read key lock type as raw byte (0=KeyOnly, 1=KeyAndPtt, 2=KeyPttAndDial).

MCP offset 0x1061.

Source

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.

Source

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.

Source

pub fn altitude_rain_unit_raw(&self) -> u8

Read altitude/rain unit as raw byte (0=ft/in, 1=m/mm).

MCP offset 0x1083.

Source

pub fn temperature_unit_raw(&self) -> u8

Read temperature unit as raw byte (0=°F, 1=°C).

MCP offset 0x1084.

Trait Implementations§

Source§

impl<'a> Debug for SettingsAccess<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for SettingsAccess<'a>

§

impl<'a> RefUnwindSafe for SettingsAccess<'a>

§

impl<'a> Send for SettingsAccess<'a>

§

impl<'a> Sync for SettingsAccess<'a>

§

impl<'a> Unpin for SettingsAccess<'a>

§

impl<'a> UnwindSafe for SettingsAccess<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more