xmc4100/vadc/
emuxsel.rs

1#[doc = "Register `EMUXSEL` reader"]
2pub type R = crate::R<EMUXSEL_SPEC>;
3#[doc = "Register `EMUXSEL` writer"]
4pub type W = crate::W<EMUXSEL_SPEC>;
5#[doc = "Field `EMUXGRP0` reader - External Multiplexer Group for Interface x"]
6pub type EMUXGRP0_R = crate::FieldReader;
7#[doc = "Field `EMUXGRP0` writer - External Multiplexer Group for Interface x"]
8pub type EMUXGRP0_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
9#[doc = "Field `EMUXGRP1` reader - External Multiplexer Group for Interface x"]
10pub type EMUXGRP1_R = crate::FieldReader;
11#[doc = "Field `EMUXGRP1` writer - External Multiplexer Group for Interface x"]
12pub type EMUXGRP1_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
13impl R {
14    #[doc = "Bits 0:3 - External Multiplexer Group for Interface x"]
15    #[inline(always)]
16    pub fn emuxgrp0(&self) -> EMUXGRP0_R {
17        EMUXGRP0_R::new((self.bits & 0x0f) as u8)
18    }
19    #[doc = "Bits 4:7 - External Multiplexer Group for Interface x"]
20    #[inline(always)]
21    pub fn emuxgrp1(&self) -> EMUXGRP1_R {
22        EMUXGRP1_R::new(((self.bits >> 4) & 0x0f) as u8)
23    }
24}
25impl W {
26    #[doc = "Bits 0:3 - External Multiplexer Group for Interface x"]
27    #[inline(always)]
28    pub fn emuxgrp0(&mut self) -> EMUXGRP0_W<EMUXSEL_SPEC> {
29        EMUXGRP0_W::new(self, 0)
30    }
31    #[doc = "Bits 4:7 - External Multiplexer Group for Interface x"]
32    #[inline(always)]
33    pub fn emuxgrp1(&mut self) -> EMUXGRP1_W<EMUXSEL_SPEC> {
34        EMUXGRP1_W::new(self, 4)
35    }
36}
37#[doc = "External Multiplexer Select Register\n\nYou can [`read`](crate::Reg::read) this register and get [`emuxsel::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`emuxsel::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
38pub struct EMUXSEL_SPEC;
39impl crate::RegisterSpec for EMUXSEL_SPEC {
40    type Ux = u32;
41}
42#[doc = "`read()` method returns [`emuxsel::R`](R) reader structure"]
43impl crate::Readable for EMUXSEL_SPEC {}
44#[doc = "`write(|w| ..)` method takes [`emuxsel::W`](W) writer structure"]
45impl crate::Writable for EMUXSEL_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 EMUXSEL to value 0"]
51impl crate::Resettable for EMUXSEL_SPEC {
52    const RESET_VALUE: u32 = 0;
53}