atsaml21e18b/dmac/
pendch.rs

1#[doc = "Register `PENDCH` reader"]
2pub struct R(crate::R<PENDCH_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<PENDCH_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<PENDCH_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<PENDCH_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `PENDCH0` reader - Pending Channel 0"]
17pub type PENDCH0_R = crate::BitReader<bool>;
18#[doc = "Field `PENDCH1` reader - Pending Channel 1"]
19pub type PENDCH1_R = crate::BitReader<bool>;
20#[doc = "Field `PENDCH2` reader - Pending Channel 2"]
21pub type PENDCH2_R = crate::BitReader<bool>;
22#[doc = "Field `PENDCH3` reader - Pending Channel 3"]
23pub type PENDCH3_R = crate::BitReader<bool>;
24#[doc = "Field `PENDCH4` reader - Pending Channel 4"]
25pub type PENDCH4_R = crate::BitReader<bool>;
26#[doc = "Field `PENDCH5` reader - Pending Channel 5"]
27pub type PENDCH5_R = crate::BitReader<bool>;
28#[doc = "Field `PENDCH6` reader - Pending Channel 6"]
29pub type PENDCH6_R = crate::BitReader<bool>;
30#[doc = "Field `PENDCH7` reader - Pending Channel 7"]
31pub type PENDCH7_R = crate::BitReader<bool>;
32#[doc = "Field `PENDCH8` reader - Pending Channel 8"]
33pub type PENDCH8_R = crate::BitReader<bool>;
34#[doc = "Field `PENDCH9` reader - Pending Channel 9"]
35pub type PENDCH9_R = crate::BitReader<bool>;
36#[doc = "Field `PENDCH10` reader - Pending Channel 10"]
37pub type PENDCH10_R = crate::BitReader<bool>;
38#[doc = "Field `PENDCH11` reader - Pending Channel 11"]
39pub type PENDCH11_R = crate::BitReader<bool>;
40#[doc = "Field `PENDCH12` reader - Pending Channel 12"]
41pub type PENDCH12_R = crate::BitReader<bool>;
42#[doc = "Field `PENDCH13` reader - Pending Channel 13"]
43pub type PENDCH13_R = crate::BitReader<bool>;
44#[doc = "Field `PENDCH14` reader - Pending Channel 14"]
45pub type PENDCH14_R = crate::BitReader<bool>;
46#[doc = "Field `PENDCH15` reader - Pending Channel 15"]
47pub type PENDCH15_R = crate::BitReader<bool>;
48impl R {
49    #[doc = "Bit 0 - Pending Channel 0"]
50    #[inline(always)]
51    pub fn pendch0(&self) -> PENDCH0_R {
52        PENDCH0_R::new((self.bits & 1) != 0)
53    }
54    #[doc = "Bit 1 - Pending Channel 1"]
55    #[inline(always)]
56    pub fn pendch1(&self) -> PENDCH1_R {
57        PENDCH1_R::new(((self.bits >> 1) & 1) != 0)
58    }
59    #[doc = "Bit 2 - Pending Channel 2"]
60    #[inline(always)]
61    pub fn pendch2(&self) -> PENDCH2_R {
62        PENDCH2_R::new(((self.bits >> 2) & 1) != 0)
63    }
64    #[doc = "Bit 3 - Pending Channel 3"]
65    #[inline(always)]
66    pub fn pendch3(&self) -> PENDCH3_R {
67        PENDCH3_R::new(((self.bits >> 3) & 1) != 0)
68    }
69    #[doc = "Bit 4 - Pending Channel 4"]
70    #[inline(always)]
71    pub fn pendch4(&self) -> PENDCH4_R {
72        PENDCH4_R::new(((self.bits >> 4) & 1) != 0)
73    }
74    #[doc = "Bit 5 - Pending Channel 5"]
75    #[inline(always)]
76    pub fn pendch5(&self) -> PENDCH5_R {
77        PENDCH5_R::new(((self.bits >> 5) & 1) != 0)
78    }
79    #[doc = "Bit 6 - Pending Channel 6"]
80    #[inline(always)]
81    pub fn pendch6(&self) -> PENDCH6_R {
82        PENDCH6_R::new(((self.bits >> 6) & 1) != 0)
83    }
84    #[doc = "Bit 7 - Pending Channel 7"]
85    #[inline(always)]
86    pub fn pendch7(&self) -> PENDCH7_R {
87        PENDCH7_R::new(((self.bits >> 7) & 1) != 0)
88    }
89    #[doc = "Bit 8 - Pending Channel 8"]
90    #[inline(always)]
91    pub fn pendch8(&self) -> PENDCH8_R {
92        PENDCH8_R::new(((self.bits >> 8) & 1) != 0)
93    }
94    #[doc = "Bit 9 - Pending Channel 9"]
95    #[inline(always)]
96    pub fn pendch9(&self) -> PENDCH9_R {
97        PENDCH9_R::new(((self.bits >> 9) & 1) != 0)
98    }
99    #[doc = "Bit 10 - Pending Channel 10"]
100    #[inline(always)]
101    pub fn pendch10(&self) -> PENDCH10_R {
102        PENDCH10_R::new(((self.bits >> 10) & 1) != 0)
103    }
104    #[doc = "Bit 11 - Pending Channel 11"]
105    #[inline(always)]
106    pub fn pendch11(&self) -> PENDCH11_R {
107        PENDCH11_R::new(((self.bits >> 11) & 1) != 0)
108    }
109    #[doc = "Bit 12 - Pending Channel 12"]
110    #[inline(always)]
111    pub fn pendch12(&self) -> PENDCH12_R {
112        PENDCH12_R::new(((self.bits >> 12) & 1) != 0)
113    }
114    #[doc = "Bit 13 - Pending Channel 13"]
115    #[inline(always)]
116    pub fn pendch13(&self) -> PENDCH13_R {
117        PENDCH13_R::new(((self.bits >> 13) & 1) != 0)
118    }
119    #[doc = "Bit 14 - Pending Channel 14"]
120    #[inline(always)]
121    pub fn pendch14(&self) -> PENDCH14_R {
122        PENDCH14_R::new(((self.bits >> 14) & 1) != 0)
123    }
124    #[doc = "Bit 15 - Pending Channel 15"]
125    #[inline(always)]
126    pub fn pendch15(&self) -> PENDCH15_R {
127        PENDCH15_R::new(((self.bits >> 15) & 1) != 0)
128    }
129}
130#[doc = "Pending Channels\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 [pendch](index.html) module"]
131pub struct PENDCH_SPEC;
132impl crate::RegisterSpec for PENDCH_SPEC {
133    type Ux = u32;
134}
135#[doc = "`read()` method returns [pendch::R](R) reader structure"]
136impl crate::Readable for PENDCH_SPEC {
137    type Reader = R;
138}
139#[doc = "`reset()` method sets PENDCH to value 0"]
140impl crate::Resettable for PENDCH_SPEC {
141    const RESET_VALUE: Self::Ux = 0;
142}