bl602_pac/sf_ctrl/
sf_ctrl_prot_en_rd.rs

1#[doc = "Register `sf_ctrl_prot_en_rd` reader"]
2pub struct R(crate::R<SF_CTRL_PROT_EN_RD_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<SF_CTRL_PROT_EN_RD_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<SF_CTRL_PROT_EN_RD_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<SF_CTRL_PROT_EN_RD_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `sf_ctrl_prot_en_rd` reader - "]
17pub type SF_CTRL_PROT_EN_RD_R = crate::BitReader<bool>;
18#[doc = "Field `sf_ctrl_id0_en_rd` reader - "]
19pub type SF_CTRL_ID0_EN_RD_R = crate::BitReader<bool>;
20#[doc = "Field `sf_ctrl_id1_en_rd` reader - "]
21pub type SF_CTRL_ID1_EN_RD_R = crate::BitReader<bool>;
22#[doc = "Field `sf_if_0_trig_wr_lock` reader - "]
23pub type SF_IF_0_TRIG_WR_LOCK_R = crate::BitReader<bool>;
24#[doc = "Field `sf_dbg_dis` reader - "]
25pub type SF_DBG_DIS_R = crate::BitReader<bool>;
26impl R {
27    #[doc = "Bit 0"]
28    #[inline(always)]
29    pub fn sf_ctrl_prot_en_rd(&self) -> SF_CTRL_PROT_EN_RD_R {
30        SF_CTRL_PROT_EN_RD_R::new((self.bits & 1) != 0)
31    }
32    #[doc = "Bit 1"]
33    #[inline(always)]
34    pub fn sf_ctrl_id0_en_rd(&self) -> SF_CTRL_ID0_EN_RD_R {
35        SF_CTRL_ID0_EN_RD_R::new(((self.bits >> 1) & 1) != 0)
36    }
37    #[doc = "Bit 2"]
38    #[inline(always)]
39    pub fn sf_ctrl_id1_en_rd(&self) -> SF_CTRL_ID1_EN_RD_R {
40        SF_CTRL_ID1_EN_RD_R::new(((self.bits >> 2) & 1) != 0)
41    }
42    #[doc = "Bit 30"]
43    #[inline(always)]
44    pub fn sf_if_0_trig_wr_lock(&self) -> SF_IF_0_TRIG_WR_LOCK_R {
45        SF_IF_0_TRIG_WR_LOCK_R::new(((self.bits >> 30) & 1) != 0)
46    }
47    #[doc = "Bit 31"]
48    #[inline(always)]
49    pub fn sf_dbg_dis(&self) -> SF_DBG_DIS_R {
50        SF_DBG_DIS_R::new(((self.bits >> 31) & 1) != 0)
51    }
52}
53#[doc = "sf_ctrl_prot_en_rd.\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 [sf_ctrl_prot_en_rd](index.html) module"]
54pub struct SF_CTRL_PROT_EN_RD_SPEC;
55impl crate::RegisterSpec for SF_CTRL_PROT_EN_RD_SPEC {
56    type Ux = u32;
57}
58#[doc = "`read()` method returns [sf_ctrl_prot_en_rd::R](R) reader structure"]
59impl crate::Readable for SF_CTRL_PROT_EN_RD_SPEC {
60    type Reader = R;
61}
62#[doc = "`reset()` method sets sf_ctrl_prot_en_rd to value 0x07"]
63impl crate::Resettable for SF_CTRL_PROT_EN_RD_SPEC {
64    const RESET_VALUE: Self::Ux = 0x07;
65}