Monorepo for Rust support of VA416XX family of radiation hardened MCUs
This commit is contained in:
55
va416xx/src/dac0/ctrl0.rs
Normal file
55
va416xx/src/dac0/ctrl0.rs
Normal file
@ -0,0 +1,55 @@
|
||||
#[doc = "Register `CTRL0` reader"]
|
||||
pub type R = crate::R<Ctrl0Spec>;
|
||||
#[doc = "Register `CTRL0` writer"]
|
||||
pub type W = crate::W<Ctrl0Spec>;
|
||||
#[doc = "Field `EXT_TRIG_EN` reader - Enables external trigger"]
|
||||
pub type ExtTrigEnR = crate::BitReader;
|
||||
#[doc = "Field `EXT_TRIG_EN` writer - Enables external trigger"]
|
||||
pub type ExtTrigEnW<'a, REG> = crate::BitWriter<'a, REG>;
|
||||
#[doc = "Field `MAN_TRIG_EN` reader - Enables manual trigger"]
|
||||
pub type ManTrigEnR = crate::BitReader;
|
||||
#[doc = "Field `MAN_TRIG_EN` writer - Enables manual trigger"]
|
||||
pub type ManTrigEnW<'a, REG> = crate::BitWriter<'a, REG>;
|
||||
impl R {
|
||||
#[doc = "Bit 10 - Enables external trigger"]
|
||||
#[inline(always)]
|
||||
pub fn ext_trig_en(&self) -> ExtTrigEnR {
|
||||
ExtTrigEnR::new(((self.bits >> 10) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 11 - Enables manual trigger"]
|
||||
#[inline(always)]
|
||||
pub fn man_trig_en(&self) -> ManTrigEnR {
|
||||
ManTrigEnR::new(((self.bits >> 11) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 10 - Enables external trigger"]
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
pub fn ext_trig_en(&mut self) -> ExtTrigEnW<Ctrl0Spec> {
|
||||
ExtTrigEnW::new(self, 10)
|
||||
}
|
||||
#[doc = "Bit 11 - Enables manual trigger"]
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
pub fn man_trig_en(&mut self) -> ManTrigEnW<Ctrl0Spec> {
|
||||
ManTrigEnW::new(self, 11)
|
||||
}
|
||||
}
|
||||
#[doc = "Control Register 0\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`ctrl0::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`ctrl0::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
|
||||
pub struct Ctrl0Spec;
|
||||
impl crate::RegisterSpec for Ctrl0Spec {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [`ctrl0::R`](R) reader structure"]
|
||||
impl crate::Readable for Ctrl0Spec {}
|
||||
#[doc = "`write(|w| ..)` method takes [`ctrl0::W`](W) writer structure"]
|
||||
impl crate::Writable for Ctrl0Spec {
|
||||
type Safety = crate::Unsafe;
|
||||
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
|
||||
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
|
||||
}
|
||||
#[doc = "`reset()` method sets CTRL0 to value 0"]
|
||||
impl crate::Resettable for Ctrl0Spec {
|
||||
const RESET_VALUE: u32 = 0;
|
||||
}
|
55
va416xx/src/dac0/ctrl1.rs
Normal file
55
va416xx/src/dac0/ctrl1.rs
Normal file
@ -0,0 +1,55 @@
|
||||
#[doc = "Register `CTRL1` reader"]
|
||||
pub type R = crate::R<Ctrl1Spec>;
|
||||
#[doc = "Register `CTRL1` writer"]
|
||||
pub type W = crate::W<Ctrl1Spec>;
|
||||
#[doc = "Field `DAC_SETTLING` reader - Sets the the amount of time in microseconds the control FSM waits for the DAC settling time"]
|
||||
pub type DacSettlingR = crate::FieldReader;
|
||||
#[doc = "Field `DAC_SETTLING` writer - Sets the the amount of time in microseconds the control FSM waits for the DAC settling time"]
|
||||
pub type DacSettlingW<'a, REG> = crate::FieldWriter<'a, REG, 3>;
|
||||
#[doc = "Field `DAC_EN` reader - Enables the DAC analog block"]
|
||||
pub type DacEnR = crate::BitReader;
|
||||
#[doc = "Field `DAC_EN` writer - Enables the DAC analog block"]
|
||||
pub type DacEnW<'a, REG> = crate::BitWriter<'a, REG>;
|
||||
impl R {
|
||||
#[doc = "Bits 5:7 - Sets the the amount of time in microseconds the control FSM waits for the DAC settling time"]
|
||||
#[inline(always)]
|
||||
pub fn dac_settling(&self) -> DacSettlingR {
|
||||
DacSettlingR::new(((self.bits >> 5) & 7) as u8)
|
||||
}
|
||||
#[doc = "Bit 8 - Enables the DAC analog block"]
|
||||
#[inline(always)]
|
||||
pub fn dac_en(&self) -> DacEnR {
|
||||
DacEnR::new(((self.bits >> 8) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 5:7 - Sets the the amount of time in microseconds the control FSM waits for the DAC settling time"]
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
pub fn dac_settling(&mut self) -> DacSettlingW<Ctrl1Spec> {
|
||||
DacSettlingW::new(self, 5)
|
||||
}
|
||||
#[doc = "Bit 8 - Enables the DAC analog block"]
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
pub fn dac_en(&mut self) -> DacEnW<Ctrl1Spec> {
|
||||
DacEnW::new(self, 8)
|
||||
}
|
||||
}
|
||||
#[doc = "Control Register 1\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`ctrl1::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`ctrl1::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
|
||||
pub struct Ctrl1Spec;
|
||||
impl crate::RegisterSpec for Ctrl1Spec {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [`ctrl1::R`](R) reader structure"]
|
||||
impl crate::Readable for Ctrl1Spec {}
|
||||
#[doc = "`write(|w| ..)` method takes [`ctrl1::W`](W) writer structure"]
|
||||
impl crate::Writable for Ctrl1Spec {
|
||||
type Safety = crate::Unsafe;
|
||||
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
|
||||
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
|
||||
}
|
||||
#[doc = "`reset()` method sets CTRL1 to value 0"]
|
||||
impl crate::Resettable for Ctrl1Spec {
|
||||
const RESET_VALUE: u32 = 0;
|
||||
}
|
31
va416xx/src/dac0/fifo_clr.rs
Normal file
31
va416xx/src/dac0/fifo_clr.rs
Normal file
@ -0,0 +1,31 @@
|
||||
#[doc = "Register `FIFO_CLR` reader"]
|
||||
pub type R = crate::R<FifoClrSpec>;
|
||||
#[doc = "Register `FIFO_CLR` writer"]
|
||||
pub type W = crate::W<FifoClrSpec>;
|
||||
#[doc = "Field `FIFO_CLR` writer - Clears the DAC FIFO. Always reads 0"]
|
||||
pub type FifoClrW<'a, REG> = crate::BitWriter<'a, REG>;
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Clears the DAC FIFO. Always reads 0"]
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
pub fn fifo_clr(&mut self) -> FifoClrW<FifoClrSpec> {
|
||||
FifoClrW::new(self, 0)
|
||||
}
|
||||
}
|
||||
#[doc = "FIFO Clear\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`fifo_clr::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`fifo_clr::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
|
||||
pub struct FifoClrSpec;
|
||||
impl crate::RegisterSpec for FifoClrSpec {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [`fifo_clr::R`](R) reader structure"]
|
||||
impl crate::Readable for FifoClrSpec {}
|
||||
#[doc = "`write(|w| ..)` method takes [`fifo_clr::W`](W) writer structure"]
|
||||
impl crate::Writable for FifoClrSpec {
|
||||
type Safety = crate::Unsafe;
|
||||
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
|
||||
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
|
||||
}
|
||||
#[doc = "`reset()` method sets FIFO_CLR to value 0"]
|
||||
impl crate::Resettable for FifoClrSpec {
|
||||
const RESET_VALUE: u32 = 0;
|
||||
}
|
31
va416xx/src/dac0/fifo_data.rs
Normal file
31
va416xx/src/dac0/fifo_data.rs
Normal file
@ -0,0 +1,31 @@
|
||||
#[doc = "Register `FIFO_DATA` reader"]
|
||||
pub type R = crate::R<FifoDataSpec>;
|
||||
#[doc = "Register `FIFO_DATA` writer"]
|
||||
pub type W = crate::W<FifoDataSpec>;
|
||||
#[doc = "Field `DATA` writer - Data for FIFO write"]
|
||||
pub type DataW<'a, REG> = crate::FieldWriter<'a, REG, 12, u16>;
|
||||
impl W {
|
||||
#[doc = "Bits 0:11 - Data for FIFO write"]
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
pub fn data(&mut self) -> DataW<FifoDataSpec> {
|
||||
DataW::new(self, 0)
|
||||
}
|
||||
}
|
||||
#[doc = "FIFO data\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`fifo_data::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`fifo_data::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. 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 = "`write(|w| ..)` method takes [`fifo_data::W`](W) writer structure"]
|
||||
impl crate::Writable for FifoDataSpec {
|
||||
type Safety = crate::Unsafe;
|
||||
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
|
||||
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
|
||||
}
|
||||
#[doc = "`reset()` method sets FIFO_DATA to value 0"]
|
||||
impl crate::Resettable for FifoDataSpec {
|
||||
const RESET_VALUE: u32 = 0;
|
||||
}
|
51
va416xx/src/dac0/irq_clr.rs
Normal file
51
va416xx/src/dac0/irq_clr.rs
Normal file
@ -0,0 +1,51 @@
|
||||
#[doc = "Register `IRQ_CLR` writer"]
|
||||
pub type W = crate::W<IrqClrSpec>;
|
||||
#[doc = "Field `FIFO_OFLOW` writer - Clears the FIFO overflow interrupt status. Always reads 0"]
|
||||
pub type FifoOflowW<'a, REG> = crate::BitWriter<'a, REG>;
|
||||
#[doc = "Field `FIFO_UFLOW` writer - Clears the FIFO underflow interrupt status. Always reads 0"]
|
||||
pub type FifoUflowW<'a, REG> = crate::BitWriter<'a, REG>;
|
||||
#[doc = "Field `DAC_DONE` writer - Clears the DAC done interrupt status. Always reads 0"]
|
||||
pub type DacDoneW<'a, REG> = crate::BitWriter<'a, REG>;
|
||||
#[doc = "Field `TRIG_ERROR` writer - Clears the trigger error interrupt status. Always reads 0"]
|
||||
pub type TrigErrorW<'a, REG> = crate::BitWriter<'a, REG>;
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Clears the FIFO overflow interrupt status. Always reads 0"]
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
pub fn fifo_oflow(&mut self) -> FifoOflowW<IrqClrSpec> {
|
||||
FifoOflowW::new(self, 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Clears the FIFO underflow interrupt status. Always reads 0"]
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
pub fn fifo_uflow(&mut self) -> FifoUflowW<IrqClrSpec> {
|
||||
FifoUflowW::new(self, 1)
|
||||
}
|
||||
#[doc = "Bit 2 - Clears the DAC done interrupt status. Always reads 0"]
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
pub fn dac_done(&mut self) -> DacDoneW<IrqClrSpec> {
|
||||
DacDoneW::new(self, 2)
|
||||
}
|
||||
#[doc = "Bit 3 - Clears the trigger error interrupt status. Always reads 0"]
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
pub fn trig_error(&mut self) -> TrigErrorW<IrqClrSpec> {
|
||||
TrigErrorW::new(self, 3)
|
||||
}
|
||||
}
|
||||
#[doc = "Clear Interrupt\n\nYou can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`irq_clr::W`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
|
||||
pub struct IrqClrSpec;
|
||||
impl crate::RegisterSpec for IrqClrSpec {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [`irq_clr::W`](W) writer structure"]
|
||||
impl crate::Writable for IrqClrSpec {
|
||||
type Safety = crate::Unsafe;
|
||||
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
|
||||
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
|
||||
}
|
||||
#[doc = "`reset()` method sets IRQ_CLR to value 0"]
|
||||
impl crate::Resettable for IrqClrSpec {
|
||||
const RESET_VALUE: u32 = 0;
|
||||
}
|
130
va416xx/src/dac0/irq_enb.rs
Normal file
130
va416xx/src/dac0/irq_enb.rs
Normal file
@ -0,0 +1,130 @@
|
||||
#[doc = "Register `IRQ_ENB` reader"]
|
||||
pub type R = crate::R<IrqEnbSpec>;
|
||||
#[doc = "Register `IRQ_ENB` writer"]
|
||||
pub type W = crate::W<IrqEnbSpec>;
|
||||
#[doc = "Field `FIFO_EMPTY` reader - Enables the interrupt for FIFO empty"]
|
||||
pub type FifoEmptyR = crate::BitReader;
|
||||
#[doc = "Field `FIFO_EMPTY` writer - Enables the interrupt for FIFO empty"]
|
||||
pub type FifoEmptyW<'a, REG> = crate::BitWriter<'a, REG>;
|
||||
#[doc = "Field `FIFO_FULL` reader - Enables the interrupt for FIFO full"]
|
||||
pub type FifoFullR = crate::BitReader;
|
||||
#[doc = "Field `FIFO_FULL` writer - Enables the interrupt for FIFO full"]
|
||||
pub type FifoFullW<'a, REG> = crate::BitWriter<'a, REG>;
|
||||
#[doc = "Field `FIFO_OFLOW` reader - Enables the interrupt for a FIFO overflow"]
|
||||
pub type FifoOflowR = crate::BitReader;
|
||||
#[doc = "Field `FIFO_OFLOW` writer - Enables the interrupt for a FIFO overflow"]
|
||||
pub type FifoOflowW<'a, REG> = crate::BitWriter<'a, REG>;
|
||||
#[doc = "Field `FIFO_UFLOW` reader - Enables the interrupt for a FIFO underflow"]
|
||||
pub type FifoUflowR = crate::BitReader;
|
||||
#[doc = "Field `FIFO_UFLOW` writer - Enables the interrupt for a FIFO underflow"]
|
||||
pub type FifoUflowW<'a, REG> = crate::BitWriter<'a, REG>;
|
||||
#[doc = "Field `DAC_DONE` reader - Enables the interrupt for a DAC data acquisition completion"]
|
||||
pub type DacDoneR = crate::BitReader;
|
||||
#[doc = "Field `DAC_DONE` writer - Enables the interrupt for a DAC data acquisition completion"]
|
||||
pub type DacDoneW<'a, REG> = crate::BitWriter<'a, REG>;
|
||||
#[doc = "Field `TRIG_ERROR` reader - Enables the interrupt for a trigger error"]
|
||||
pub type TrigErrorR = crate::BitReader;
|
||||
#[doc = "Field `TRIG_ERROR` writer - Enables the interrupt for a trigger error"]
|
||||
pub type TrigErrorW<'a, REG> = crate::BitWriter<'a, REG>;
|
||||
#[doc = "Field `FIFO_DEPTH_TRIG` reader - Enables the interrupt for the FIFO entry count is less than or equal to the trigger level"]
|
||||
pub type FifoDepthTrigR = crate::BitReader;
|
||||
#[doc = "Field `FIFO_DEPTH_TRIG` writer - Enables the interrupt for the FIFO entry count is less than or equal to the trigger level"]
|
||||
pub type FifoDepthTrigW<'a, REG> = crate::BitWriter<'a, REG>;
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Enables the interrupt for FIFO empty"]
|
||||
#[inline(always)]
|
||||
pub fn fifo_empty(&self) -> FifoEmptyR {
|
||||
FifoEmptyR::new((self.bits & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Enables the interrupt for FIFO full"]
|
||||
#[inline(always)]
|
||||
pub fn fifo_full(&self) -> FifoFullR {
|
||||
FifoFullR::new(((self.bits >> 1) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - Enables the interrupt for a FIFO overflow"]
|
||||
#[inline(always)]
|
||||
pub fn fifo_oflow(&self) -> FifoOflowR {
|
||||
FifoOflowR::new(((self.bits >> 2) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Enables the interrupt for a FIFO underflow"]
|
||||
#[inline(always)]
|
||||
pub fn fifo_uflow(&self) -> FifoUflowR {
|
||||
FifoUflowR::new(((self.bits >> 3) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - Enables the interrupt for a DAC data acquisition completion"]
|
||||
#[inline(always)]
|
||||
pub fn dac_done(&self) -> DacDoneR {
|
||||
DacDoneR::new(((self.bits >> 4) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - Enables the interrupt for a trigger error"]
|
||||
#[inline(always)]
|
||||
pub fn trig_error(&self) -> TrigErrorR {
|
||||
TrigErrorR::new(((self.bits >> 5) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - Enables the interrupt for the FIFO entry count is less than or equal to the trigger level"]
|
||||
#[inline(always)]
|
||||
pub fn fifo_depth_trig(&self) -> FifoDepthTrigR {
|
||||
FifoDepthTrigR::new(((self.bits >> 6) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Enables the interrupt for FIFO empty"]
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
pub fn fifo_empty(&mut self) -> FifoEmptyW<IrqEnbSpec> {
|
||||
FifoEmptyW::new(self, 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Enables the interrupt for FIFO full"]
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
pub fn fifo_full(&mut self) -> FifoFullW<IrqEnbSpec> {
|
||||
FifoFullW::new(self, 1)
|
||||
}
|
||||
#[doc = "Bit 2 - Enables the interrupt for a FIFO overflow"]
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
pub fn fifo_oflow(&mut self) -> FifoOflowW<IrqEnbSpec> {
|
||||
FifoOflowW::new(self, 2)
|
||||
}
|
||||
#[doc = "Bit 3 - Enables the interrupt for a FIFO underflow"]
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
pub fn fifo_uflow(&mut self) -> FifoUflowW<IrqEnbSpec> {
|
||||
FifoUflowW::new(self, 3)
|
||||
}
|
||||
#[doc = "Bit 4 - Enables the interrupt for a DAC data acquisition completion"]
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
pub fn dac_done(&mut self) -> DacDoneW<IrqEnbSpec> {
|
||||
DacDoneW::new(self, 4)
|
||||
}
|
||||
#[doc = "Bit 5 - Enables the interrupt for a trigger error"]
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
pub fn trig_error(&mut self) -> TrigErrorW<IrqEnbSpec> {
|
||||
TrigErrorW::new(self, 5)
|
||||
}
|
||||
#[doc = "Bit 6 - Enables the interrupt for the FIFO entry count is less than or equal to the trigger level"]
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
pub fn fifo_depth_trig(&mut self) -> FifoDepthTrigW<IrqEnbSpec> {
|
||||
FifoDepthTrigW::new(self, 6)
|
||||
}
|
||||
}
|
||||
#[doc = "Interrupt Enable\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`irq_enb::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`irq_enb::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
|
||||
pub struct IrqEnbSpec;
|
||||
impl crate::RegisterSpec for IrqEnbSpec {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [`irq_enb::R`](R) reader structure"]
|
||||
impl crate::Readable for IrqEnbSpec {}
|
||||
#[doc = "`write(|w| ..)` method takes [`irq_enb::W`](W) writer structure"]
|
||||
impl crate::Writable for IrqEnbSpec {
|
||||
type Safety = crate::Unsafe;
|
||||
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
|
||||
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
|
||||
}
|
||||
#[doc = "`reset()` method sets IRQ_ENB to value 0"]
|
||||
impl crate::Resettable for IrqEnbSpec {
|
||||
const RESET_VALUE: u32 = 0;
|
||||
}
|
64
va416xx/src/dac0/irq_end.rs
Normal file
64
va416xx/src/dac0/irq_end.rs
Normal file
@ -0,0 +1,64 @@
|
||||
#[doc = "Register `IRQ_END` reader"]
|
||||
pub type R = crate::R<IrqEndSpec>;
|
||||
#[doc = "Field `FIFO_EMPTY` reader - Indicates the FIFO is empty and the interrupt is enabled"]
|
||||
pub type FifoEmptyR = crate::BitReader;
|
||||
#[doc = "Field `FIFO_FULL` reader - Indicates the FIFO is full and the interrupt is enabled"]
|
||||
pub type FifoFullR = crate::BitReader;
|
||||
#[doc = "Field `FIFO_OFLOW` reader - Indicates a FIFO overflow occurred and the interrupt is enabled"]
|
||||
pub type FifoOflowR = crate::BitReader;
|
||||
#[doc = "Field `FIFO_UFLOW` reader - Indicates a FIFO underflow occurred and the interrupt is enabled"]
|
||||
pub type FifoUflowR = crate::BitReader;
|
||||
#[doc = "Field `DAC_DONE` reader - Indicates that a DAC conversion is done and the interrupt is enabled"]
|
||||
pub type DacDoneR = crate::BitReader;
|
||||
#[doc = "Field `TRIG_ERROR` reader - Indicates a manual or external trigger occurred when the DAC was BUSY doing a conversion and the interrupt is enabled"]
|
||||
pub type TrigErrorR = crate::BitReader;
|
||||
#[doc = "Field `FIFO_DEPTH_TRIG` reader - Indicates the FIFO entry count is less than or equal to the trigger level and the interrupt is enabled"]
|
||||
pub type FifoDepthTrigR = crate::BitReader;
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Indicates the FIFO is empty and the interrupt is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn fifo_empty(&self) -> FifoEmptyR {
|
||||
FifoEmptyR::new((self.bits & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Indicates the FIFO is full and the interrupt is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn fifo_full(&self) -> FifoFullR {
|
||||
FifoFullR::new(((self.bits >> 1) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - Indicates a FIFO overflow occurred and the interrupt is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn fifo_oflow(&self) -> FifoOflowR {
|
||||
FifoOflowR::new(((self.bits >> 2) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Indicates a FIFO underflow occurred and the interrupt is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn fifo_uflow(&self) -> FifoUflowR {
|
||||
FifoUflowR::new(((self.bits >> 3) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - Indicates that a DAC conversion is done and the interrupt is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn dac_done(&self) -> DacDoneR {
|
||||
DacDoneR::new(((self.bits >> 4) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - Indicates a manual or external trigger occurred when the DAC was BUSY doing a conversion and the interrupt is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn trig_error(&self) -> TrigErrorR {
|
||||
TrigErrorR::new(((self.bits >> 5) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - Indicates the FIFO entry count is less than or equal to the trigger level and the interrupt is enabled"]
|
||||
#[inline(always)]
|
||||
pub fn fifo_depth_trig(&self) -> FifoDepthTrigR {
|
||||
FifoDepthTrigR::new(((self.bits >> 6) & 1) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "Enabled Interrupt Status\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`irq_end::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
|
||||
pub struct IrqEndSpec;
|
||||
impl crate::RegisterSpec for IrqEndSpec {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [`irq_end::R`](R) reader structure"]
|
||||
impl crate::Readable for IrqEndSpec {}
|
||||
#[doc = "`reset()` method sets IRQ_END to value 0"]
|
||||
impl crate::Resettable for IrqEndSpec {
|
||||
const RESET_VALUE: u32 = 0;
|
||||
}
|
64
va416xx/src/dac0/irq_raw.rs
Normal file
64
va416xx/src/dac0/irq_raw.rs
Normal file
@ -0,0 +1,64 @@
|
||||
#[doc = "Register `IRQ_RAW` reader"]
|
||||
pub type R = crate::R<IrqRawSpec>;
|
||||
#[doc = "Field `FIFO_EMPTY` reader - Indicates the FIFO is empty"]
|
||||
pub type FifoEmptyR = crate::BitReader;
|
||||
#[doc = "Field `FIFO_FULL` reader - Indicates the FIFO is full"]
|
||||
pub type FifoFullR = crate::BitReader;
|
||||
#[doc = "Field `FIFO_OFLOW` reader - Indicates a FIFO overflow occurred (FIFO was full when new data was written)"]
|
||||
pub type FifoOflowR = crate::BitReader;
|
||||
#[doc = "Field `FIFO_UFLOW` reader - Indicates data was unavailable when a new trigger for DAC update is received"]
|
||||
pub type FifoUflowR = crate::BitReader;
|
||||
#[doc = "Field `DAC_DONE` reader - Indicates that a DAC conversion is done"]
|
||||
pub type DacDoneR = crate::BitReader;
|
||||
#[doc = "Field `TRIG_ERROR` reader - Indicates a manual or external trigger occurred when the DAC was BUSY doing a conversion"]
|
||||
pub type TrigErrorR = crate::BitReader;
|
||||
#[doc = "Field `FIFO_DEPTH_TRIG` reader - Indicates the FIFO entry count is less than or equal to the trigger level"]
|
||||
pub type FifoDepthTrigR = crate::BitReader;
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Indicates the FIFO is empty"]
|
||||
#[inline(always)]
|
||||
pub fn fifo_empty(&self) -> FifoEmptyR {
|
||||
FifoEmptyR::new((self.bits & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Indicates the FIFO is full"]
|
||||
#[inline(always)]
|
||||
pub fn fifo_full(&self) -> FifoFullR {
|
||||
FifoFullR::new(((self.bits >> 1) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - Indicates a FIFO overflow occurred (FIFO was full when new data was written)"]
|
||||
#[inline(always)]
|
||||
pub fn fifo_oflow(&self) -> FifoOflowR {
|
||||
FifoOflowR::new(((self.bits >> 2) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Indicates data was unavailable when a new trigger for DAC update is received"]
|
||||
#[inline(always)]
|
||||
pub fn fifo_uflow(&self) -> FifoUflowR {
|
||||
FifoUflowR::new(((self.bits >> 3) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - Indicates that a DAC conversion is done"]
|
||||
#[inline(always)]
|
||||
pub fn dac_done(&self) -> DacDoneR {
|
||||
DacDoneR::new(((self.bits >> 4) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - Indicates a manual or external trigger occurred when the DAC was BUSY doing a conversion"]
|
||||
#[inline(always)]
|
||||
pub fn trig_error(&self) -> TrigErrorR {
|
||||
TrigErrorR::new(((self.bits >> 5) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - Indicates the FIFO entry count is less than or equal to the trigger level"]
|
||||
#[inline(always)]
|
||||
pub fn fifo_depth_trig(&self) -> FifoDepthTrigR {
|
||||
FifoDepthTrigR::new(((self.bits >> 6) & 1) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "Raw Interrupt Status\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`irq_raw::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
|
||||
pub struct IrqRawSpec;
|
||||
impl crate::RegisterSpec for IrqRawSpec {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [`irq_raw::R`](R) reader structure"]
|
||||
impl crate::Readable for IrqRawSpec {}
|
||||
#[doc = "`reset()` method sets IRQ_RAW to value 0x41"]
|
||||
impl crate::Resettable for IrqRawSpec {
|
||||
const RESET_VALUE: u32 = 0x41;
|
||||
}
|
18
va416xx/src/dac0/perid.rs
Normal file
18
va416xx/src/dac0/perid.rs
Normal file
@ -0,0 +1,18 @@
|
||||
#[doc = "Register `PERID` reader"]
|
||||
pub type R = crate::R<PeridSpec>;
|
||||
impl core::fmt::Debug for R {
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
|
||||
write!(f, "{}", self.bits())
|
||||
}
|
||||
}
|
||||
#[doc = "Peripheral ID Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`perid::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
|
||||
pub struct PeridSpec;
|
||||
impl crate::RegisterSpec for PeridSpec {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [`perid::R`](R) reader structure"]
|
||||
impl crate::Readable for PeridSpec {}
|
||||
#[doc = "`reset()` method sets PERID to value 0x0020_07e9"]
|
||||
impl crate::Resettable for PeridSpec {
|
||||
const RESET_VALUE: u32 = 0x0020_07e9;
|
||||
}
|
29
va416xx/src/dac0/status.rs
Normal file
29
va416xx/src/dac0/status.rs
Normal file
@ -0,0 +1,29 @@
|
||||
#[doc = "Register `STATUS` reader"]
|
||||
pub type R = crate::R<StatusSpec>;
|
||||
#[doc = "Field `FIFO_ENTRY_CNT` reader - Indicates the number of entries in the FIFO"]
|
||||
pub type FifoEntryCntR = crate::FieldReader;
|
||||
#[doc = "Field `DAC_BUSY` reader - Indicates a DAC data acquisition is in process"]
|
||||
pub type DacBusyR = crate::BitReader;
|
||||
impl R {
|
||||
#[doc = "Bits 0:5 - Indicates the number of entries in the FIFO"]
|
||||
#[inline(always)]
|
||||
pub fn fifo_entry_cnt(&self) -> FifoEntryCntR {
|
||||
FifoEntryCntR::new((self.bits & 0x3f) as u8)
|
||||
}
|
||||
#[doc = "Bit 7 - Indicates a DAC data acquisition is in process"]
|
||||
#[inline(always)]
|
||||
pub fn dac_busy(&self) -> DacBusyR {
|
||||
DacBusyR::new(((self.bits >> 7) & 1) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "Status\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`status::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
|
||||
pub struct StatusSpec;
|
||||
impl crate::RegisterSpec for StatusSpec {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [`status::R`](R) reader structure"]
|
||||
impl crate::Readable for StatusSpec {}
|
||||
#[doc = "`reset()` method sets STATUS to value 0"]
|
||||
impl crate::Resettable for StatusSpec {
|
||||
const RESET_VALUE: u32 = 0;
|
||||
}
|
40
va416xx/src/dac0/txfifoirqtrg.rs
Normal file
40
va416xx/src/dac0/txfifoirqtrg.rs
Normal file
@ -0,0 +1,40 @@
|
||||
#[doc = "Register `TXFIFOIRQTRG` reader"]
|
||||
pub type R = crate::R<TxfifoirqtrgSpec>;
|
||||
#[doc = "Register `TXFIFOIRQTRG` writer"]
|
||||
pub type W = crate::W<TxfifoirqtrgSpec>;
|
||||
#[doc = "Field `LEVEL` reader - Sets the FIFO_ENTRY_CNT value that asserts the FIFO_DEPTH_TRIG interrupt"]
|
||||
pub type LevelR = crate::FieldReader;
|
||||
#[doc = "Field `LEVEL` writer - Sets the FIFO_ENTRY_CNT value that asserts the FIFO_DEPTH_TRIG interrupt"]
|
||||
pub type LevelW<'a, REG> = crate::FieldWriter<'a, REG, 5>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:4 - Sets the FIFO_ENTRY_CNT value that asserts the FIFO_DEPTH_TRIG interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn level(&self) -> LevelR {
|
||||
LevelR::new((self.bits & 0x1f) as u8)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:4 - Sets the FIFO_ENTRY_CNT value that asserts the FIFO_DEPTH_TRIG interrupt"]
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
pub fn level(&mut self) -> LevelW<TxfifoirqtrgSpec> {
|
||||
LevelW::new(self, 0)
|
||||
}
|
||||
}
|
||||
#[doc = "Receive FIFO Interrupt Trigger Value\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`txfifoirqtrg::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`txfifoirqtrg::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
|
||||
pub struct TxfifoirqtrgSpec;
|
||||
impl crate::RegisterSpec for TxfifoirqtrgSpec {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [`txfifoirqtrg::R`](R) reader structure"]
|
||||
impl crate::Readable for TxfifoirqtrgSpec {}
|
||||
#[doc = "`write(|w| ..)` method takes [`txfifoirqtrg::W`](W) writer structure"]
|
||||
impl crate::Writable for TxfifoirqtrgSpec {
|
||||
type Safety = crate::Unsafe;
|
||||
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
|
||||
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
|
||||
}
|
||||
#[doc = "`reset()` method sets TXFIFOIRQTRG to value 0x10"]
|
||||
impl crate::Resettable for TxfifoirqtrgSpec {
|
||||
const RESET_VALUE: u32 = 0x10;
|
||||
}
|
Reference in New Issue
Block a user