atsamd51p/pm/
pwsakdly.rs

1#[doc = "Register `PWSAKDLY` reader"]
2pub type R = crate::R<PwsakdlySpec>;
3#[doc = "Register `PWSAKDLY` writer"]
4pub type W = crate::W<PwsakdlySpec>;
5#[doc = "Field `DLYVAL` reader - Delay Value"]
6pub type DlyvalR = crate::FieldReader;
7#[doc = "Field `DLYVAL` writer - Delay Value"]
8pub type DlyvalW<'a, REG> = crate::FieldWriter<'a, REG, 7>;
9#[doc = "Field `IGNACK` reader - Ignore Acknowledge"]
10pub type IgnackR = crate::BitReader;
11#[doc = "Field `IGNACK` writer - Ignore Acknowledge"]
12pub type IgnackW<'a, REG> = crate::BitWriter<'a, REG>;
13impl R {
14    #[doc = "Bits 0:6 - Delay Value"]
15    #[inline(always)]
16    pub fn dlyval(&self) -> DlyvalR {
17        DlyvalR::new(self.bits & 0x7f)
18    }
19    #[doc = "Bit 7 - Ignore Acknowledge"]
20    #[inline(always)]
21    pub fn ignack(&self) -> IgnackR {
22        IgnackR::new(((self.bits >> 7) & 1) != 0)
23    }
24}
25impl W {
26    #[doc = "Bits 0:6 - Delay Value"]
27    #[inline(always)]
28    #[must_use]
29    pub fn dlyval(&mut self) -> DlyvalW<PwsakdlySpec> {
30        DlyvalW::new(self, 0)
31    }
32    #[doc = "Bit 7 - Ignore Acknowledge"]
33    #[inline(always)]
34    #[must_use]
35    pub fn ignack(&mut self) -> IgnackW<PwsakdlySpec> {
36        IgnackW::new(self, 7)
37    }
38}
39#[doc = "Power Switch Acknowledge Delay\n\nYou can [`read`](crate::Reg::read) this register and get [`pwsakdly::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pwsakdly::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
40pub struct PwsakdlySpec;
41impl crate::RegisterSpec for PwsakdlySpec {
42    type Ux = u8;
43}
44#[doc = "`read()` method returns [`pwsakdly::R`](R) reader structure"]
45impl crate::Readable for PwsakdlySpec {}
46#[doc = "`write(|w| ..)` method takes [`pwsakdly::W`](W) writer structure"]
47impl crate::Writable for PwsakdlySpec {
48    type Safety = crate::Unsafe;
49    const ZERO_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
50    const ONE_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
51}
52#[doc = "`reset()` method sets PWSAKDLY to value 0"]
53impl crate::Resettable for PwsakdlySpec {
54    const RESET_VALUE: u8 = 0;
55}