Init Commit
All checks were successful
Rust/va416xx-rs/pipeline/head This commit looks good

Monorepo for Rust support of VA416XX family of radiation hardened MCUs
This commit is contained in:
2021-12-07 00:31:51 +01:00
committed by Robin Mueller
commit 5d1740efea
606 changed files with 74678 additions and 0 deletions

View File

@ -0,0 +1,48 @@
#[doc = "Register `ROM_SCRUB` reader"]
pub type R = crate::R<RomScrubSpec>;
#[doc = "Register `ROM_SCRUB` writer"]
pub type W = crate::W<RomScrubSpec>;
#[doc = "Field `VALUE` reader - Counter divide value"]
pub type ValueR = crate::FieldReader<u32>;
#[doc = "Field `VALUE` writer - Counter divide value"]
pub type ValueW<'a, REG> = crate::FieldWriter<'a, REG, 24, u32>;
#[doc = "Field `RESET` writer - Reset Counter"]
pub type ResetW<'a, REG> = crate::BitWriter1C<'a, REG>;
impl R {
#[doc = "Bits 0:23 - Counter divide value"]
#[inline(always)]
pub fn value(&self) -> ValueR {
ValueR::new(self.bits & 0x00ff_ffff)
}
}
impl W {
#[doc = "Bits 0:23 - Counter divide value"]
#[inline(always)]
#[must_use]
pub fn value(&mut self) -> ValueW<RomScrubSpec> {
ValueW::new(self, 0)
}
#[doc = "Bit 31 - Reset Counter"]
#[inline(always)]
#[must_use]
pub fn reset(&mut self) -> ResetW<RomScrubSpec> {
ResetW::new(self, 31)
}
}
#[doc = "ROM Scrub Period Configuration\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`rom_scrub::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 [`rom_scrub::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct RomScrubSpec;
impl crate::RegisterSpec for RomScrubSpec {
type Ux = u32;
}
#[doc = "`read()` method returns [`rom_scrub::R`](R) reader structure"]
impl crate::Readable for RomScrubSpec {}
#[doc = "`write(|w| ..)` method takes [`rom_scrub::W`](W) writer structure"]
impl crate::Writable for RomScrubSpec {
type Safety = crate::Unsafe;
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0x8000_0000;
}
#[doc = "`reset()` method sets ROM_SCRUB to value 0"]
impl crate::Resettable for RomScrubSpec {
const RESET_VALUE: u32 = 0;
}