1#[doc = "Register `INT_RAW` reader"]
2pub type R = crate::R<INT_RAW_SPEC>;
3#[doc = "Register `INT_RAW` writer"]
4pub type W = crate::W<INT_RAW_SPEC>;
5#[doc = "Field `COMP0_NEG` reader - analog comparator pos edge interrupt raw"]
6pub type COMP0_NEG_R = crate::BitReader;
7#[doc = "Field `COMP0_NEG` writer - analog comparator pos edge interrupt raw"]
8pub type COMP0_NEG_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `COMP0_POS` reader - analog comparator neg edge interrupt raw"]
10pub type COMP0_POS_R = crate::BitReader;
11#[doc = "Field `COMP0_POS` writer - analog comparator neg edge interrupt raw"]
12pub type COMP0_POS_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `COMP0_ALL` reader - analog comparator neg or pos edge interrupt raw"]
14pub type COMP0_ALL_R = crate::BitReader;
15#[doc = "Field `COMP0_ALL` writer - analog comparator neg or pos edge interrupt raw"]
16pub type COMP0_ALL_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `COMP1_NEG` reader - analog comparator pos edge interrupt raw"]
18pub type COMP1_NEG_R = crate::BitReader;
19#[doc = "Field `COMP1_NEG` writer - analog comparator pos edge interrupt raw"]
20pub type COMP1_NEG_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `COMP1_POS` reader - analog comparator neg edge interrupt raw"]
22pub type COMP1_POS_R = crate::BitReader;
23#[doc = "Field `COMP1_POS` writer - analog comparator neg edge interrupt raw"]
24pub type COMP1_POS_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `COMP1_ALL` reader - analog comparator neg or pos edge interrupt raw"]
26pub type COMP1_ALL_R = crate::BitReader;
27#[doc = "Field `COMP1_ALL` writer - analog comparator neg or pos edge interrupt raw"]
28pub type COMP1_ALL_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `BISTOK` reader - pad bistok interrupt raw"]
30pub type BISTOK_R = crate::BitReader;
31#[doc = "Field `BISTOK` writer - pad bistok interrupt raw"]
32pub type BISTOK_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `BISTFAIL` reader - pad bistfail interrupt raw"]
34pub type BISTFAIL_R = crate::BitReader;
35#[doc = "Field `BISTFAIL` writer - pad bistfail interrupt raw"]
36pub type BISTFAIL_W<'a, REG> = crate::BitWriter<'a, REG>;
37impl R {
38 #[doc = "Bit 0 - analog comparator pos edge interrupt raw"]
39 #[inline(always)]
40 pub fn comp0_neg(&self) -> COMP0_NEG_R {
41 COMP0_NEG_R::new((self.bits & 1) != 0)
42 }
43 #[doc = "Bit 1 - analog comparator neg edge interrupt raw"]
44 #[inline(always)]
45 pub fn comp0_pos(&self) -> COMP0_POS_R {
46 COMP0_POS_R::new(((self.bits >> 1) & 1) != 0)
47 }
48 #[doc = "Bit 2 - analog comparator neg or pos edge interrupt raw"]
49 #[inline(always)]
50 pub fn comp0_all(&self) -> COMP0_ALL_R {
51 COMP0_ALL_R::new(((self.bits >> 2) & 1) != 0)
52 }
53 #[doc = "Bit 3 - analog comparator pos edge interrupt raw"]
54 #[inline(always)]
55 pub fn comp1_neg(&self) -> COMP1_NEG_R {
56 COMP1_NEG_R::new(((self.bits >> 3) & 1) != 0)
57 }
58 #[doc = "Bit 4 - analog comparator neg edge interrupt raw"]
59 #[inline(always)]
60 pub fn comp1_pos(&self) -> COMP1_POS_R {
61 COMP1_POS_R::new(((self.bits >> 4) & 1) != 0)
62 }
63 #[doc = "Bit 5 - analog comparator neg or pos edge interrupt raw"]
64 #[inline(always)]
65 pub fn comp1_all(&self) -> COMP1_ALL_R {
66 COMP1_ALL_R::new(((self.bits >> 5) & 1) != 0)
67 }
68 #[doc = "Bit 6 - pad bistok interrupt raw"]
69 #[inline(always)]
70 pub fn bistok(&self) -> BISTOK_R {
71 BISTOK_R::new(((self.bits >> 6) & 1) != 0)
72 }
73 #[doc = "Bit 7 - pad bistfail interrupt raw"]
74 #[inline(always)]
75 pub fn bistfail(&self) -> BISTFAIL_R {
76 BISTFAIL_R::new(((self.bits >> 7) & 1) != 0)
77 }
78}
79#[cfg(feature = "impl-register-debug")]
80impl core::fmt::Debug for R {
81 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
82 f.debug_struct("INT_RAW")
83 .field("comp0_neg", &format_args!("{}", self.comp0_neg().bit()))
84 .field("comp0_pos", &format_args!("{}", self.comp0_pos().bit()))
85 .field("comp0_all", &format_args!("{}", self.comp0_all().bit()))
86 .field("comp1_neg", &format_args!("{}", self.comp1_neg().bit()))
87 .field("comp1_pos", &format_args!("{}", self.comp1_pos().bit()))
88 .field("comp1_all", &format_args!("{}", self.comp1_all().bit()))
89 .field("bistok", &format_args!("{}", self.bistok().bit()))
90 .field("bistfail", &format_args!("{}", self.bistfail().bit()))
91 .finish()
92 }
93}
94#[cfg(feature = "impl-register-debug")]
95impl core::fmt::Debug for crate::generic::Reg<INT_RAW_SPEC> {
96 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
97 core::fmt::Debug::fmt(&self.read(), f)
98 }
99}
100impl W {
101 #[doc = "Bit 0 - analog comparator pos edge interrupt raw"]
102 #[inline(always)]
103 #[must_use]
104 pub fn comp0_neg(&mut self) -> COMP0_NEG_W<INT_RAW_SPEC> {
105 COMP0_NEG_W::new(self, 0)
106 }
107 #[doc = "Bit 1 - analog comparator neg edge interrupt raw"]
108 #[inline(always)]
109 #[must_use]
110 pub fn comp0_pos(&mut self) -> COMP0_POS_W<INT_RAW_SPEC> {
111 COMP0_POS_W::new(self, 1)
112 }
113 #[doc = "Bit 2 - analog comparator neg or pos edge interrupt raw"]
114 #[inline(always)]
115 #[must_use]
116 pub fn comp0_all(&mut self) -> COMP0_ALL_W<INT_RAW_SPEC> {
117 COMP0_ALL_W::new(self, 2)
118 }
119 #[doc = "Bit 3 - analog comparator pos edge interrupt raw"]
120 #[inline(always)]
121 #[must_use]
122 pub fn comp1_neg(&mut self) -> COMP1_NEG_W<INT_RAW_SPEC> {
123 COMP1_NEG_W::new(self, 3)
124 }
125 #[doc = "Bit 4 - analog comparator neg edge interrupt raw"]
126 #[inline(always)]
127 #[must_use]
128 pub fn comp1_pos(&mut self) -> COMP1_POS_W<INT_RAW_SPEC> {
129 COMP1_POS_W::new(self, 4)
130 }
131 #[doc = "Bit 5 - analog comparator neg or pos edge interrupt raw"]
132 #[inline(always)]
133 #[must_use]
134 pub fn comp1_all(&mut self) -> COMP1_ALL_W<INT_RAW_SPEC> {
135 COMP1_ALL_W::new(self, 5)
136 }
137 #[doc = "Bit 6 - pad bistok interrupt raw"]
138 #[inline(always)]
139 #[must_use]
140 pub fn bistok(&mut self) -> BISTOK_W<INT_RAW_SPEC> {
141 BISTOK_W::new(self, 6)
142 }
143 #[doc = "Bit 7 - pad bistfail interrupt raw"]
144 #[inline(always)]
145 #[must_use]
146 pub fn bistfail(&mut self) -> BISTFAIL_W<INT_RAW_SPEC> {
147 BISTFAIL_W::new(self, 7)
148 }
149}
150#[doc = "analog comparator interrupt raw\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`int_raw::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`int_raw::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
151pub struct INT_RAW_SPEC;
152impl crate::RegisterSpec for INT_RAW_SPEC {
153 type Ux = u32;
154}
155#[doc = "`read()` method returns [`int_raw::R`](R) reader structure"]
156impl crate::Readable for INT_RAW_SPEC {}
157#[doc = "`write(|w| ..)` method takes [`int_raw::W`](W) writer structure"]
158impl crate::Writable for INT_RAW_SPEC {
159 type Safety = crate::Unsafe;
160 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
161 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
162}
163#[doc = "`reset()` method sets INT_RAW to value 0"]
164impl crate::Resettable for INT_RAW_SPEC {
165 const RESET_VALUE: u32 = 0;
166}