nrf52840_pac/ficr/nfc/
tagheader2.rs

1#[doc = "Register `TAGHEADER2` reader"]
2pub struct R(crate::R<TAGHEADER2_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<TAGHEADER2_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<TAGHEADER2_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<TAGHEADER2_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `UD8` reader - Unique identifier byte 8"]
17pub type UD8_R = crate::FieldReader<u8, u8>;
18#[doc = "Field `UD9` reader - Unique identifier byte 9"]
19pub type UD9_R = crate::FieldReader<u8, u8>;
20#[doc = "Field `UD10` reader - Unique identifier byte 10"]
21pub type UD10_R = crate::FieldReader<u8, u8>;
22#[doc = "Field `UD11` reader - Unique identifier byte 11"]
23pub type UD11_R = crate::FieldReader<u8, u8>;
24impl R {
25    #[doc = "Bits 0:7 - Unique identifier byte 8"]
26    #[inline(always)]
27    pub fn ud8(&self) -> UD8_R {
28        UD8_R::new((self.bits & 0xff) as u8)
29    }
30    #[doc = "Bits 8:15 - Unique identifier byte 9"]
31    #[inline(always)]
32    pub fn ud9(&self) -> UD9_R {
33        UD9_R::new(((self.bits >> 8) & 0xff) as u8)
34    }
35    #[doc = "Bits 16:23 - Unique identifier byte 10"]
36    #[inline(always)]
37    pub fn ud10(&self) -> UD10_R {
38        UD10_R::new(((self.bits >> 16) & 0xff) as u8)
39    }
40    #[doc = "Bits 24:31 - Unique identifier byte 11"]
41    #[inline(always)]
42    pub fn ud11(&self) -> UD11_R {
43        UD11_R::new(((self.bits >> 24) & 0xff) as u8)
44    }
45}
46#[doc = "Default header for NFC tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.\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 [tagheader2](index.html) module"]
47pub struct TAGHEADER2_SPEC;
48impl crate::RegisterSpec for TAGHEADER2_SPEC {
49    type Ux = u32;
50}
51#[doc = "`read()` method returns [tagheader2::R](R) reader structure"]
52impl crate::Readable for TAGHEADER2_SPEC {
53    type Reader = R;
54}
55#[doc = "`reset()` method sets TAGHEADER2 to value 0xffff_ffff"]
56impl crate::Resettable for TAGHEADER2_SPEC {
57    #[inline(always)]
58    fn reset_value() -> Self::Ux {
59        0xffff_ffff
60    }
61}