atsam3n00b/pwm/
isr.rs

1#[doc = "Register `ISR` reader"]
2pub type R = crate::R<IsrSpec>;
3#[doc = "Field `CHID0` reader - Channel ID"]
4pub type Chid0R = crate::BitReader;
5#[doc = "Field `CHID1` reader - Channel ID"]
6pub type Chid1R = crate::BitReader;
7#[doc = "Field `CHID2` reader - Channel ID"]
8pub type Chid2R = crate::BitReader;
9#[doc = "Field `CHID3` reader - Channel ID"]
10pub type Chid3R = crate::BitReader;
11impl R {
12    #[doc = "Bit 0 - Channel ID"]
13    #[inline(always)]
14    pub fn chid0(&self) -> Chid0R {
15        Chid0R::new((self.bits & 1) != 0)
16    }
17    #[doc = "Bit 1 - Channel ID"]
18    #[inline(always)]
19    pub fn chid1(&self) -> Chid1R {
20        Chid1R::new(((self.bits >> 1) & 1) != 0)
21    }
22    #[doc = "Bit 2 - Channel ID"]
23    #[inline(always)]
24    pub fn chid2(&self) -> Chid2R {
25        Chid2R::new(((self.bits >> 2) & 1) != 0)
26    }
27    #[doc = "Bit 3 - Channel ID"]
28    #[inline(always)]
29    pub fn chid3(&self) -> Chid3R {
30        Chid3R::new(((self.bits >> 3) & 1) != 0)
31    }
32}
33#[doc = "PWM Interrupt Status Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`isr::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
34pub struct IsrSpec;
35impl crate::RegisterSpec for IsrSpec {
36    type Ux = u32;
37}
38#[doc = "`read()` method returns [`isr::R`](R) reader structure"]
39impl crate::Readable for IsrSpec {}
40#[doc = "`reset()` method sets ISR to value 0"]
41impl crate::Resettable for IsrSpec {
42    const RESET_VALUE: u32 = 0;
43}