xmc4300/vadc_g0/
alias.rs

1#[doc = "Register `ALIAS` reader"]
2pub type R = crate::R<ALIAS_SPEC>;
3#[doc = "Register `ALIAS` writer"]
4pub type W = crate::W<ALIAS_SPEC>;
5#[doc = "Field `ALIAS0` reader - Alias Value for CH0 Conversion Requests"]
6pub type ALIAS0_R = crate::FieldReader;
7#[doc = "Field `ALIAS0` writer - Alias Value for CH0 Conversion Requests"]
8pub type ALIAS0_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
9#[doc = "Field `ALIAS1` reader - Alias Value for CH1 Conversion Requests"]
10pub type ALIAS1_R = crate::FieldReader;
11#[doc = "Field `ALIAS1` writer - Alias Value for CH1 Conversion Requests"]
12pub type ALIAS1_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
13impl R {
14    #[doc = "Bits 0:4 - Alias Value for CH0 Conversion Requests"]
15    #[inline(always)]
16    pub fn alias0(&self) -> ALIAS0_R {
17        ALIAS0_R::new((self.bits & 0x1f) as u8)
18    }
19    #[doc = "Bits 8:12 - Alias Value for CH1 Conversion Requests"]
20    #[inline(always)]
21    pub fn alias1(&self) -> ALIAS1_R {
22        ALIAS1_R::new(((self.bits >> 8) & 0x1f) as u8)
23    }
24}
25impl W {
26    #[doc = "Bits 0:4 - Alias Value for CH0 Conversion Requests"]
27    #[inline(always)]
28    pub fn alias0(&mut self) -> ALIAS0_W<ALIAS_SPEC> {
29        ALIAS0_W::new(self, 0)
30    }
31    #[doc = "Bits 8:12 - Alias Value for CH1 Conversion Requests"]
32    #[inline(always)]
33    pub fn alias1(&mut self) -> ALIAS1_W<ALIAS_SPEC> {
34        ALIAS1_W::new(self, 8)
35    }
36}
37#[doc = "Alias Register\n\nYou can [`read`](crate::Reg::read) this register and get [`alias::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`alias::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
38pub struct ALIAS_SPEC;
39impl crate::RegisterSpec for ALIAS_SPEC {
40    type Ux = u32;
41}
42#[doc = "`read()` method returns [`alias::R`](R) reader structure"]
43impl crate::Readable for ALIAS_SPEC {}
44#[doc = "`write(|w| ..)` method takes [`alias::W`](W) writer structure"]
45impl crate::Writable for ALIAS_SPEC {
46    type Safety = crate::Unsafe;
47    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
48    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
49}
50#[doc = "`reset()` method sets ALIAS to value 0x0100"]
51impl crate::Resettable for ALIAS_SPEC {
52    const RESET_VALUE: u32 = 0x0100;
53}