atsam4lc8b_pac/eic/
ctrl.rs1#[doc = "Register `CTRL` reader"]
2pub struct R(crate::R<CTRL_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<CTRL_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<CTRL_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<CTRL_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `NMI` reader - External Non Maskable CPU interrupt"]
17pub type NMI_R = crate::BitReader<bool>;
18#[doc = "Field `INT1` reader - External Interrupt 1"]
19pub type INT1_R = crate::BitReader<bool>;
20#[doc = "Field `INT2` reader - External Interrupt 2"]
21pub type INT2_R = crate::BitReader<bool>;
22#[doc = "Field `INT3` reader - External Interrupt 3"]
23pub type INT3_R = crate::BitReader<bool>;
24#[doc = "Field `INT4` reader - External Interrupt 4"]
25pub type INT4_R = crate::BitReader<bool>;
26#[doc = "Field `INT5` reader - External Interrupt 5"]
27pub type INT5_R = crate::BitReader<bool>;
28#[doc = "Field `INT6` reader - External Interrupt 6"]
29pub type INT6_R = crate::BitReader<bool>;
30#[doc = "Field `INT7` reader - External Interrupt 7"]
31pub type INT7_R = crate::BitReader<bool>;
32#[doc = "Field `INT8` reader - External Interrupt 8"]
33pub type INT8_R = crate::BitReader<bool>;
34#[doc = "Field `INT9` reader - External Interrupt 9"]
35pub type INT9_R = crate::BitReader<bool>;
36#[doc = "Field `INT10` reader - External Interrupt 10"]
37pub type INT10_R = crate::BitReader<bool>;
38#[doc = "Field `INT11` reader - External Interrupt 11"]
39pub type INT11_R = crate::BitReader<bool>;
40#[doc = "Field `INT12` reader - External Interrupt 12"]
41pub type INT12_R = crate::BitReader<bool>;
42#[doc = "Field `INT13` reader - External Interrupt 13"]
43pub type INT13_R = crate::BitReader<bool>;
44#[doc = "Field `INT14` reader - External Interrupt 14"]
45pub type INT14_R = crate::BitReader<bool>;
46#[doc = "Field `INT15` reader - External Interrupt 15"]
47pub type INT15_R = crate::BitReader<bool>;
48impl R {
49 #[doc = "Bit 0 - External Non Maskable CPU interrupt"]
50 #[inline(always)]
51 pub fn nmi(&self) -> NMI_R {
52 NMI_R::new((self.bits & 1) != 0)
53 }
54 #[doc = "Bit 1 - External Interrupt 1"]
55 #[inline(always)]
56 pub fn int1(&self) -> INT1_R {
57 INT1_R::new(((self.bits >> 1) & 1) != 0)
58 }
59 #[doc = "Bit 2 - External Interrupt 2"]
60 #[inline(always)]
61 pub fn int2(&self) -> INT2_R {
62 INT2_R::new(((self.bits >> 2) & 1) != 0)
63 }
64 #[doc = "Bit 3 - External Interrupt 3"]
65 #[inline(always)]
66 pub fn int3(&self) -> INT3_R {
67 INT3_R::new(((self.bits >> 3) & 1) != 0)
68 }
69 #[doc = "Bit 4 - External Interrupt 4"]
70 #[inline(always)]
71 pub fn int4(&self) -> INT4_R {
72 INT4_R::new(((self.bits >> 4) & 1) != 0)
73 }
74 #[doc = "Bit 5 - External Interrupt 5"]
75 #[inline(always)]
76 pub fn int5(&self) -> INT5_R {
77 INT5_R::new(((self.bits >> 5) & 1) != 0)
78 }
79 #[doc = "Bit 6 - External Interrupt 6"]
80 #[inline(always)]
81 pub fn int6(&self) -> INT6_R {
82 INT6_R::new(((self.bits >> 6) & 1) != 0)
83 }
84 #[doc = "Bit 7 - External Interrupt 7"]
85 #[inline(always)]
86 pub fn int7(&self) -> INT7_R {
87 INT7_R::new(((self.bits >> 7) & 1) != 0)
88 }
89 #[doc = "Bit 8 - External Interrupt 8"]
90 #[inline(always)]
91 pub fn int8(&self) -> INT8_R {
92 INT8_R::new(((self.bits >> 8) & 1) != 0)
93 }
94 #[doc = "Bit 9 - External Interrupt 9"]
95 #[inline(always)]
96 pub fn int9(&self) -> INT9_R {
97 INT9_R::new(((self.bits >> 9) & 1) != 0)
98 }
99 #[doc = "Bit 10 - External Interrupt 10"]
100 #[inline(always)]
101 pub fn int10(&self) -> INT10_R {
102 INT10_R::new(((self.bits >> 10) & 1) != 0)
103 }
104 #[doc = "Bit 11 - External Interrupt 11"]
105 #[inline(always)]
106 pub fn int11(&self) -> INT11_R {
107 INT11_R::new(((self.bits >> 11) & 1) != 0)
108 }
109 #[doc = "Bit 12 - External Interrupt 12"]
110 #[inline(always)]
111 pub fn int12(&self) -> INT12_R {
112 INT12_R::new(((self.bits >> 12) & 1) != 0)
113 }
114 #[doc = "Bit 13 - External Interrupt 13"]
115 #[inline(always)]
116 pub fn int13(&self) -> INT13_R {
117 INT13_R::new(((self.bits >> 13) & 1) != 0)
118 }
119 #[doc = "Bit 14 - External Interrupt 14"]
120 #[inline(always)]
121 pub fn int14(&self) -> INT14_R {
122 INT14_R::new(((self.bits >> 14) & 1) != 0)
123 }
124 #[doc = "Bit 15 - External Interrupt 15"]
125 #[inline(always)]
126 pub fn int15(&self) -> INT15_R {
127 INT15_R::new(((self.bits >> 15) & 1) != 0)
128 }
129}
130#[doc = "Control Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ctrl](index.html) module"]
131pub struct CTRL_SPEC;
132impl crate::RegisterSpec for CTRL_SPEC {
133 type Ux = u32;
134}
135#[doc = "`read()` method returns [ctrl::R](R) reader structure"]
136impl crate::Readable for CTRL_SPEC {
137 type Reader = R;
138}
139#[doc = "`reset()` method sets CTRL to value 0"]
140impl crate::Resettable for CTRL_SPEC {
141 const RESET_VALUE: Self::Ux = 0;
142}