atsamd51g/dac/
intflag.rs
1#[doc = "Register `INTFLAG` reader"]
2pub type R = crate::R<IntflagSpec>;
3#[doc = "Register `INTFLAG` writer"]
4pub type W = crate::W<IntflagSpec>;
5#[doc = "Field `UNDERRUN0` reader - Result 0 Underrun"]
6pub type Underrun0R = crate::BitReader;
7#[doc = "Field `UNDERRUN0` writer - Result 0 Underrun"]
8pub type Underrun0W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `UNDERRUN1` reader - Result 1 Underrun"]
10pub type Underrun1R = crate::BitReader;
11#[doc = "Field `UNDERRUN1` writer - Result 1 Underrun"]
12pub type Underrun1W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `EMPTY0` reader - Data Buffer 0 Empty"]
14pub type Empty0R = crate::BitReader;
15#[doc = "Field `EMPTY0` writer - Data Buffer 0 Empty"]
16pub type Empty0W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `EMPTY1` reader - Data Buffer 1 Empty"]
18pub type Empty1R = crate::BitReader;
19#[doc = "Field `EMPTY1` writer - Data Buffer 1 Empty"]
20pub type Empty1W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `RESRDY0` reader - Result 0 Ready"]
22pub type Resrdy0R = crate::BitReader;
23#[doc = "Field `RESRDY0` writer - Result 0 Ready"]
24pub type Resrdy0W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `RESRDY1` reader - Result 1 Ready"]
26pub type Resrdy1R = crate::BitReader;
27#[doc = "Field `RESRDY1` writer - Result 1 Ready"]
28pub type Resrdy1W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `OVERRUN0` reader - Result 0 Overrun"]
30pub type Overrun0R = crate::BitReader;
31#[doc = "Field `OVERRUN0` writer - Result 0 Overrun"]
32pub type Overrun0W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `OVERRUN1` reader - Result 1 Overrun"]
34pub type Overrun1R = crate::BitReader;
35#[doc = "Field `OVERRUN1` writer - Result 1 Overrun"]
36pub type Overrun1W<'a, REG> = crate::BitWriter<'a, REG>;
37impl R {
38 #[doc = "Bit 0 - Result 0 Underrun"]
39 #[inline(always)]
40 pub fn underrun0(&self) -> Underrun0R {
41 Underrun0R::new((self.bits & 1) != 0)
42 }
43 #[doc = "Bit 1 - Result 1 Underrun"]
44 #[inline(always)]
45 pub fn underrun1(&self) -> Underrun1R {
46 Underrun1R::new(((self.bits >> 1) & 1) != 0)
47 }
48 #[doc = "Bit 2 - Data Buffer 0 Empty"]
49 #[inline(always)]
50 pub fn empty0(&self) -> Empty0R {
51 Empty0R::new(((self.bits >> 2) & 1) != 0)
52 }
53 #[doc = "Bit 3 - Data Buffer 1 Empty"]
54 #[inline(always)]
55 pub fn empty1(&self) -> Empty1R {
56 Empty1R::new(((self.bits >> 3) & 1) != 0)
57 }
58 #[doc = "Bit 4 - Result 0 Ready"]
59 #[inline(always)]
60 pub fn resrdy0(&self) -> Resrdy0R {
61 Resrdy0R::new(((self.bits >> 4) & 1) != 0)
62 }
63 #[doc = "Bit 5 - Result 1 Ready"]
64 #[inline(always)]
65 pub fn resrdy1(&self) -> Resrdy1R {
66 Resrdy1R::new(((self.bits >> 5) & 1) != 0)
67 }
68 #[doc = "Bit 6 - Result 0 Overrun"]
69 #[inline(always)]
70 pub fn overrun0(&self) -> Overrun0R {
71 Overrun0R::new(((self.bits >> 6) & 1) != 0)
72 }
73 #[doc = "Bit 7 - Result 1 Overrun"]
74 #[inline(always)]
75 pub fn overrun1(&self) -> Overrun1R {
76 Overrun1R::new(((self.bits >> 7) & 1) != 0)
77 }
78}
79impl W {
80 #[doc = "Bit 0 - Result 0 Underrun"]
81 #[inline(always)]
82 #[must_use]
83 pub fn underrun0(&mut self) -> Underrun0W<IntflagSpec> {
84 Underrun0W::new(self, 0)
85 }
86 #[doc = "Bit 1 - Result 1 Underrun"]
87 #[inline(always)]
88 #[must_use]
89 pub fn underrun1(&mut self) -> Underrun1W<IntflagSpec> {
90 Underrun1W::new(self, 1)
91 }
92 #[doc = "Bit 2 - Data Buffer 0 Empty"]
93 #[inline(always)]
94 #[must_use]
95 pub fn empty0(&mut self) -> Empty0W<IntflagSpec> {
96 Empty0W::new(self, 2)
97 }
98 #[doc = "Bit 3 - Data Buffer 1 Empty"]
99 #[inline(always)]
100 #[must_use]
101 pub fn empty1(&mut self) -> Empty1W<IntflagSpec> {
102 Empty1W::new(self, 3)
103 }
104 #[doc = "Bit 4 - Result 0 Ready"]
105 #[inline(always)]
106 #[must_use]
107 pub fn resrdy0(&mut self) -> Resrdy0W<IntflagSpec> {
108 Resrdy0W::new(self, 4)
109 }
110 #[doc = "Bit 5 - Result 1 Ready"]
111 #[inline(always)]
112 #[must_use]
113 pub fn resrdy1(&mut self) -> Resrdy1W<IntflagSpec> {
114 Resrdy1W::new(self, 5)
115 }
116 #[doc = "Bit 6 - Result 0 Overrun"]
117 #[inline(always)]
118 #[must_use]
119 pub fn overrun0(&mut self) -> Overrun0W<IntflagSpec> {
120 Overrun0W::new(self, 6)
121 }
122 #[doc = "Bit 7 - Result 1 Overrun"]
123 #[inline(always)]
124 #[must_use]
125 pub fn overrun1(&mut self) -> Overrun1W<IntflagSpec> {
126 Overrun1W::new(self, 7)
127 }
128}
129#[doc = "Interrupt Flag Status and Clear\n\nYou can [`read`](crate::Reg::read) this register and get [`intflag::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intflag::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
130pub struct IntflagSpec;
131impl crate::RegisterSpec for IntflagSpec {
132 type Ux = u8;
133}
134#[doc = "`read()` method returns [`intflag::R`](R) reader structure"]
135impl crate::Readable for IntflagSpec {}
136#[doc = "`write(|w| ..)` method takes [`intflag::W`](W) writer structure"]
137impl crate::Writable for IntflagSpec {
138 type Safety = crate::Unsafe;
139 const ZERO_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
140 const ONE_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
141}
142#[doc = "`reset()` method sets INTFLAG to value 0"]
143impl crate::Resettable for IntflagSpec {
144 const RESET_VALUE: u8 = 0;
145}