Struct ade791x::Config

source ·
pub struct Config {
    pub clkout_en: bool,
    pub pwrdwn_en: bool,
    pub temp_en: bool,
    pub adc_freq: AdcFreqVal,
    pub swrst: bool,
    pub bw: bool,
}
Expand description

Configuration struct.

Fields§

§clkout_en: bool

Enables CLKOUT functionality at the CLKOUT/DREADY pin. When clkout_en = false, the default value, DREADY functionality is enabled. When clkout_en = true, CLKOUT functionality is enabled.

§pwrdwn_en: bool

Shuts down the dc-to-dc converter. When pwrdwn_en = false, the default value, the dc-to-dc converter is functional and the Σ-Δ modulators are active. When pwrwdn_en = true, the dc-to-dc converter is turned off and the Σ-Δ modulators are shut down.

§temp_en: bool

This field selects the second voltage channel measurement. When the temp_en field is set to false, the default value, the voltage between the V2P and VM pins is measured. When this field is true, the internal temperature sensor is measured. In the case of the ADE7912, the internal temperature sensor is always measured, and this field does not have any significance.

§adc_freq: AdcFreqVal

This field selects the ADC output frequency.

§swrst: bool

When this field is set to true,a software reset is initiated. This field clears itself to false after one CLKIN cycle.

§bw: bool

Selects the bandwidth of the digital low-pass filter of the ADC. When bw = false, the default value, the bandwidth is 3.3 kHz. When bw = true, the bandwidth is 2 kHz. The bandwidth data is for CLKIN = 4.096 MHz and an ADC output frequency of 8 kHz.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Converts to this type from the input type.
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.