atsam3x8h/pwm/
isr2.rs

1#[doc = "Register `ISR2` reader"]
2pub type R = crate::R<Isr2Spec>;
3#[doc = "Field `WRDY` reader - Write Ready for Synchronous Channels Update"]
4pub type WrdyR = crate::BitReader;
5#[doc = "Field `ENDTX` reader - PDC End of TX Buffer"]
6pub type EndtxR = crate::BitReader;
7#[doc = "Field `TXBUFE` reader - PDC TX Buffer Empty"]
8pub type TxbufeR = crate::BitReader;
9#[doc = "Field `UNRE` reader - Synchronous Channels Update Underrun Error"]
10pub type UnreR = crate::BitReader;
11#[doc = "Field `CMPM0` reader - Comparison 0 Match"]
12pub type Cmpm0R = crate::BitReader;
13#[doc = "Field `CMPM1` reader - Comparison 1 Match"]
14pub type Cmpm1R = crate::BitReader;
15#[doc = "Field `CMPM2` reader - Comparison 2 Match"]
16pub type Cmpm2R = crate::BitReader;
17#[doc = "Field `CMPM3` reader - Comparison 3 Match"]
18pub type Cmpm3R = crate::BitReader;
19#[doc = "Field `CMPM4` reader - Comparison 4 Match"]
20pub type Cmpm4R = crate::BitReader;
21#[doc = "Field `CMPM5` reader - Comparison 5 Match"]
22pub type Cmpm5R = crate::BitReader;
23#[doc = "Field `CMPM6` reader - Comparison 6 Match"]
24pub type Cmpm6R = crate::BitReader;
25#[doc = "Field `CMPM7` reader - Comparison 7 Match"]
26pub type Cmpm7R = crate::BitReader;
27#[doc = "Field `CMPU0` reader - Comparison 0 Update"]
28pub type Cmpu0R = crate::BitReader;
29#[doc = "Field `CMPU1` reader - Comparison 1 Update"]
30pub type Cmpu1R = crate::BitReader;
31#[doc = "Field `CMPU2` reader - Comparison 2 Update"]
32pub type Cmpu2R = crate::BitReader;
33#[doc = "Field `CMPU3` reader - Comparison 3 Update"]
34pub type Cmpu3R = crate::BitReader;
35#[doc = "Field `CMPU4` reader - Comparison 4 Update"]
36pub type Cmpu4R = crate::BitReader;
37#[doc = "Field `CMPU5` reader - Comparison 5 Update"]
38pub type Cmpu5R = crate::BitReader;
39#[doc = "Field `CMPU6` reader - Comparison 6 Update"]
40pub type Cmpu6R = crate::BitReader;
41#[doc = "Field `CMPU7` reader - Comparison 7 Update"]
42pub type Cmpu7R = crate::BitReader;
43impl R {
44    #[doc = "Bit 0 - Write Ready for Synchronous Channels Update"]
45    #[inline(always)]
46    pub fn wrdy(&self) -> WrdyR {
47        WrdyR::new((self.bits & 1) != 0)
48    }
49    #[doc = "Bit 1 - PDC End of TX Buffer"]
50    #[inline(always)]
51    pub fn endtx(&self) -> EndtxR {
52        EndtxR::new(((self.bits >> 1) & 1) != 0)
53    }
54    #[doc = "Bit 2 - PDC TX Buffer Empty"]
55    #[inline(always)]
56    pub fn txbufe(&self) -> TxbufeR {
57        TxbufeR::new(((self.bits >> 2) & 1) != 0)
58    }
59    #[doc = "Bit 3 - Synchronous Channels Update Underrun Error"]
60    #[inline(always)]
61    pub fn unre(&self) -> UnreR {
62        UnreR::new(((self.bits >> 3) & 1) != 0)
63    }
64    #[doc = "Bit 8 - Comparison 0 Match"]
65    #[inline(always)]
66    pub fn cmpm0(&self) -> Cmpm0R {
67        Cmpm0R::new(((self.bits >> 8) & 1) != 0)
68    }
69    #[doc = "Bit 9 - Comparison 1 Match"]
70    #[inline(always)]
71    pub fn cmpm1(&self) -> Cmpm1R {
72        Cmpm1R::new(((self.bits >> 9) & 1) != 0)
73    }
74    #[doc = "Bit 10 - Comparison 2 Match"]
75    #[inline(always)]
76    pub fn cmpm2(&self) -> Cmpm2R {
77        Cmpm2R::new(((self.bits >> 10) & 1) != 0)
78    }
79    #[doc = "Bit 11 - Comparison 3 Match"]
80    #[inline(always)]
81    pub fn cmpm3(&self) -> Cmpm3R {
82        Cmpm3R::new(((self.bits >> 11) & 1) != 0)
83    }
84    #[doc = "Bit 12 - Comparison 4 Match"]
85    #[inline(always)]
86    pub fn cmpm4(&self) -> Cmpm4R {
87        Cmpm4R::new(((self.bits >> 12) & 1) != 0)
88    }
89    #[doc = "Bit 13 - Comparison 5 Match"]
90    #[inline(always)]
91    pub fn cmpm5(&self) -> Cmpm5R {
92        Cmpm5R::new(((self.bits >> 13) & 1) != 0)
93    }
94    #[doc = "Bit 14 - Comparison 6 Match"]
95    #[inline(always)]
96    pub fn cmpm6(&self) -> Cmpm6R {
97        Cmpm6R::new(((self.bits >> 14) & 1) != 0)
98    }
99    #[doc = "Bit 15 - Comparison 7 Match"]
100    #[inline(always)]
101    pub fn cmpm7(&self) -> Cmpm7R {
102        Cmpm7R::new(((self.bits >> 15) & 1) != 0)
103    }
104    #[doc = "Bit 16 - Comparison 0 Update"]
105    #[inline(always)]
106    pub fn cmpu0(&self) -> Cmpu0R {
107        Cmpu0R::new(((self.bits >> 16) & 1) != 0)
108    }
109    #[doc = "Bit 17 - Comparison 1 Update"]
110    #[inline(always)]
111    pub fn cmpu1(&self) -> Cmpu1R {
112        Cmpu1R::new(((self.bits >> 17) & 1) != 0)
113    }
114    #[doc = "Bit 18 - Comparison 2 Update"]
115    #[inline(always)]
116    pub fn cmpu2(&self) -> Cmpu2R {
117        Cmpu2R::new(((self.bits >> 18) & 1) != 0)
118    }
119    #[doc = "Bit 19 - Comparison 3 Update"]
120    #[inline(always)]
121    pub fn cmpu3(&self) -> Cmpu3R {
122        Cmpu3R::new(((self.bits >> 19) & 1) != 0)
123    }
124    #[doc = "Bit 20 - Comparison 4 Update"]
125    #[inline(always)]
126    pub fn cmpu4(&self) -> Cmpu4R {
127        Cmpu4R::new(((self.bits >> 20) & 1) != 0)
128    }
129    #[doc = "Bit 21 - Comparison 5 Update"]
130    #[inline(always)]
131    pub fn cmpu5(&self) -> Cmpu5R {
132        Cmpu5R::new(((self.bits >> 21) & 1) != 0)
133    }
134    #[doc = "Bit 22 - Comparison 6 Update"]
135    #[inline(always)]
136    pub fn cmpu6(&self) -> Cmpu6R {
137        Cmpu6R::new(((self.bits >> 22) & 1) != 0)
138    }
139    #[doc = "Bit 23 - Comparison 7 Update"]
140    #[inline(always)]
141    pub fn cmpu7(&self) -> Cmpu7R {
142        Cmpu7R::new(((self.bits >> 23) & 1) != 0)
143    }
144}
145#[doc = "PWM Interrupt Status Register 2\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`isr2::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
146pub struct Isr2Spec;
147impl crate::RegisterSpec for Isr2Spec {
148    type Ux = u32;
149}
150#[doc = "`read()` method returns [`isr2::R`](R) reader structure"]
151impl crate::Readable for Isr2Spec {}
152#[doc = "`reset()` method sets ISR2 to value 0"]
153impl crate::Resettable for Isr2Spec {
154    const RESET_VALUE: u32 = 0;
155}