Monorepo for Rust support of VA416XX family of radiation hardened MCUs
This commit is contained in:
29
va416xx/src/adc/fifo_data.rs
Normal file
29
va416xx/src/adc/fifo_data.rs
Normal file
@ -0,0 +1,29 @@
|
||||
#[doc = "Register `FIFO_DATA` reader"]
|
||||
pub type R = crate::R<FifoDataSpec>;
|
||||
#[doc = "Field `ADC_DATA` reader - ADC acquisition data from the FIFO"]
|
||||
pub type AdcDataR = crate::FieldReader<u16>;
|
||||
#[doc = "Field `CHAN_TAG` reader - If enabled, this will include the number of the channel corresponding to the measurement"]
|
||||
pub type ChanTagR = crate::FieldReader;
|
||||
impl R {
|
||||
#[doc = "Bits 0:11 - ADC acquisition data from the FIFO"]
|
||||
#[inline(always)]
|
||||
pub fn adc_data(&self) -> AdcDataR {
|
||||
AdcDataR::new((self.bits & 0x0fff) as u16)
|
||||
}
|
||||
#[doc = "Bits 12:15 - If enabled, this will include the number of the channel corresponding to the measurement"]
|
||||
#[inline(always)]
|
||||
pub fn chan_tag(&self) -> ChanTagR {
|
||||
ChanTagR::new(((self.bits >> 12) & 0x0f) as u8)
|
||||
}
|
||||
}
|
||||
#[doc = "FIFO data\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`fifo_data::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
|
||||
pub struct FifoDataSpec;
|
||||
impl crate::RegisterSpec for FifoDataSpec {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [`fifo_data::R`](R) reader structure"]
|
||||
impl crate::Readable for FifoDataSpec {}
|
||||
#[doc = "`reset()` method sets FIFO_DATA to value 0"]
|
||||
impl crate::Resettable for FifoDataSpec {
|
||||
const RESET_VALUE: u32 = 0;
|
||||
}
|
Reference in New Issue
Block a user