nrf52840_pac/ficr/nfc/
tagheader0.rs

1#[doc = "Register `TAGHEADER0` reader"]
2pub struct R(crate::R<TAGHEADER0_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<TAGHEADER0_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<TAGHEADER0_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<TAGHEADER0_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `MFGID` reader - Default Manufacturer ID: Nordic Semiconductor ASA has ICM 0x5F"]
17pub type MFGID_R = crate::FieldReader<u8, u8>;
18#[doc = "Field `UD1` reader - Unique identifier byte 1"]
19pub type UD1_R = crate::FieldReader<u8, u8>;
20#[doc = "Field `UD2` reader - Unique identifier byte 2"]
21pub type UD2_R = crate::FieldReader<u8, u8>;
22#[doc = "Field `UD3` reader - Unique identifier byte 3"]
23pub type UD3_R = crate::FieldReader<u8, u8>;
24impl R {
25    #[doc = "Bits 0:7 - Default Manufacturer ID: Nordic Semiconductor ASA has ICM 0x5F"]
26    #[inline(always)]
27    pub fn mfgid(&self) -> MFGID_R {
28        MFGID_R::new((self.bits & 0xff) as u8)
29    }
30    #[doc = "Bits 8:15 - Unique identifier byte 1"]
31    #[inline(always)]
32    pub fn ud1(&self) -> UD1_R {
33        UD1_R::new(((self.bits >> 8) & 0xff) as u8)
34    }
35    #[doc = "Bits 16:23 - Unique identifier byte 2"]
36    #[inline(always)]
37    pub fn ud2(&self) -> UD2_R {
38        UD2_R::new(((self.bits >> 16) & 0xff) as u8)
39    }
40    #[doc = "Bits 24:31 - Unique identifier byte 3"]
41    #[inline(always)]
42    pub fn ud3(&self) -> UD3_R {
43        UD3_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 [tagheader0](index.html) module"]
47pub struct TAGHEADER0_SPEC;
48impl crate::RegisterSpec for TAGHEADER0_SPEC {
49    type Ux = u32;
50}
51#[doc = "`read()` method returns [tagheader0::R](R) reader structure"]
52impl crate::Readable for TAGHEADER0_SPEC {
53    type Reader = R;
54}
55#[doc = "`reset()` method sets TAGHEADER0 to value 0xffff_ff5f"]
56impl crate::Resettable for TAGHEADER0_SPEC {
57    #[inline(always)]
58    fn reset_value() -> Self::Ux {
59        0xffff_ff5f
60    }
61}