tm4c123x/udma/
chmap1.rs

1#[doc = "Reader of register CHMAP1"]
2pub type R = crate::R<u32, super::CHMAP1>;
3#[doc = "Writer for register CHMAP1"]
4pub type W = crate::W<u32, super::CHMAP1>;
5#[doc = "Register CHMAP1 `reset()`'s with value 0"]
6impl crate::ResetValue for super::CHMAP1 {
7    type Type = u32;
8    #[inline(always)]
9    fn reset_value() -> Self::Type {
10        0
11    }
12}
13#[doc = "Reader of field `CH8SEL`"]
14pub type CH8SEL_R = crate::R<u8, u8>;
15#[doc = "Write proxy for field `CH8SEL`"]
16pub struct CH8SEL_W<'a> {
17    w: &'a mut W,
18}
19impl<'a> CH8SEL_W<'a> {
20    #[doc = r"Writes raw bits to the field"]
21    #[inline(always)]
22    pub unsafe fn bits(self, value: u8) -> &'a mut W {
23        self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f);
24        self.w
25    }
26}
27#[doc = "Reader of field `CH9SEL`"]
28pub type CH9SEL_R = crate::R<u8, u8>;
29#[doc = "Write proxy for field `CH9SEL`"]
30pub struct CH9SEL_W<'a> {
31    w: &'a mut W,
32}
33impl<'a> CH9SEL_W<'a> {
34    #[doc = r"Writes raw bits to the field"]
35    #[inline(always)]
36    pub unsafe fn bits(self, value: u8) -> &'a mut W {
37        self.w.bits = (self.w.bits & !(0x0f << 4)) | (((value as u32) & 0x0f) << 4);
38        self.w
39    }
40}
41#[doc = "Reader of field `CH10SEL`"]
42pub type CH10SEL_R = crate::R<u8, u8>;
43#[doc = "Write proxy for field `CH10SEL`"]
44pub struct CH10SEL_W<'a> {
45    w: &'a mut W,
46}
47impl<'a> CH10SEL_W<'a> {
48    #[doc = r"Writes raw bits to the field"]
49    #[inline(always)]
50    pub unsafe fn bits(self, value: u8) -> &'a mut W {
51        self.w.bits = (self.w.bits & !(0x0f << 8)) | (((value as u32) & 0x0f) << 8);
52        self.w
53    }
54}
55#[doc = "Reader of field `CH11SEL`"]
56pub type CH11SEL_R = crate::R<u8, u8>;
57#[doc = "Write proxy for field `CH11SEL`"]
58pub struct CH11SEL_W<'a> {
59    w: &'a mut W,
60}
61impl<'a> CH11SEL_W<'a> {
62    #[doc = r"Writes raw bits to the field"]
63    #[inline(always)]
64    pub unsafe fn bits(self, value: u8) -> &'a mut W {
65        self.w.bits = (self.w.bits & !(0x0f << 12)) | (((value as u32) & 0x0f) << 12);
66        self.w
67    }
68}
69#[doc = "Reader of field `CH12SEL`"]
70pub type CH12SEL_R = crate::R<u8, u8>;
71#[doc = "Write proxy for field `CH12SEL`"]
72pub struct CH12SEL_W<'a> {
73    w: &'a mut W,
74}
75impl<'a> CH12SEL_W<'a> {
76    #[doc = r"Writes raw bits to the field"]
77    #[inline(always)]
78    pub unsafe fn bits(self, value: u8) -> &'a mut W {
79        self.w.bits = (self.w.bits & !(0x0f << 16)) | (((value as u32) & 0x0f) << 16);
80        self.w
81    }
82}
83#[doc = "Reader of field `CH13SEL`"]
84pub type CH13SEL_R = crate::R<u8, u8>;
85#[doc = "Write proxy for field `CH13SEL`"]
86pub struct CH13SEL_W<'a> {
87    w: &'a mut W,
88}
89impl<'a> CH13SEL_W<'a> {
90    #[doc = r"Writes raw bits to the field"]
91    #[inline(always)]
92    pub unsafe fn bits(self, value: u8) -> &'a mut W {
93        self.w.bits = (self.w.bits & !(0x0f << 20)) | (((value as u32) & 0x0f) << 20);
94        self.w
95    }
96}
97#[doc = "Reader of field `CH14SEL`"]
98pub type CH14SEL_R = crate::R<u8, u8>;
99#[doc = "Write proxy for field `CH14SEL`"]
100pub struct CH14SEL_W<'a> {
101    w: &'a mut W,
102}
103impl<'a> CH14SEL_W<'a> {
104    #[doc = r"Writes raw bits to the field"]
105    #[inline(always)]
106    pub unsafe fn bits(self, value: u8) -> &'a mut W {
107        self.w.bits = (self.w.bits & !(0x0f << 24)) | (((value as u32) & 0x0f) << 24);
108        self.w
109    }
110}
111#[doc = "Reader of field `CH15SEL`"]
112pub type CH15SEL_R = crate::R<u8, u8>;
113#[doc = "Write proxy for field `CH15SEL`"]
114pub struct CH15SEL_W<'a> {
115    w: &'a mut W,
116}
117impl<'a> CH15SEL_W<'a> {
118    #[doc = r"Writes raw bits to the field"]
119    #[inline(always)]
120    pub unsafe fn bits(self, value: u8) -> &'a mut W {
121        self.w.bits = (self.w.bits & !(0x0f << 28)) | (((value as u32) & 0x0f) << 28);
122        self.w
123    }
124}
125impl R {
126    #[doc = "Bits 0:3 - uDMA Channel 8 Source Select"]
127    #[inline(always)]
128    pub fn ch8sel(&self) -> CH8SEL_R {
129        CH8SEL_R::new((self.bits & 0x0f) as u8)
130    }
131    #[doc = "Bits 4:7 - uDMA Channel 9 Source Select"]
132    #[inline(always)]
133    pub fn ch9sel(&self) -> CH9SEL_R {
134        CH9SEL_R::new(((self.bits >> 4) & 0x0f) as u8)
135    }
136    #[doc = "Bits 8:11 - uDMA Channel 10 Source Select"]
137    #[inline(always)]
138    pub fn ch10sel(&self) -> CH10SEL_R {
139        CH10SEL_R::new(((self.bits >> 8) & 0x0f) as u8)
140    }
141    #[doc = "Bits 12:15 - uDMA Channel 11 Source Select"]
142    #[inline(always)]
143    pub fn ch11sel(&self) -> CH11SEL_R {
144        CH11SEL_R::new(((self.bits >> 12) & 0x0f) as u8)
145    }
146    #[doc = "Bits 16:19 - uDMA Channel 12 Source Select"]
147    #[inline(always)]
148    pub fn ch12sel(&self) -> CH12SEL_R {
149        CH12SEL_R::new(((self.bits >> 16) & 0x0f) as u8)
150    }
151    #[doc = "Bits 20:23 - uDMA Channel 13 Source Select"]
152    #[inline(always)]
153    pub fn ch13sel(&self) -> CH13SEL_R {
154        CH13SEL_R::new(((self.bits >> 20) & 0x0f) as u8)
155    }
156    #[doc = "Bits 24:27 - uDMA Channel 14 Source Select"]
157    #[inline(always)]
158    pub fn ch14sel(&self) -> CH14SEL_R {
159        CH14SEL_R::new(((self.bits >> 24) & 0x0f) as u8)
160    }
161    #[doc = "Bits 28:31 - uDMA Channel 15 Source Select"]
162    #[inline(always)]
163    pub fn ch15sel(&self) -> CH15SEL_R {
164        CH15SEL_R::new(((self.bits >> 28) & 0x0f) as u8)
165    }
166}
167impl W {
168    #[doc = "Bits 0:3 - uDMA Channel 8 Source Select"]
169    #[inline(always)]
170    pub fn ch8sel(&mut self) -> CH8SEL_W {
171        CH8SEL_W { w: self }
172    }
173    #[doc = "Bits 4:7 - uDMA Channel 9 Source Select"]
174    #[inline(always)]
175    pub fn ch9sel(&mut self) -> CH9SEL_W {
176        CH9SEL_W { w: self }
177    }
178    #[doc = "Bits 8:11 - uDMA Channel 10 Source Select"]
179    #[inline(always)]
180    pub fn ch10sel(&mut self) -> CH10SEL_W {
181        CH10SEL_W { w: self }
182    }
183    #[doc = "Bits 12:15 - uDMA Channel 11 Source Select"]
184    #[inline(always)]
185    pub fn ch11sel(&mut self) -> CH11SEL_W {
186        CH11SEL_W { w: self }
187    }
188    #[doc = "Bits 16:19 - uDMA Channel 12 Source Select"]
189    #[inline(always)]
190    pub fn ch12sel(&mut self) -> CH12SEL_W {
191        CH12SEL_W { w: self }
192    }
193    #[doc = "Bits 20:23 - uDMA Channel 13 Source Select"]
194    #[inline(always)]
195    pub fn ch13sel(&mut self) -> CH13SEL_W {
196        CH13SEL_W { w: self }
197    }
198    #[doc = "Bits 24:27 - uDMA Channel 14 Source Select"]
199    #[inline(always)]
200    pub fn ch14sel(&mut self) -> CH14SEL_W {
201        CH14SEL_W { w: self }
202    }
203    #[doc = "Bits 28:31 - uDMA Channel 15 Source Select"]
204    #[inline(always)]
205    pub fn ch15sel(&mut self) -> CH15SEL_W {
206        CH15SEL_W { w: self }
207    }
208}