Struct zinc_hal_lpc11xx::ioregs::ADC_gdr_Get [] [src]

pub struct ADC_gdr_Get {
    // some fields omitted
}

GDR: A/D Global Data Register. Contains the result of the most recent A/D conversion.

Methods

impl ADC_gdr_Get

fn new(reg: &ADC_gdr) -> ADC_gdr_Get

Create a getter reflecting the current value of the given register.

fn raw(&self) -> u32

Get the raw value of the register.

fn v_vref(&self) -> u32

Get value of V_VREF field: When DONE is 1, this field contains a binary fraction representing the voltage on the ADn pin selected by the SEL field, divided by the voltage on the VDD pin. Zero in the field indicates that the voltage on the ADn pin was less than, equal to, or close to that on VSS, while 0x3FF indicates that the voltage on ADn was close to, equal to, or greater than that on VREF.

fn chn(&self) -> u32

Get value of CHN field: These bits contain the channel from which the result bits V_VREF were converted.

fn overrun(&self) -> bool

Get value of OVERRUN field: This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits.

fn done(&self) -> bool

Get value of DONE field: This bit is set to 1 when an A/D conversion completes. It is cleared when this register is read and when the ADCR is written. If the ADCR is written while a conversion is still in progress, this bit is set and a new conversion is started.

Trait Implementations

impl Copy for ADC_gdr_Get

Derived Implementations

impl Clone for ADC_gdr_Get

fn clone(&self) -> ADC_gdr_Get

fn clone_from(&mut self, source: &Self)