xmc4400/dlr/
srsel0.rs

1#[doc = "Register `SRSEL0` reader"]
2pub type R = crate::R<SRSEL0_SPEC>;
3#[doc = "Register `SRSEL0` writer"]
4pub type W = crate::W<SRSEL0_SPEC>;
5#[doc = "Field `RS0` reader - Request Source for Line 0"]
6pub type RS0_R = crate::FieldReader;
7#[doc = "Field `RS0` writer - Request Source for Line 0"]
8pub type RS0_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
9#[doc = "Field `RS1` reader - Request Source for Line 1"]
10pub type RS1_R = crate::FieldReader;
11#[doc = "Field `RS1` writer - Request Source for Line 1"]
12pub type RS1_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
13#[doc = "Field `RS2` reader - Request Source for Line 2"]
14pub type RS2_R = crate::FieldReader;
15#[doc = "Field `RS2` writer - Request Source for Line 2"]
16pub type RS2_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
17#[doc = "Field `RS3` reader - Request Source for Line 3"]
18pub type RS3_R = crate::FieldReader;
19#[doc = "Field `RS3` writer - Request Source for Line 3"]
20pub type RS3_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
21#[doc = "Field `RS4` reader - Request Source for Line 4"]
22pub type RS4_R = crate::FieldReader;
23#[doc = "Field `RS4` writer - Request Source for Line 4"]
24pub type RS4_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
25#[doc = "Field `RS5` reader - Request Source for Line 5"]
26pub type RS5_R = crate::FieldReader;
27#[doc = "Field `RS5` writer - Request Source for Line 5"]
28pub type RS5_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
29#[doc = "Field `RS6` reader - Request Source for Line 6"]
30pub type RS6_R = crate::FieldReader;
31#[doc = "Field `RS6` writer - Request Source for Line 6"]
32pub type RS6_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
33#[doc = "Field `RS7` reader - Request Source for Line 7"]
34pub type RS7_R = crate::FieldReader;
35#[doc = "Field `RS7` writer - Request Source for Line 7"]
36pub type RS7_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
37impl R {
38    #[doc = "Bits 0:3 - Request Source for Line 0"]
39    #[inline(always)]
40    pub fn rs0(&self) -> RS0_R {
41        RS0_R::new((self.bits & 0x0f) as u8)
42    }
43    #[doc = "Bits 4:7 - Request Source for Line 1"]
44    #[inline(always)]
45    pub fn rs1(&self) -> RS1_R {
46        RS1_R::new(((self.bits >> 4) & 0x0f) as u8)
47    }
48    #[doc = "Bits 8:11 - Request Source for Line 2"]
49    #[inline(always)]
50    pub fn rs2(&self) -> RS2_R {
51        RS2_R::new(((self.bits >> 8) & 0x0f) as u8)
52    }
53    #[doc = "Bits 12:15 - Request Source for Line 3"]
54    #[inline(always)]
55    pub fn rs3(&self) -> RS3_R {
56        RS3_R::new(((self.bits >> 12) & 0x0f) as u8)
57    }
58    #[doc = "Bits 16:19 - Request Source for Line 4"]
59    #[inline(always)]
60    pub fn rs4(&self) -> RS4_R {
61        RS4_R::new(((self.bits >> 16) & 0x0f) as u8)
62    }
63    #[doc = "Bits 20:23 - Request Source for Line 5"]
64    #[inline(always)]
65    pub fn rs5(&self) -> RS5_R {
66        RS5_R::new(((self.bits >> 20) & 0x0f) as u8)
67    }
68    #[doc = "Bits 24:27 - Request Source for Line 6"]
69    #[inline(always)]
70    pub fn rs6(&self) -> RS6_R {
71        RS6_R::new(((self.bits >> 24) & 0x0f) as u8)
72    }
73    #[doc = "Bits 28:31 - Request Source for Line 7"]
74    #[inline(always)]
75    pub fn rs7(&self) -> RS7_R {
76        RS7_R::new(((self.bits >> 28) & 0x0f) as u8)
77    }
78}
79impl W {
80    #[doc = "Bits 0:3 - Request Source for Line 0"]
81    #[inline(always)]
82    pub fn rs0(&mut self) -> RS0_W<SRSEL0_SPEC> {
83        RS0_W::new(self, 0)
84    }
85    #[doc = "Bits 4:7 - Request Source for Line 1"]
86    #[inline(always)]
87    pub fn rs1(&mut self) -> RS1_W<SRSEL0_SPEC> {
88        RS1_W::new(self, 4)
89    }
90    #[doc = "Bits 8:11 - Request Source for Line 2"]
91    #[inline(always)]
92    pub fn rs2(&mut self) -> RS2_W<SRSEL0_SPEC> {
93        RS2_W::new(self, 8)
94    }
95    #[doc = "Bits 12:15 - Request Source for Line 3"]
96    #[inline(always)]
97    pub fn rs3(&mut self) -> RS3_W<SRSEL0_SPEC> {
98        RS3_W::new(self, 12)
99    }
100    #[doc = "Bits 16:19 - Request Source for Line 4"]
101    #[inline(always)]
102    pub fn rs4(&mut self) -> RS4_W<SRSEL0_SPEC> {
103        RS4_W::new(self, 16)
104    }
105    #[doc = "Bits 20:23 - Request Source for Line 5"]
106    #[inline(always)]
107    pub fn rs5(&mut self) -> RS5_W<SRSEL0_SPEC> {
108        RS5_W::new(self, 20)
109    }
110    #[doc = "Bits 24:27 - Request Source for Line 6"]
111    #[inline(always)]
112    pub fn rs6(&mut self) -> RS6_W<SRSEL0_SPEC> {
113        RS6_W::new(self, 24)
114    }
115    #[doc = "Bits 28:31 - Request Source for Line 7"]
116    #[inline(always)]
117    pub fn rs7(&mut self) -> RS7_W<SRSEL0_SPEC> {
118        RS7_W::new(self, 28)
119    }
120}
121#[doc = "Service Request Selection 0\n\nYou can [`read`](crate::Reg::read) this register and get [`srsel0::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`srsel0::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
122pub struct SRSEL0_SPEC;
123impl crate::RegisterSpec for SRSEL0_SPEC {
124    type Ux = u32;
125}
126#[doc = "`read()` method returns [`srsel0::R`](R) reader structure"]
127impl crate::Readable for SRSEL0_SPEC {}
128#[doc = "`write(|w| ..)` method takes [`srsel0::W`](W) writer structure"]
129impl crate::Writable for SRSEL0_SPEC {
130    type Safety = crate::Unsafe;
131    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
132    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
133}
134#[doc = "`reset()` method sets SRSEL0 to value 0"]
135impl crate::Resettable for SRSEL0_SPEC {
136    const RESET_VALUE: u32 = 0;
137}