efm32pg22_pac/efm32pg22c200/devinfo/
swcapa1.rs

1#[doc = "Register `SWCAPA1` reader"]
2pub struct R(crate::R<SWCAPA1_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<SWCAPA1_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<SWCAPA1_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<SWCAPA1_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `RFMCUEN` reader - RF-MCU"]
17pub type RFMCUEN_R = crate::BitReader<bool>;
18#[doc = "Field `NCPEN` reader - NCP"]
19pub type NCPEN_R = crate::BitReader<bool>;
20#[doc = "Field `GWEN` reader - Gateway"]
21pub type GWEN_R = crate::BitReader<bool>;
22impl R {
23    #[doc = "Bit 0 - RF-MCU"]
24    #[inline(always)]
25    pub fn rfmcuen(&self) -> RFMCUEN_R {
26        RFMCUEN_R::new((self.bits & 1) != 0)
27    }
28    #[doc = "Bit 1 - NCP"]
29    #[inline(always)]
30    pub fn ncpen(&self) -> NCPEN_R {
31        NCPEN_R::new(((self.bits >> 1) & 1) != 0)
32    }
33    #[doc = "Bit 2 - Gateway"]
34    #[inline(always)]
35    pub fn gwen(&self) -> GWEN_R {
36        GWEN_R::new(((self.bits >> 2) & 1) != 0)
37    }
38}
39#[doc = "Software Capability Vector 1\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [swcapa1](index.html) module"]
40pub struct SWCAPA1_SPEC;
41impl crate::RegisterSpec for SWCAPA1_SPEC {
42    type Ux = u32;
43}
44#[doc = "`read()` method returns [swcapa1::R](R) reader structure"]
45impl crate::Readable for SWCAPA1_SPEC {
46    type Reader = R;
47}
48#[doc = "`reset()` method sets SWCAPA1 to value 0"]
49impl crate::Resettable for SWCAPA1_SPEC {
50    const RESET_VALUE: Self::Ux = 0;
51}