SettingsWriter

Struct SettingsWriter 

Source
pub struct SettingsWriter<'a> { /* private fields */ }
Expand description

Mutable access to the system settings region of the memory image.

Provides write methods for settings with verified offsets. Only settings with hardware-verified offsets have write accessors to prevent corrupting the memory image with unconfirmed offsets.

Implementations§

Source§

impl<'a> SettingsWriter<'a>

Source

pub fn set_backlight(&mut self, level: u8)

Set LCD backlight control setting.

MCP offset 0x1069.

Source

pub fn set_backlight_control(&mut self, value: u8)

Set backlight control (same as set_backlight, named for clarity).

MCP offset 0x1069.

Source

pub fn set_backlight_timer(&mut self, value: u8)

Set backlight timer.

MCP offset 0x106A.

Source

pub fn set_beep_volume(&mut self, volume: u8)

Set beep volume (1-7).

Values above 7 are clamped to 7.

MCP offset 0x1072.

Source

pub fn set_auto_power_off(&mut self, value: AutoPowerOff)

Set auto power off.

MCP offset 0x10D0.

Source

pub fn set_battery_saver(&mut self, enabled: bool)

Set battery saver on/off.

MCP offset 0x10C0.

Source

pub fn set_key_lock_type(&mut self, value: KeyLockType)

Set key lock type.

MCP offset 0x1061.

Source

pub fn set_language(&mut self, value: Language)

Set language.

MCP offset 0x1006.

Source

pub fn set_speed_distance_unit(&mut self, value: SpeedDistanceUnit)

Set speed/distance display unit.

MCP offset 0x1077.

Source

pub fn set_altitude_rain_unit(&mut self, value: AltitudeRainUnit)

Set altitude/rain display unit.

MCP offset 0x1083.

Source

pub fn set_temperature_unit(&mut self, value: TemperatureUnit)

Set temperature display unit.

MCP offset 0x1084.

Source

pub fn set_vox_delay(&mut self, delay: u8)

Set VOX delay (in 100 ms units, clamped to 30).

MCP offset 0x101D.

Source

pub fn set_vox_tx_on_busy(&mut self, enabled: bool)

Set VOX TX-on-busy on/off.

MCP offset 0x101E.

Source

pub fn set_squelch_a(&mut self, level: u8)

Set squelch level for Band A (0-6).

MCP offset 0x100D.

Source

pub fn set_squelch_b(&mut self, level: u8)

Set squelch level for Band B (0-6).

MCP offset 0x100E.

Source

pub fn set_fm_narrow(&mut self, value: u8)

Set FM narrow setting.

MCP offset 0x100F.

Source

pub fn set_auto_filter(&mut self, value: u8)

Set auto filter setting.

MCP offset 0x100C.

Source

pub fn set_scan_resume(&mut self, value: u8)

Set scan resume setting.

MCP offset 0x1007.

Source

pub fn set_digital_scan_resume(&mut self, value: u8)

Set digital scan resume setting.

MCP offset 0x1008.

Source

pub fn set_timeout_timer(&mut self, value: u8)

Set timeout timer.

MCP offset 0x1018.

Source

pub fn set_tx_inhibit(&mut self, enabled: bool)

Set TX inhibit on/off.

MCP offset 0x1019.

Source

pub fn set_beat_shift(&mut self, enabled: bool)

Set beat shift on/off.

MCP offset 0x101A.

Source

pub fn set_cw_break_in(&mut self, enabled: bool)

Set CW break-in on/off.

MCP offset 0x101F.

Source

pub fn set_cw_pitch(&mut self, value: u8)

Set CW pitch.

MCP offset 0x1021.

Source

pub fn set_dtmf_speed(&mut self, value: u8)

Set DTMF speed.

MCP offset 0x1024.

Source

pub fn set_mic_sensitivity(&mut self, value: u8)

Set mic sensitivity.

MCP offset 0x1040.

Source

pub fn set_pf_key1(&mut self, value: u8)

Set PF key 1 assignment.

MCP offset 0x1041.

Source

pub fn set_pf_key2(&mut self, value: u8)

Set PF key 2 assignment.

MCP offset 0x1042.

Source

pub fn set_aprs_lock(&mut self, enabled: bool)

Set APRS lock on/off.

MCP offset 0x1097.

Source

pub fn set_dual_display_size(&mut self, value: u8)

Set dual display size.

MCP offset 0x1066.

Source

pub fn set_display_area(&mut self, value: u8)

Set display area.

MCP offset 0x1067.

Source

pub fn set_info_line(&mut self, value: u8)

Set info line setting.

MCP offset 0x1068.

Source

pub fn set_volume_lock(&mut self, enabled: bool)

Set volume lock on/off.

MCP offset 0x1076.

Source

pub fn set_bt_auto_connect(&mut self, enabled: bool)

Set Bluetooth auto-connect on/off.

MCP offset 0x1079.

Source

pub fn set_pc_output_mode(&mut self, value: u8)

Set PC output mode.

MCP offset 0x1085.

Source

pub fn set_aprs_usb_mode(&mut self, value: u8)

Set APRS USB mode.

MCP offset 0x1086.

Source

pub fn set_power_on_message_flag(&mut self, enabled: bool)

Set power-on message flag on/off.

MCP offset 0x1087.

Source

pub fn set_dual_band_mcp(&mut self, enabled: bool)

Set dual band MCP setting on/off.

MCP offset 0x1096.

Source

pub fn set_key_beep(&mut self, enabled: bool)

