atsamd21g/hmatrix/
sfr.rs

1#[doc = "Register `SFR%s` reader"]
2pub type R = crate::R<SfrSpec>;
3#[doc = "Register `SFR%s` writer"]
4pub type W = crate::W<SfrSpec>;
5#[doc = "Field `SFR` reader - Special Function Register"]
6pub type SfrR = crate::FieldReader<u32>;
7#[doc = "Field `SFR` writer - Special Function Register"]
8pub type SfrW<'a, REG> = crate::FieldWriter<'a, REG, 32, u32>;
9impl R {
10    #[doc = "Bits 0:31 - Special Function Register"]
11    #[inline(always)]
12    pub fn sfr(&self) -> SfrR {
13        SfrR::new(self.bits)
14    }
15}
16impl W {
17    #[doc = "Bits 0:31 - Special Function Register"]
18    #[inline(always)]
19    #[must_use]
20    pub fn sfr(&mut self) -> SfrW<SfrSpec> {
21        SfrW::new(self, 0)
22    }
23}
24#[doc = "Special Function\n\nYou can [`read`](crate::Reg::read) this register and get [`sfr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sfr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
25pub struct SfrSpec;
26impl crate::RegisterSpec for SfrSpec {
27    type Ux = u32;
28}
29#[doc = "`read()` method returns [`sfr::R`](R) reader structure"]
30impl crate::Readable for SfrSpec {}
31#[doc = "`write(|w| ..)` method takes [`sfr::W`](W) writer structure"]
32impl crate::Writable for SfrSpec {
33    type Safety = crate::Unsafe;
34    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
35    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
36}
37#[doc = "`reset()` method sets SFR%s to value 0"]
38impl crate::Resettable for SfrSpec {
39    const RESET_VALUE: u32 = 0;
40}