Struct zinc_hal_lpc11xx::ioregs::ADC_dr1_Get
[−]
[src]
pub struct ADC_dr1_Get { // some fields omitted }
DR1
: A/D Channel n Data Register. This register contains the result of the most recent conversion completed on channel n.
Methods
impl ADC_dr1_Get
fn new(reg: &ADC_dr1) -> ADC_dr1_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, divided by the voltage on the VREF pin. Zero in the field indicates that the voltage on the ADn pin was less than, equal to, or close to that on VREF, while 0x3FF indicates that the voltage on AD input was close to, equal to, or greater than that on VREF.
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.This bit is cleared by reading this register.
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.