nrf52840_pac/ficr/nfc/
tagheader1.rs

1#[doc = "Register `TAGHEADER1` reader"]
2pub struct R(crate::R<TAGHEADER1_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<TAGHEADER1_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<TAGHEADER1_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<TAGHEADER1_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `UD4` reader - Unique identifier byte 4"]
17pub type UD4_R = crate::FieldReader<u8, u8>;
18#[doc = "Field `UD5` reader - Unique identifier byte 5"]
19pub type UD5_R = crate::FieldReader<u8, u8>;
20#[doc = "Field `UD6` reader - Unique identifier byte 6"]
21pub type UD6_R = crate::FieldReader<u8, u8>;
22#[doc = "Field `UD7` reader - Unique identifier byte 7"]
23pub type UD7_R = crate::FieldReader<u8, u8>;
24impl R {
25    #[doc = "Bits 0:7 - Unique identifier byte 4"]
26    #[inline(always)]
27    pub fn ud4(&self) -> UD4_R {
28        UD4_R::new((self.bits & 0xff) as u8)
29    }
30    #[doc = "Bits 8:15 - Unique identifier byte 5"]
31    #[inline(always)]
32    pub fn ud5(&self) -> UD5_R {
33        UD5_R::new(((self.bits >> 8) & 0xff) as u8)
34    }
35    #[doc = "Bits 16:23 - Unique identifier byte 6"]
36    #[inline(always)]
37    pub fn ud6(&self) -> UD6_R {
38        UD6_R::new(((self.bits >> 16) & 0xff) as u8)
39    }
40    #[doc = "Bits 24:31 - Unique identifier byte 7"]
41    #[inline(always)]
42    pub fn ud7(&self) -> UD7_R {
43        UD7_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 [tagheader1](index.html) module"]
47pub struct TAGHEADER1_SPEC;
48impl crate::RegisterSpec for TAGHEADER1_SPEC {
49    type Ux = u32;
50}
51#[doc = "`read()` method returns [tagheader1::R](R) reader structure"]
52impl crate::Readable for TAGHEADER1_SPEC {
53    type Reader = R;
54}
55#[doc = "`reset()` method sets TAGHEADER1 to value 0xffff_ffff"]
56impl crate::Resettable for TAGHEADER1_SPEC {
57    #[inline(always)]
58    fn reset_value() -> Self::Ux {
59        0xffff_ffff
60    }
61}