Struct mcp3425::Config
[−]
[src]
pub struct Config { pub resolution: Resolution, pub gain: Gain, }
Device configuration: Resolution and gain
Fields
resolution: Resolution
Conversion bit resolution and sample rate.
gain: Gain
Programmable gain amplifier (PGA).
Methods
impl Config
[src]
pub fn new(resolution: Resolution, gain: Gain) -> Self
[src]
Create a new device configuration with the specified resolution / sample rate and gain.
Note that creating and changing this instance does not have an immediate effect on the device. It is only written when a measurement is triggered (TODO: Or when writing config explicitly).
pub fn with_resolution(&self, resolution: Resolution) -> Self
[src]
Create a new configuration where the resolution has been replaced with the specified value.
pub fn with_gain(&self, gain: Gain) -> Self
[src]
Create a new configuration where the gain has been replaced with the specified value.
Trait Implementations
impl Debug for Config
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more