Set key beep on/off.

MCP offset 0x1071.

Source

pub fn set_vox_enabled(&mut self, enabled: bool)

Set VOX enabled on/off.

MCP offset 0x101B.

Source

pub fn set_vox_gain(&mut self, gain: u8)

Set VOX gain level (0-9).

Values above 9 are clamped to 9.

MCP offset 0x101C.

Source

pub fn set_lock(&mut self, locked: bool)

Set lock on/off.

MCP offset 0x1060.

Source

pub fn set_dual_band(&mut self, enabled: bool)

Set dual-band display on/off.

MCP offset 0x0396.

Source

pub fn set_attenuator_a(&mut self, enabled: bool)

Set Band A attenuator on/off.

MCP offset 0x035C.

Source

pub fn set_power_level_a(&mut self, level: PowerLevel)

Set Band A power level.

MCP offset 0x0359.

Source

pub fn set_bluetooth(&mut self, enabled: bool)

Set Bluetooth on/off.

MCP offset 0x1078.

Source

pub fn set_ssb_high_cut(&mut self, value: u8)

Set SSB high-cut filter setting.

MCP offset 0x1011.

Source

pub fn set_cw_high_cut(&mut self, value: u8)

Set CW high-cut filter setting.

MCP offset 0x1012.

Source

pub fn set_am_high_cut(&mut self, value: u8)

Set AM high-cut filter setting.

MCP offset 0x1013.

Source

pub fn set_scan_restart_time(&mut self, value: u8)

Set scan restart time.

MCP offset 0x1009.

Source

pub fn set_scan_restart_carrier(&mut self, value: u8)

Set scan restart carrier setting.

MCP offset 0x100A.

Source

pub fn set_cw_delay_time(&mut self, value: u8)

Set CW delay time.

MCP offset 0x1020.

Source

pub fn set_dtmf_pause_time(&mut self, value: u8)

Set DTMF pause time.

MCP offset 0x1026.

Source

pub fn set_dtmf_tx_hold(&mut self, enabled: bool)

Set DTMF TX hold on/off.

MCP offset 0x1027.

Source

pub fn set_repeater_auto_offset(&mut self, enabled: bool)

Set repeater auto offset on/off.

MCP offset 0x1030.

Source

pub fn set_repeater_call_key(&mut self, value: u8)

Set repeater call key function.

MCP offset 0x1031.

Source

pub fn set_lock_key_a(&mut self, enabled: bool)

Set lock key A on/off.

MCP offset 0x1062.

Source

pub fn set_lock_key_b(&mut self, enabled: bool)

Set lock key B on/off.

MCP offset 0x1063.

Source

pub fn set_lock_key_c(&mut self, enabled: bool)

Set lock key C on/off.

MCP offset 0x1064.

Source

pub fn set_lock_key_ptt(&mut self, enabled: bool)

Set lock PTT key on/off.

MCP offset 0x1065.

Source

pub fn set_display_hold_time(&mut self, value: u8)

Set display hold time.

MCP offset 0x106B.

Source

pub fn set_display_method(&mut self, value: u8)

Set display method.

MCP offset 0x106C.

Source

pub fn set_power_on_display(&mut self, value: u8)

Set power-on display setting.

MCP offset 0x106D.

Source

pub fn set_emr_volume_level(&mut self, value: u8)

Set EMR volume level.

MCP offset 0x106E.

Source

pub fn set_auto_mute_return_time(&mut self, value: u8)

Set auto mute return time.

MCP offset 0x106F.

Source

pub fn set_announce(&mut self, enabled: bool)

Set announce on/off.

MCP offset 0x1070.

Source

pub fn set_voice_language(&mut self, value: u8)

Set voice language.

MCP offset 0x1073.

Source

pub fn set_voice_volume(&mut self, value: u8)

Set voice volume.

MCP offset 0x1074.

Source

pub fn set_voice_speed(&mut self, value: u8)

Set voice speed.

MCP offset 0x1075.

Source

pub fn set_usb_audio_output(&mut self, enabled: bool)

Set USB audio output on/off.

MCP offset 0x1094.

Set internet link on/off.

MCP offset 0x1095.

Source

pub fn set_gps_bt_interface(&mut self, value: u8)

Set GPS/BT interface setting.

MCP offset 0x1080.

Source

pub fn set_key_lock_type_raw(&mut self, value: u8)

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

MCP offset 0x1061.

Source

pub fn set_auto_power_off_raw(&mut self, value: u8)

Set auto power off as raw byte (0=Off, 1=30m, 2=60m, 3=90m, 4=120m).

MCP offset 0x10D0.

Source

pub fn set_speed_distance_unit_raw(&mut self, value: u8)

Set speed/distance unit as raw byte (0=mph, 1=km/h, 2=knots).

MCP offset 0x1077.

Source

pub fn set_altitude_rain_unit_raw(&mut self, value: u8)

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

MCP offset 0x1083.

Source

pub fn set_temperature_unit_raw(&mut self, value: u8)

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

MCP offset 0x1084.

Trait Implementations§

Source§

impl<'a> Debug for SettingsWriter<'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 SettingsWriter<'a>

§

impl<'a> RefUnwindSafe for SettingsWriter<'a>

§

impl<'a> Send for SettingsWriter<'a>

§

impl<'a> Sync for SettingsWriter<'a>

§

impl<'a> Unpin for SettingsWriter<'a>

§

impl<'a> !UnwindSafe for SettingsWriter<'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