atsamd51g/supc/
bkout.rs
1#[doc = "Register `BKOUT` reader"]
2pub type R = crate::R<BkoutSpec>;
3#[doc = "Register `BKOUT` writer"]
4pub type W = crate::W<BkoutSpec>;
5#[doc = "Field `ENOUT0` reader - Enable OUT0"]
6pub type Enout0R = crate::BitReader;
7#[doc = "Field `ENOUT0` writer - Enable OUT0"]
8pub type Enout0W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `ENOUT1` reader - Enable OUT1"]
10pub type Enout1R = crate::BitReader;
11#[doc = "Field `ENOUT1` writer - Enable OUT1"]
12pub type Enout1W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `CLROUT0` reader - Clear OUT0"]
14pub type Clrout0R = crate::BitReader;
15#[doc = "Field `CLROUT0` writer - Clear OUT0"]
16pub type Clrout0W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `CLROUT1` reader - Clear OUT1"]
18pub type Clrout1R = crate::BitReader;
19#[doc = "Field `CLROUT1` writer - Clear OUT1"]
20pub type Clrout1W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `SETOUT0` reader - Set OUT0"]
22pub type Setout0R = crate::BitReader;
23#[doc = "Field `SETOUT0` writer - Set OUT0"]
24pub type Setout0W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `SETOUT1` reader - Set OUT1"]
26pub type Setout1R = crate::BitReader;
27#[doc = "Field `SETOUT1` writer - Set OUT1"]
28pub type Setout1W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `RTCTGLOUT0` reader - RTC Toggle OUT0"]
30pub type Rtctglout0R = crate::BitReader;
31#[doc = "Field `RTCTGLOUT0` writer - RTC Toggle OUT0"]
32pub type Rtctglout0W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `RTCTGLOUT1` reader - RTC Toggle OUT1"]
34pub type Rtctglout1R = crate::BitReader;
35#[doc = "Field `RTCTGLOUT1` writer - RTC Toggle OUT1"]
36pub type Rtctglout1W<'a, REG> = crate::BitWriter<'a, REG>;
37impl R {
38 #[doc = "Bit 0 - Enable OUT0"]
39 #[inline(always)]
40 pub fn enout0(&self) -> Enout0R {
41 Enout0R::new((self.bits & 1) != 0)
42 }
43 #[doc = "Bit 1 - Enable OUT1"]
44 #[inline(always)]
45 pub fn enout1(&self) -> Enout1R {
46 Enout1R::new(((self.bits >> 1) & 1) != 0)
47 }
48 #[doc = "Bit 8 - Clear OUT0"]
49 #[inline(always)]
50 pub fn clrout0(&self) -> Clrout0R {
51 Clrout0R::new(((self.bits >> 8) & 1) != 0)
52 }
53 #[doc = "Bit 9 - Clear OUT1"]
54 #[inline(always)]
55 pub fn clrout1(&self) -> Clrout1R {
56 Clrout1R::new(((self.bits >> 9) & 1) != 0)
57 }
58 #[doc = "Bit 16 - Set OUT0"]
59 #[inline(always)]
60 pub fn setout0(&self) -> Setout0R {
61 Setout0R::new(((self.bits >> 16) & 1) != 0)
62 }
63 #[doc = "Bit 17 - Set OUT1"]
64 #[inline(always)]
65 pub fn setout1(&self) -> Setout1R {
66 Setout1R::new(((self.bits >> 17) & 1) != 0)
67 }
68 #[doc = "Bit 24 - RTC Toggle OUT0"]
69 #[inline(always)]
70 pub fn rtctglout0(&self) -> Rtctglout0R {
71 Rtctglout0R::new(((self.bits >> 24) & 1) != 0)
72 }
73 #[doc = "Bit 25 - RTC Toggle OUT1"]
74 #[inline(always)]
75 pub fn rtctglout1(&self) -> Rtctglout1R {
76 Rtctglout1R::new(((self.bits >> 25) & 1) != 0)
77 }
78}
79impl W {
80 #[doc = "Bit 0 - Enable OUT0"]
81 #[inline(always)]
82 #[must_use]
83 pub fn enout0(&mut self) -> Enout0W<BkoutSpec> {
84 Enout0W::new(self, 0)
85 }
86 #[doc = "Bit 1 - Enable OUT1"]
87 #[inline(always)]
88 #[must_use]
89 pub fn enout1(&mut self) -> Enout1W<BkoutSpec> {
90 Enout1W::new(self, 1)
91 }
92 #[doc = "Bit 8 - Clear OUT0"]
93 #[inline(always)]
94 #[must_use]
95 pub fn clrout0(&mut self) -> Clrout0W<BkoutSpec> {
96 Clrout0W::new(self, 8)
97 }
98 #[doc = "Bit 9 - Clear OUT1"]
99 #[inline(always)]
100 #[must_use]
101 pub fn clrout1(&mut self) -> Clrout1W<BkoutSpec> {
102 Clrout1W::new(self, 9)
103 }
104 #[doc = "Bit 16 - Set OUT0"]
105 #[inline(always)]
106 #[must_use]
107 pub fn setout0(&mut self) -> Setout0W<BkoutSpec> {
108 Setout0W::new(self, 16)
109 }
110 #[doc = "Bit 17 - Set OUT1"]
111 #[inline(always)]
112 #[must_use]
113 pub fn setout1(&mut self) -> Setout1W<BkoutSpec> {
114 Setout1W::new(self, 17)
115 }
116 #[doc = "Bit 24 - RTC Toggle OUT0"]
117 #[inline(always)]
118 #[must_use]
119 pub fn rtctglout0(&mut self) -> Rtctglout0W<BkoutSpec> {
120 Rtctglout0W::new(self, 24)
121 }
122 #[doc = "Bit 25 - RTC Toggle OUT1"]
123 #[inline(always)]
124 #[must_use]
125 pub fn rtctglout1(&mut self) -> Rtctglout1W<BkoutSpec> {
126 Rtctglout1W::new(self, 25)
127 }
128}
129#[doc = "Backup Output Control\n\nYou can [`read`](crate::Reg::read) this register and get [`bkout::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`bkout::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
130pub struct BkoutSpec;
131impl crate::RegisterSpec for BkoutSpec {
132 type Ux = u32;
133}
134#[doc = "`read()` method returns [`bkout::R`](R) reader structure"]
135impl crate::Readable for BkoutSpec {}
136#[doc = "`write(|w| ..)` method takes [`bkout::W`](W) writer structure"]
137impl crate::Writable for BkoutSpec {
138 type Safety = crate::Unsafe;
139 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
140 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
141}
142#[doc = "`reset()` method sets BKOUT to value 0"]
143impl crate::Resettable for BkoutSpec {
144 const RESET_VALUE: u32 = 0;
145}