xmc4500/gpdma0/
rawsrctran.rs

1#[doc = "Register `RAWSRCTRAN` reader"]
2pub type R = crate::R<RAWSRCTRAN_SPEC>;
3#[doc = "Register `RAWSRCTRAN` writer"]
4pub type W = crate::W<RAWSRCTRAN_SPEC>;
5#[doc = "Field `CH0` reader - Raw Interrupt Status for channel 0"]
6pub type CH0_R = crate::BitReader;
7#[doc = "Field `CH0` writer - Raw Interrupt Status for channel 0"]
8pub type CH0_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `CH1` reader - Raw Interrupt Status for channel 1"]
10pub type CH1_R = crate::BitReader;
11#[doc = "Field `CH1` writer - Raw Interrupt Status for channel 1"]
12pub type CH1_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `CH2` reader - Raw Interrupt Status for channel 2"]
14pub type CH2_R = crate::BitReader;
15#[doc = "Field `CH2` writer - Raw Interrupt Status for channel 2"]
16pub type CH2_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `CH3` reader - Raw Interrupt Status for channel 3"]
18pub type CH3_R = crate::BitReader;
19#[doc = "Field `CH3` writer - Raw Interrupt Status for channel 3"]
20pub type CH3_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `CH4` reader - Raw Interrupt Status for channel 4"]
22pub type CH4_R = crate::BitReader;
23#[doc = "Field `CH4` writer - Raw Interrupt Status for channel 4"]
24pub type CH4_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `CH5` reader - Raw Interrupt Status for channel 5"]
26pub type CH5_R = crate::BitReader;
27#[doc = "Field `CH5` writer - Raw Interrupt Status for channel 5"]
28pub type CH5_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `CH6` reader - Raw Interrupt Status for channel 6"]
30pub type CH6_R = crate::BitReader;
31#[doc = "Field `CH6` writer - Raw Interrupt Status for channel 6"]
32pub type CH6_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `CH7` reader - Raw Interrupt Status for channel 7"]
34pub type CH7_R = crate::BitReader;
35#[doc = "Field `CH7` writer - Raw Interrupt Status for channel 7"]
36pub type CH7_W<'a, REG> = crate::BitWriter<'a, REG>;
37impl R {
38    #[doc = "Bit 0 - Raw Interrupt Status for channel 0"]
39    #[inline(always)]
40    pub fn ch0(&self) -> CH0_R {
41        CH0_R::new((self.bits & 1) != 0)
42    }
43    #[doc = "Bit 1 - Raw Interrupt Status for channel 1"]
44    #[inline(always)]
45    pub fn ch1(&self) -> CH1_R {
46        CH1_R::new(((self.bits >> 1) & 1) != 0)
47    }
48    #[doc = "Bit 2 - Raw Interrupt Status for channel 2"]
49    #[inline(always)]
50    pub fn ch2(&self) -> CH2_R {
51        CH2_R::new(((self.bits >> 2) & 1) != 0)
52    }
53    #[doc = "Bit 3 - Raw Interrupt Status for channel 3"]
54    #[inline(always)]
55    pub fn ch3(&self) -> CH3_R {
56        CH3_R::new(((self.bits >> 3) & 1) != 0)
57    }
58    #[doc = "Bit 4 - Raw Interrupt Status for channel 4"]
59    #[inline(always)]
60    pub fn ch4(&self) -> CH4_R {
61        CH4_R::new(((self.bits >> 4) & 1) != 0)
62    }
63    #[doc = "Bit 5 - Raw Interrupt Status for channel 5"]
64    #[inline(always)]
65    pub fn ch5(&self) -> CH5_R {
66        CH5_R::new(((self.bits >> 5) & 1) != 0)
67    }
68    #[doc = "Bit 6 - Raw Interrupt Status for channel 6"]
69    #[inline(always)]
70    pub fn ch6(&self) -> CH6_R {
71        CH6_R::new(((self.bits >> 6) & 1) != 0)
72    }
73    #[doc = "Bit 7 - Raw Interrupt Status for channel 7"]
74    #[inline(always)]
75    pub fn ch7(&self) -> CH7_R {
76        CH7_R::new(((self.bits >> 7) & 1) != 0)
77    }
78}
79impl W {
80    #[doc = "Bit 0 - Raw Interrupt Status for channel 0"]
81    #[inline(always)]
82    pub fn ch0(&mut self) -> CH0_W<RAWSRCTRAN_SPEC> {
83        CH0_W::new(self, 0)
84    }
85    #[doc = "Bit 1 - Raw Interrupt Status for channel 1"]
86    #[inline(always)]
87    pub fn ch1(&mut self) -> CH1_W<RAWSRCTRAN_SPEC> {
88        CH1_W::new(self, 1)
89    }
90    #[doc = "Bit 2 - Raw Interrupt Status for channel 2"]
91    #[inline(always)]
92    pub fn ch2(&mut self) -> CH2_W<RAWSRCTRAN_SPEC> {
93        CH2_W::new(self, 2)
94    }
95    #[doc = "Bit 3 - Raw Interrupt Status for channel 3"]
96    #[inline(always)]
97    pub fn ch3(&mut self) -> CH3_W<RAWSRCTRAN_SPEC> {
98        CH3_W::new(self, 3)
99    }
100    #[doc = "Bit 4 - Raw Interrupt Status for channel 4"]
101    #[inline(always)]
102    pub fn ch4(&mut self) -> CH4_W<RAWSRCTRAN_SPEC> {
103        CH4_W::new(self, 4)
104    }
105    #[doc = "Bit 5 - Raw Interrupt Status for channel 5"]
106    #[inline(always)]
107    pub fn ch5(&mut self) -> CH5_W<RAWSRCTRAN_SPEC> {
108        CH5_W::new(self, 5)
109    }
110    #[doc = "Bit 6 - Raw Interrupt Status for channel 6"]
111    #[inline(always)]
112    pub fn ch6(&mut self) -> CH6_W<RAWSRCTRAN_SPEC> {
113        CH6_W::new(self, 6)
114    }
115    #[doc = "Bit 7 - Raw Interrupt Status for channel 7"]
116    #[inline(always)]
117    pub fn ch7(&mut self) -> CH7_W<RAWSRCTRAN_SPEC> {
118        CH7_W::new(self, 7)
119    }
120}
121#[doc = "Raw IntSrcTran Status\n\nYou can [`read`](crate::Reg::read) this register and get [`rawsrctran::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`rawsrctran::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
122pub struct RAWSRCTRAN_SPEC;
123impl crate::RegisterSpec for RAWSRCTRAN_SPEC {
124    type Ux = u32;
125}
126#[doc = "`read()` method returns [`rawsrctran::R`](R) reader structure"]
127impl crate::Readable for RAWSRCTRAN_SPEC {}
128#[doc = "`write(|w| ..)` method takes [`rawsrctran::W`](W) writer structure"]
129impl crate::Writable for RAWSRCTRAN_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 RAWSRCTRAN to value 0"]
135impl crate::Resettable for RAWSRCTRAN_SPEC {
136    const RESET_VALUE: u32 = 0;
137}