cc2538_pac/cctest/
obssel4.rs1#[doc = "Register `OBSSEL4` reader"]
2pub type R = crate::R<Obssel4Spec>;
3#[doc = "Register `OBSSEL4` writer"]
4pub type W = crate::W<Obssel4Spec>;
5#[doc = "Field `SEL` reader - n - obs_sigs\\[n\\]
6output on output 4: 0: rfc_obs_sig0 1: rfc_obs_sig1 2: rfc_obs_sig2 Others: Reserved"]
7pub type SelR = crate::FieldReader;
8#[doc = "Field `SEL` writer - n - obs_sigs\\[n\\]
9output on output 4: 0: rfc_obs_sig0 1: rfc_obs_sig1 2: rfc_obs_sig2 Others: Reserved"]
10pub type SelW<'a, REG> = crate::FieldWriter<'a, REG, 7>;
11#[doc = "Field `EN` reader - Observation output 4 enable control for PC4 0: Observation output disabled 1: Observation output enabled Note: If enabled, this overwrites the standard GPIO behavior of PC4."]
12pub type EnR = crate::BitReader;
13#[doc = "Field `EN` writer - Observation output 4 enable control for PC4 0: Observation output disabled 1: Observation output enabled Note: If enabled, this overwrites the standard GPIO behavior of PC4."]
14pub type EnW<'a, REG> = crate::BitWriter<'a, REG>;
15impl R {
16 #[doc = "Bits 0:6 - n - obs_sigs\\[n\\]
17output on output 4: 0: rfc_obs_sig0 1: rfc_obs_sig1 2: rfc_obs_sig2 Others: Reserved"]
18 #[inline(always)]
19 pub fn sel(&self) -> SelR {
20 SelR::new((self.bits & 0x7f) as u8)
21 }
22 #[doc = "Bit 7 - Observation output 4 enable control for PC4 0: Observation output disabled 1: Observation output enabled Note: If enabled, this overwrites the standard GPIO behavior of PC4."]
23 #[inline(always)]
24 pub fn en(&self) -> EnR {
25 EnR::new(((self.bits >> 7) & 1) != 0)
26 }
27}
28impl W {
29 #[doc = "Bits 0:6 - n - obs_sigs\\[n\\]
30output on output 4: 0: rfc_obs_sig0 1: rfc_obs_sig1 2: rfc_obs_sig2 Others: Reserved"]
31 #[inline(always)]
32 pub fn sel(&mut self) -> SelW<Obssel4Spec> {
33 SelW::new(self, 0)
34 }
35 #[doc = "Bit 7 - Observation output 4 enable control for PC4 0: Observation output disabled 1: Observation output enabled Note: If enabled, this overwrites the standard GPIO behavior of PC4."]
36 #[inline(always)]
37 pub fn en(&mut self) -> EnW<Obssel4Spec> {
38 EnW::new(self, 7)
39 }
40}
41#[doc = "Select output signal on observation output 4\n\nYou can [`read`](crate::Reg::read) this register and get [`obssel4::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`obssel4::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
42pub struct Obssel4Spec;
43impl crate::RegisterSpec for Obssel4Spec {
44 type Ux = u32;
45}
46#[doc = "`read()` method returns [`obssel4::R`](R) reader structure"]
47impl crate::Readable for Obssel4Spec {}
48#[doc = "`write(|w| ..)` method takes [`obssel4::W`](W) writer structure"]
49impl crate::Writable for Obssel4Spec {
50 type Safety = crate::Unsafe;
51 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
52 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
53}
54#[doc = "`reset()` method sets OBSSEL4 to value 0"]
55impl crate::Resettable for Obssel4Spec {
56 const RESET_VALUE: u32 = 0;
57}