nrf52840_pac/nfct/
nfcid1_2nd_last.rs

1#[doc = "Register `NFCID1_2ND_LAST` reader"]
2pub struct R(crate::R<NFCID1_2ND_LAST_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<NFCID1_2ND_LAST_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<NFCID1_2ND_LAST_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<NFCID1_2ND_LAST_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `NFCID1_2ND_LAST` writer"]
17pub struct W(crate::W<NFCID1_2ND_LAST_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<NFCID1_2ND_LAST_SPEC>;
20    #[inline(always)]
21    fn deref(&self) -> &Self::Target {
22        &self.0
23    }
24}
25impl core::ops::DerefMut for W {
26    #[inline(always)]
27    fn deref_mut(&mut self) -> &mut Self::Target {
28        &mut self.0
29    }
30}
31impl From<crate::W<NFCID1_2ND_LAST_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<NFCID1_2ND_LAST_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `NFCID1_V` reader - NFCID1 byte V"]
38pub type NFCID1_V_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `NFCID1_V` writer - NFCID1 byte V"]
40pub type NFCID1_V_W<'a, const O: u8> =
41    crate::FieldWriter<'a, u32, NFCID1_2ND_LAST_SPEC, u8, u8, 8, O>;
42#[doc = "Field `NFCID1_U` reader - NFCID1 byte U"]
43pub type NFCID1_U_R = crate::FieldReader<u8, u8>;
44#[doc = "Field `NFCID1_U` writer - NFCID1 byte U"]
45pub type NFCID1_U_W<'a, const O: u8> =
46    crate::FieldWriter<'a, u32, NFCID1_2ND_LAST_SPEC, u8, u8, 8, O>;
47#[doc = "Field `NFCID1_T` reader - NFCID1 byte T"]
48pub type NFCID1_T_R = crate::FieldReader<u8, u8>;
49#[doc = "Field `NFCID1_T` writer - NFCID1 byte T"]
50pub type NFCID1_T_W<'a, const O: u8> =
51    crate::FieldWriter<'a, u32, NFCID1_2ND_LAST_SPEC, u8, u8, 8, O>;
52impl R {
53    #[doc = "Bits 0:7 - NFCID1 byte V"]
54    #[inline(always)]
55    pub fn nfcid1_v(&self) -> NFCID1_V_R {
56        NFCID1_V_R::new((self.bits & 0xff) as u8)
57    }
58    #[doc = "Bits 8:15 - NFCID1 byte U"]
59    #[inline(always)]
60    pub fn nfcid1_u(&self) -> NFCID1_U_R {
61        NFCID1_U_R::new(((self.bits >> 8) & 0xff) as u8)
62    }
63    #[doc = "Bits 16:23 - NFCID1 byte T"]
64    #[inline(always)]
65    pub fn nfcid1_t(&self) -> NFCID1_T_R {
66        NFCID1_T_R::new(((self.bits >> 16) & 0xff) as u8)
67    }
68}
69impl W {
70    #[doc = "Bits 0:7 - NFCID1 byte V"]
71    #[inline(always)]
72    pub fn nfcid1_v(&mut self) -> NFCID1_V_W<0> {
73        NFCID1_V_W::new(self)
74    }
75    #[doc = "Bits 8:15 - NFCID1 byte U"]
76    #[inline(always)]
77    pub fn nfcid1_u(&mut self) -> NFCID1_U_W<8> {
78        NFCID1_U_W::new(self)
79    }
80    #[doc = "Bits 16:23 - NFCID1 byte T"]
81    #[inline(always)]
82    pub fn nfcid1_t(&mut self) -> NFCID1_T_W<16> {
83        NFCID1_T_W::new(self)
84    }
85    #[doc = "Writes raw bits to the register."]
86    #[inline(always)]
87    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
88        self.0.bits(bits);
89        self
90    }
91}
92#[doc = "Second last NFCID1 part (7 or 10 bytes ID)\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [nfcid1_2nd_last](index.html) module"]
93pub struct NFCID1_2ND_LAST_SPEC;
94impl crate::RegisterSpec for NFCID1_2ND_LAST_SPEC {
95    type Ux = u32;
96}
97#[doc = "`read()` method returns [nfcid1_2nd_last::R](R) reader structure"]
98impl crate::Readable for NFCID1_2ND_LAST_SPEC {
99    type Reader = R;
100}
101#[doc = "`write(|w| ..)` method takes [nfcid1_2nd_last::W](W) writer structure"]
102impl crate::Writable for NFCID1_2ND_LAST_SPEC {
103    type Writer = W;
104}
105#[doc = "`reset()` method sets NFCID1_2ND_LAST to value 0"]
106impl crate::Resettable for NFCID1_2ND_LAST_SPEC {
107    #[inline(always)]
108    fn reset_value() -> Self::Ux {
109        0
110    }
111}