nrf52832_pac/nfct/
errorstatus.rs

1#[doc = "Register `ERRORSTATUS` reader"]
2pub struct R(crate::R<ERRORSTATUS_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<ERRORSTATUS_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<ERRORSTATUS_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<ERRORSTATUS_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `ERRORSTATUS` writer"]
17pub struct W(crate::W<ERRORSTATUS_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<ERRORSTATUS_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<ERRORSTATUS_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<ERRORSTATUS_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `FRAMEDELAYTIMEOUT` reader - No STARTTX task triggered before expiration of the time set in FRAMEDELAYMAX"]
38pub type FRAMEDELAYTIMEOUT_R = crate::BitReader<bool>;
39#[doc = "Field `FRAMEDELAYTIMEOUT` writer - No STARTTX task triggered before expiration of the time set in FRAMEDELAYMAX"]
40pub type FRAMEDELAYTIMEOUT_W<'a, const O: u8> =
41    crate::BitWriter1C<'a, u32, ERRORSTATUS_SPEC, bool, O>;
42#[doc = "Field `NFCFIELDTOOSTRONG` reader - Field level is too high at max load resistance"]
43pub type NFCFIELDTOOSTRONG_R = crate::BitReader<bool>;
44#[doc = "Field `NFCFIELDTOOSTRONG` writer - Field level is too high at max load resistance"]
45pub type NFCFIELDTOOSTRONG_W<'a, const O: u8> =
46    crate::BitWriter1C<'a, u32, ERRORSTATUS_SPEC, bool, O>;
47#[doc = "Field `NFCFIELDTOOWEAK` reader - Field level is too low at min load resistance"]
48pub type NFCFIELDTOOWEAK_R = crate::BitReader<bool>;
49#[doc = "Field `NFCFIELDTOOWEAK` writer - Field level is too low at min load resistance"]
50pub type NFCFIELDTOOWEAK_W<'a, const O: u8> =
51    crate::BitWriter1C<'a, u32, ERRORSTATUS_SPEC, bool, O>;
52impl R {
53    #[doc = "Bit 0 - No STARTTX task triggered before expiration of the time set in FRAMEDELAYMAX"]
54    #[inline(always)]
55    pub fn framedelaytimeout(&self) -> FRAMEDELAYTIMEOUT_R {
56        FRAMEDELAYTIMEOUT_R::new((self.bits & 1) != 0)
57    }
58    #[doc = "Bit 2 - Field level is too high at max load resistance"]
59    #[inline(always)]
60    pub fn nfcfieldtoostrong(&self) -> NFCFIELDTOOSTRONG_R {
61        NFCFIELDTOOSTRONG_R::new(((self.bits >> 2) & 1) != 0)
62    }
63    #[doc = "Bit 3 - Field level is too low at min load resistance"]
64    #[inline(always)]
65    pub fn nfcfieldtooweak(&self) -> NFCFIELDTOOWEAK_R {
66        NFCFIELDTOOWEAK_R::new(((self.bits >> 3) & 1) != 0)
67    }
68}
69impl W {
70    #[doc = "Bit 0 - No STARTTX task triggered before expiration of the time set in FRAMEDELAYMAX"]
71    #[inline(always)]
72    pub fn framedelaytimeout(&mut self) -> FRAMEDELAYTIMEOUT_W<0> {
73        FRAMEDELAYTIMEOUT_W::new(self)
74    }
75    #[doc = "Bit 2 - Field level is too high at max load resistance"]
76    #[inline(always)]
77    pub fn nfcfieldtoostrong(&mut self) -> NFCFIELDTOOSTRONG_W<2> {
78        NFCFIELDTOOSTRONG_W::new(self)
79    }
80    #[doc = "Bit 3 - Field level is too low at min load resistance"]
81    #[inline(always)]
82    pub fn nfcfieldtooweak(&mut self) -> NFCFIELDTOOWEAK_W<3> {
83        NFCFIELDTOOWEAK_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 = "NFC Error Status register\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 [errorstatus](index.html) module"]
93pub struct ERRORSTATUS_SPEC;
94impl crate::RegisterSpec for ERRORSTATUS_SPEC {
95    type Ux = u32;
96}
97#[doc = "`read()` method returns [errorstatus::R](R) reader structure"]
98impl crate::Readable for ERRORSTATUS_SPEC {
99    type Reader = R;
100}
101#[doc = "`write(|w| ..)` method takes [errorstatus::W](W) writer structure"]
102impl crate::Writable for ERRORSTATUS_SPEC {
103    type Writer = W;
104}
105#[doc = "`reset()` method sets ERRORSTATUS to value 0"]
106impl crate::Resettable for ERRORSTATUS_SPEC {
107    #[inline(always)]
108    fn reset_value() -> Self::Ux {
109        0
110    }
111}