1#[doc = "Register `INT_ST` reader"]
2pub type R = crate::R<INT_ST_SPEC>;
3#[doc = "Field `COMP0_NEG` reader - analog comparator pos edge interrupt status"]
4pub type COMP0_NEG_R = crate::BitReader;
5#[doc = "Field `COMP0_POS` reader - analog comparator neg edge interrupt status"]
6pub type COMP0_POS_R = crate::BitReader;
7#[doc = "Field `COMP0_ALL` reader - analog comparator neg or pos edge interrupt status"]
8pub type COMP0_ALL_R = crate::BitReader;
9#[doc = "Field `COMP1_NEG` reader - analog comparator pos edge interrupt status"]
10pub type COMP1_NEG_R = crate::BitReader;
11#[doc = "Field `COMP1_POS` reader - analog comparator neg edge interrupt status"]
12pub type COMP1_POS_R = crate::BitReader;
13#[doc = "Field `COMP1_ALL` reader - analog comparator neg or pos edge interrupt status"]
14pub type COMP1_ALL_R = crate::BitReader;
15#[doc = "Field `BISTOK` reader - pad bistok interrupt status"]
16pub type BISTOK_R = crate::BitReader;
17#[doc = "Field `BISTFAIL` reader - pad bistfail interrupt status"]
18pub type BISTFAIL_R = crate::BitReader;
19impl R {
20 #[doc = "Bit 0 - analog comparator pos edge interrupt status"]
21 #[inline(always)]
22 pub fn comp0_neg(&self) -> COMP0_NEG_R {
23 COMP0_NEG_R::new((self.bits & 1) != 0)
24 }
25 #[doc = "Bit 1 - analog comparator neg edge interrupt status"]
26 #[inline(always)]
27 pub fn comp0_pos(&self) -> COMP0_POS_R {
28 COMP0_POS_R::new(((self.bits >> 1) & 1) != 0)
29 }
30 #[doc = "Bit 2 - analog comparator neg or pos edge interrupt status"]
31 #[inline(always)]
32 pub fn comp0_all(&self) -> COMP0_ALL_R {
33 COMP0_ALL_R::new(((self.bits >> 2) & 1) != 0)
34 }
35 #[doc = "Bit 3 - analog comparator pos edge interrupt status"]
36 #[inline(always)]
37 pub fn comp1_neg(&self) -> COMP1_NEG_R {
38 COMP1_NEG_R::new(((self.bits >> 3) & 1) != 0)
39 }
40 #[doc = "Bit 4 - analog comparator neg edge interrupt status"]
41 #[inline(always)]
42 pub fn comp1_pos(&self) -> COMP1_POS_R {
43 COMP1_POS_R::new(((self.bits >> 4) & 1) != 0)
44 }
45 #[doc = "Bit 5 - analog comparator neg or pos edge interrupt status"]
46 #[inline(always)]
47 pub fn comp1_all(&self) -> COMP1_ALL_R {
48 COMP1_ALL_R::new(((self.bits >> 5) & 1) != 0)
49 }
50 #[doc = "Bit 6 - pad bistok interrupt status"]
51 #[inline(always)]
52 pub fn bistok(&self) -> BISTOK_R {
53 BISTOK_R::new(((self.bits >> 6) & 1) != 0)
54 }
55 #[doc = "Bit 7 - pad bistfail interrupt status"]
56 #[inline(always)]
57 pub fn bistfail(&self) -> BISTFAIL_R {
58 BISTFAIL_R::new(((self.bits >> 7) & 1) != 0)
59 }
60}
61#[cfg(feature = "impl-register-debug")]
62impl core::fmt::Debug for R {
63 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
64 f.debug_struct("INT_ST")
65 .field("comp0_neg", &format_args!("{}", self.comp0_neg().bit()))
66 .field("comp0_pos", &format_args!("{}", self.comp0_pos().bit()))
67 .field("comp0_all", &format_args!("{}", self.comp0_all().bit()))
68 .field("comp1_neg", &format_args!("{}", self.comp1_neg().bit()))
69 .field("comp1_pos", &format_args!("{}", self.comp1_pos().bit()))
70 .field("comp1_all", &format_args!("{}", self.comp1_all().bit()))
71 .field("bistok", &format_args!("{}", self.bistok().bit()))
72 .field("bistfail", &format_args!("{}", self.bistfail().bit()))
73 .finish()
74 }
75}
76#[cfg(feature = "impl-register-debug")]
77impl core::fmt::Debug for crate::generic::Reg<INT_ST_SPEC> {
78 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
79 core::fmt::Debug::fmt(&self.read(), f)
80 }
81}
82#[doc = "analog comparator interrupt status\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`int_st::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
83pub struct INT_ST_SPEC;
84impl crate::RegisterSpec for INT_ST_SPEC {
85 type Ux = u32;
86}
87#[doc = "`read()` method returns [`int_st::R`](R) reader structure"]
88impl crate::Readable for INT_ST_SPEC {}
89#[doc = "`reset()` method sets INT_ST to value 0"]
90impl crate::Resettable for INT_ST_SPEC {
91 const RESET_VALUE: u32 = 0;
92}