atsamd51g/pm/
ctrla.rs

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