atsamd11c/evsys/
chstatus.rs

1#[doc = "Register `CHSTATUS` reader"]
2pub type R = crate::R<ChstatusSpec>;
3#[doc = "Field `USRRDY0` reader - Channel 0 User Ready"]
4pub type Usrrdy0R = crate::BitReader;
5#[doc = "Field `USRRDY1` reader - Channel 1 User Ready"]
6pub type Usrrdy1R = crate::BitReader;
7#[doc = "Field `USRRDY2` reader - Channel 2 User Ready"]
8pub type Usrrdy2R = crate::BitReader;
9#[doc = "Field `USRRDY3` reader - Channel 3 User Ready"]
10pub type Usrrdy3R = crate::BitReader;
11#[doc = "Field `USRRDY4` reader - Channel 4 User Ready"]
12pub type Usrrdy4R = crate::BitReader;
13#[doc = "Field `USRRDY5` reader - Channel 5 User Ready"]
14pub type Usrrdy5R = crate::BitReader;
15#[doc = "Field `CHBUSY0` reader - Channel 0 Busy"]
16pub type Chbusy0R = crate::BitReader;
17#[doc = "Field `CHBUSY1` reader - Channel 1 Busy"]
18pub type Chbusy1R = crate::BitReader;
19#[doc = "Field `CHBUSY2` reader - Channel 2 Busy"]
20pub type Chbusy2R = crate::BitReader;
21#[doc = "Field `CHBUSY3` reader - Channel 3 Busy"]
22pub type Chbusy3R = crate::BitReader;
23#[doc = "Field `CHBUSY4` reader - Channel 4 Busy"]
24pub type Chbusy4R = crate::BitReader;
25#[doc = "Field `CHBUSY5` reader - Channel 5 Busy"]
26pub type Chbusy5R = crate::BitReader;
27impl R {
28    #[doc = "Bit 0 - Channel 0 User Ready"]
29    #[inline(always)]
30    pub fn usrrdy0(&self) -> Usrrdy0R {
31        Usrrdy0R::new((self.bits & 1) != 0)
32    }
33    #[doc = "Bit 1 - Channel 1 User Ready"]
34    #[inline(always)]
35    pub fn usrrdy1(&self) -> Usrrdy1R {
36        Usrrdy1R::new(((self.bits >> 1) & 1) != 0)
37    }
38    #[doc = "Bit 2 - Channel 2 User Ready"]
39    #[inline(always)]
40    pub fn usrrdy2(&self) -> Usrrdy2R {
41        Usrrdy2R::new(((self.bits >> 2) & 1) != 0)
42    }
43    #[doc = "Bit 3 - Channel 3 User Ready"]
44    #[inline(always)]
45    pub fn usrrdy3(&self) -> Usrrdy3R {
46        Usrrdy3R::new(((self.bits >> 3) & 1) != 0)
47    }
48    #[doc = "Bit 4 - Channel 4 User Ready"]
49    #[inline(always)]
50    pub fn usrrdy4(&self) -> Usrrdy4R {
51        Usrrdy4R::new(((self.bits >> 4) & 1) != 0)
52    }
53    #[doc = "Bit 5 - Channel 5 User Ready"]
54    #[inline(always)]
55    pub fn usrrdy5(&self) -> Usrrdy5R {
56        Usrrdy5R::new(((self.bits >> 5) & 1) != 0)
57    }
58    #[doc = "Bit 8 - Channel 0 Busy"]
59    #[inline(always)]
60    pub fn chbusy0(&self) -> Chbusy0R {
61        Chbusy0R::new(((self.bits >> 8) & 1) != 0)
62    }
63    #[doc = "Bit 9 - Channel 1 Busy"]
64    #[inline(always)]
65    pub fn chbusy1(&self) -> Chbusy1R {
66        Chbusy1R::new(((self.bits >> 9) & 1) != 0)
67    }
68    #[doc = "Bit 10 - Channel 2 Busy"]
69    #[inline(always)]
70    pub fn chbusy2(&self) -> Chbusy2R {
71        Chbusy2R::new(((self.bits >> 10) & 1) != 0)
72    }
73    #[doc = "Bit 11 - Channel 3 Busy"]
74    #[inline(always)]
75    pub fn chbusy3(&self) -> Chbusy3R {
76        Chbusy3R::new(((self.bits >> 11) & 1) != 0)
77    }
78    #[doc = "Bit 12 - Channel 4 Busy"]
79    #[inline(always)]
80    pub fn chbusy4(&self) -> Chbusy4R {
81        Chbusy4R::new(((self.bits >> 12) & 1) != 0)
82    }
83    #[doc = "Bit 13 - Channel 5 Busy"]
84    #[inline(always)]
85    pub fn chbusy5(&self) -> Chbusy5R {
86        Chbusy5R::new(((self.bits >> 13) & 1) != 0)
87    }
88}
89#[doc = "Channel Status\n\nYou can [`read`](crate::Reg::read) this register and get [`chstatus::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
90pub struct ChstatusSpec;
91impl crate::RegisterSpec for ChstatusSpec {
92    type Ux = u32;
93}
94#[doc = "`read()` method returns [`chstatus::R`](R) reader structure"]
95impl crate::Readable for ChstatusSpec {}
96#[doc = "`reset()` method sets CHSTATUS to value 0x3f"]
97impl crate::Resettable for ChstatusSpec {
98    const RESET_VALUE: u32 = 0x3f;
99}