atsam3u4e/dmac/
chsr.rs

1#[doc = "Register `CHSR` reader"]
2pub type R = crate::R<ChsrSpec>;
3#[doc = "Field `ENA0` reader - Enable \\[3:0\\]"]
4pub type Ena0R = crate::BitReader;
5#[doc = "Field `ENA1` reader - Enable \\[3:0\\]"]
6pub type Ena1R = crate::BitReader;
7#[doc = "Field `ENA2` reader - Enable \\[3:0\\]"]
8pub type Ena2R = crate::BitReader;
9#[doc = "Field `ENA3` reader - Enable \\[3:0\\]"]
10pub type Ena3R = crate::BitReader;
11#[doc = "Field `SUSP0` reader - Suspend \\[3:0\\]"]
12pub type Susp0R = crate::BitReader;
13#[doc = "Field `SUSP1` reader - Suspend \\[3:0\\]"]
14pub type Susp1R = crate::BitReader;
15#[doc = "Field `SUSP2` reader - Suspend \\[3:0\\]"]
16pub type Susp2R = crate::BitReader;
17#[doc = "Field `SUSP3` reader - Suspend \\[3:0\\]"]
18pub type Susp3R = crate::BitReader;
19#[doc = "Field `EMPT0` reader - Empty \\[3:0\\]"]
20pub type Empt0R = crate::BitReader;
21#[doc = "Field `EMPT1` reader - Empty \\[3:0\\]"]
22pub type Empt1R = crate::BitReader;
23#[doc = "Field `EMPT2` reader - Empty \\[3:0\\]"]
24pub type Empt2R = crate::BitReader;
25#[doc = "Field `EMPT3` reader - Empty \\[3:0\\]"]
26pub type Empt3R = crate::BitReader;
27#[doc = "Field `STAL0` reader - Stalled \\[3:0\\]"]
28pub type Stal0R = crate::BitReader;
29#[doc = "Field `STAL1` reader - Stalled \\[3:0\\]"]
30pub type Stal1R = crate::BitReader;
31#[doc = "Field `STAL2` reader - Stalled \\[3:0\\]"]
32pub type Stal2R = crate::BitReader;
33#[doc = "Field `STAL3` reader - Stalled \\[3:0\\]"]
34pub type Stal3R = crate::BitReader;
35impl R {
36    #[doc = "Bit 0 - Enable \\[3:0\\]"]
37    #[inline(always)]
38    pub fn ena0(&self) -> Ena0R {
39        Ena0R::new((self.bits & 1) != 0)
40    }
41    #[doc = "Bit 1 - Enable \\[3:0\\]"]
42    #[inline(always)]
43    pub fn ena1(&self) -> Ena1R {
44        Ena1R::new(((self.bits >> 1) & 1) != 0)
45    }
46    #[doc = "Bit 2 - Enable \\[3:0\\]"]
47    #[inline(always)]
48    pub fn ena2(&self) -> Ena2R {
49        Ena2R::new(((self.bits >> 2) & 1) != 0)
50    }
51    #[doc = "Bit 3 - Enable \\[3:0\\]"]
52    #[inline(always)]
53    pub fn ena3(&self) -> Ena3R {
54        Ena3R::new(((self.bits >> 3) & 1) != 0)
55    }
56    #[doc = "Bit 8 - Suspend \\[3:0\\]"]
57    #[inline(always)]
58    pub fn susp0(&self) -> Susp0R {
59        Susp0R::new(((self.bits >> 8) & 1) != 0)
60    }
61    #[doc = "Bit 9 - Suspend \\[3:0\\]"]
62    #[inline(always)]
63    pub fn susp1(&self) -> Susp1R {
64        Susp1R::new(((self.bits >> 9) & 1) != 0)
65    }
66    #[doc = "Bit 10 - Suspend \\[3:0\\]"]
67    #[inline(always)]
68    pub fn susp2(&self) -> Susp2R {
69        Susp2R::new(((self.bits >> 10) & 1) != 0)
70    }
71    #[doc = "Bit 11 - Suspend \\[3:0\\]"]
72    #[inline(always)]
73    pub fn susp3(&self) -> Susp3R {
74        Susp3R::new(((self.bits >> 11) & 1) != 0)
75    }
76    #[doc = "Bit 16 - Empty \\[3:0\\]"]
77    #[inline(always)]
78    pub fn empt0(&self) -> Empt0R {
79        Empt0R::new(((self.bits >> 16) & 1) != 0)
80    }
81    #[doc = "Bit 17 - Empty \\[3:0\\]"]
82    #[inline(always)]
83    pub fn empt1(&self) -> Empt1R {
84        Empt1R::new(((self.bits >> 17) & 1) != 0)
85    }
86    #[doc = "Bit 18 - Empty \\[3:0\\]"]
87    #[inline(always)]
88    pub fn empt2(&self) -> Empt2R {
89        Empt2R::new(((self.bits >> 18) & 1) != 0)
90    }
91    #[doc = "Bit 19 - Empty \\[3:0\\]"]
92    #[inline(always)]
93    pub fn empt3(&self) -> Empt3R {
94        Empt3R::new(((self.bits >> 19) & 1) != 0)
95    }
96    #[doc = "Bit 24 - Stalled \\[3:0\\]"]
97    #[inline(always)]
98    pub fn stal0(&self) -> Stal0R {
99        Stal0R::new(((self.bits >> 24) & 1) != 0)
100    }
101    #[doc = "Bit 25 - Stalled \\[3:0\\]"]
102    #[inline(always)]
103    pub fn stal1(&self) -> Stal1R {
104        Stal1R::new(((self.bits >> 25) & 1) != 0)
105    }
106    #[doc = "Bit 26 - Stalled \\[3:0\\]"]
107    #[inline(always)]
108    pub fn stal2(&self) -> Stal2R {
109        Stal2R::new(((self.bits >> 26) & 1) != 0)
110    }
111    #[doc = "Bit 27 - Stalled \\[3:0\\]"]
112    #[inline(always)]
113    pub fn stal3(&self) -> Stal3R {
114        Stal3R::new(((self.bits >> 27) & 1) != 0)
115    }
116}
117#[doc = "DMAC Channel Handler Status Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`chsr::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
118pub struct ChsrSpec;
119impl crate::RegisterSpec for ChsrSpec {
120    type Ux = u32;
121}
122#[doc = "`read()` method returns [`chsr::R`](R) reader structure"]
123impl crate::Readable for ChsrSpec {}
124#[doc = "`reset()` method sets CHSR to value 0x00ff_0000"]
125impl crate::Resettable for ChsrSpec {
126    const RESET_VALUE: u32 = 0x00ff_0000;
127}