pub struct Control3Reg(pub u8);Tuple Fields§
§0: u8Implementations§
Source§impl Control3Reg
impl Control3Reg
Sourcepub fn ng_thresh(&self) -> u8
pub fn ng_thresh(&self) -> u8
This bit is the noise-gate threshold for PWM and analog inputs. 0: Disabled 1: 2% 2: 4% (Default) 3: 8%
Sourcepub fn erm_open_loop(&self) -> bool
pub fn erm_open_loop(&self) -> bool
This bit selects mode of operation while in ERM mode. Closed-loop operation is usually desired for because of automatic overdrive and braking properties. However, many existing waveform libraries were designed for open-loop operation, so open-loop operation may be required for compatibility. 0: Closed Loop 1: Open Loop
Sourcepub fn supply_comp_dis(&self) -> bool
pub fn supply_comp_dis(&self) -> bool
This bit disables supply compensation. The DRV2605 device generally provides constant drive output over variation in the power supply input (V DD ). In some systems, supply compensation may have already been implemented upstream, so disabling the DRV2605 supply compensation can be useful. 0: Supply compensation enabled 1: Supply compensation disabled
Sourcepub fn data_format_rtp(&self) -> bool
pub fn data_format_rtp(&self) -> bool
This bit selects the input data interpretation for RTP (Real-Time Playback) mode. 0: Signed 1: Unsigned
Sourcepub fn lra_drive_mode(&self) -> bool
pub fn lra_drive_mode(&self) -> bool
This bit selects the drive mode for the LRA algorithm. This bit determines how often the drive amplitude is updated. Updating once per cycle provides a symmetrical output signal, while updating twice per cycle provides more precise control. 0: Once per cycle 1: Twice per cycle
Sourcepub fn n_pwm_analog(&self) -> bool
pub fn n_pwm_analog(&self) -> bool
This bit selects the input mode for the IN/TRIG pin when MODE[2:0] = 3. In PWM input mode, the duty cycle of the input signal determines the amplitude of the waveform. In analog input mode, the amplitude of the input determines the amplitude of the waveform. 0: PWM Input 1: Analog Input
Sourcepub fn lra_open_loop(&self) -> bool
pub fn lra_open_loop(&self) -> bool
This bit selects an open-loop drive option for LRA Mode. When asserted, the playback engine drives the LRA at the selected frequency independently of the resonance frequency. In PWM input mode, the playback engine recovers the LRA commutation frequency from the PWM input, dividing the frequency by 128. Therefore the PWM input frequency must be equal to 128 times the resonant frequency of the LRA. 0: Auto-resonance mode 1: LRA open-loop mode
Sourcepub fn set_ng_thresh(&mut self, value: u8)
pub fn set_ng_thresh(&mut self, value: u8)
This bit is the noise-gate threshold for PWM and analog inputs. 0: Disabled 1: 2% 2: 4% (Default) 3: 8%
Sourcepub fn set_erm_open_loop(&mut self, value: bool)
pub fn set_erm_open_loop(&mut self, value: bool)
This bit selects mode of operation while in ERM mode. Closed-loop operation is usually desired for because of automatic overdrive and braking properties. However, many existing waveform libraries were designed for open-loop operation, so open-loop operation may be required for compatibility. 0: Closed Loop 1: Open Loop
Sourcepub fn set_supply_comp_dis(&mut self, value: bool)
pub fn set_supply_comp_dis(&mut self, value: bool)
This bit disables supply compensation. The DRV2605 device generally provides constant drive output over variation in the power supply input (V DD ). In some systems, supply compensation may have already been implemented upstream, so disabling the DRV2605 supply compensation can be useful. 0: Supply compensation enabled 1: Supply compensation disabled
Sourcepub fn set_data_format_rtp(&mut self, value: bool)
pub fn set_data_format_rtp(&mut self, value: bool)
This bit selects the input data interpretation for RTP (Real-Time Playback) mode. 0: Signed 1: Unsigned
Sourcepub fn set_lra_drive_mode(&mut self, value: bool)
pub fn set_lra_drive_mode(&mut self, value: bool)
This bit selects the drive mode for the LRA algorithm. This bit determines how often the drive amplitude is updated. Updating once per cycle provides a symmetrical output signal, while updating twice per cycle provides more precise control. 0: Once per cycle 1: Twice per cycle
Sourcepub fn set_n_pwm_analog(&mut self, value: bool)
pub fn set_n_pwm_analog(&mut self, value: bool)
This bit selects the input mode for the IN/TRIG pin when MODE[2:0] = 3. In PWM input mode, the duty cycle of the input signal determines the amplitude of the waveform. In analog input mode, the amplitude of the input determines the amplitude of the waveform. 0: PWM Input 1: Analog Input
Sourcepub fn set_lra_open_loop(&mut self, value: bool)
pub fn set_lra_open_loop(&mut self, value: bool)
This bit selects an open-loop drive option for LRA Mode. When asserted, the playback engine drives the LRA at the selected frequency independently of the resonance frequency. In PWM input mode, the playback engine recovers the LRA commutation frequency from the PWM input, dividing the frequency by 128. Therefore the PWM input frequency must be equal to 128 times the resonant frequency of the LRA. 0: Auto-resonance mode 1: LRA open-loop mode