bl702_pac/glb/
bmx_cfg1.rs1#[doc = "Register `bmx_cfg1` reader"]
2pub struct R(crate::R<BMX_CFG1_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<BMX_CFG1_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<BMX_CFG1_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<BMX_CFG1_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `bmx_cfg1` writer"]
17pub struct W(crate::W<BMX_CFG1_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<BMX_CFG1_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<BMX_CFG1_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<BMX_CFG1_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `bmx_timeout_en` reader - "]
38pub type BMX_TIMEOUT_EN_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `bmx_timeout_en` writer - "]
40pub type BMX_TIMEOUT_EN_W<'a, const O: u8> =
41 crate::FieldWriter<'a, u32, BMX_CFG1_SPEC, u8, u8, 4, O>;
42#[doc = "Field `bmx_arb_mode` reader - "]
43pub type BMX_ARB_MODE_R = crate::FieldReader<u8, u8>;
44#[doc = "Field `bmx_arb_mode` writer - "]
45pub type BMX_ARB_MODE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BMX_CFG1_SPEC, u8, u8, 2, O>;
46#[doc = "Field `bmx_err_en` reader - "]
47pub type BMX_ERR_EN_R = crate::BitReader<bool>;
48#[doc = "Field `bmx_err_en` writer - "]
49pub type BMX_ERR_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, BMX_CFG1_SPEC, bool, O>;
50#[doc = "Field `bmx_busy_option_dis` reader - "]
51pub type BMX_BUSY_OPTION_DIS_R = crate::BitReader<bool>;
52#[doc = "Field `bmx_busy_option_dis` writer - "]
53pub type BMX_BUSY_OPTION_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, BMX_CFG1_SPEC, bool, O>;
54#[doc = "Field `bmx_gating_dis` reader - "]
55pub type BMX_GATING_DIS_R = crate::BitReader<bool>;
56#[doc = "Field `bmx_gating_dis` writer - "]
57pub type BMX_GATING_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, BMX_CFG1_SPEC, bool, O>;
58#[doc = "Field `hsel_option` reader - "]
59pub type HSEL_OPTION_R = crate::FieldReader<u8, u8>;
60#[doc = "Field `hsel_option` writer - "]
61pub type HSEL_OPTION_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BMX_CFG1_SPEC, u8, u8, 4, O>;
62#[doc = "Field `pds_apb_cfg` reader - "]
63pub type PDS_APB_CFG_R = crate::FieldReader<u8, u8>;
64#[doc = "Field `pds_apb_cfg` writer - "]
65pub type PDS_APB_CFG_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BMX_CFG1_SPEC, u8, u8, 8, O>;
66#[doc = "Field `hbn_apb_cfg` reader - "]
67pub type HBN_APB_CFG_R = crate::FieldReader<u8, u8>;
68#[doc = "Field `hbn_apb_cfg` writer - "]
69pub type HBN_APB_CFG_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BMX_CFG1_SPEC, u8, u8, 8, O>;
70impl R {
71 #[doc = "Bits 0:3"]
72 #[inline(always)]
73 pub fn bmx_timeout_en(&self) -> BMX_TIMEOUT_EN_R {
74 BMX_TIMEOUT_EN_R::new((self.bits & 0x0f) as u8)
75 }
76 #[doc = "Bits 4:5"]
77 #[inline(always)]
78 pub fn bmx_arb_mode(&self) -> BMX_ARB_MODE_R {
79 BMX_ARB_MODE_R::new(((self.bits >> 4) & 3) as u8)
80 }
81 #[doc = "Bit 8"]
82 #[inline(always)]
83 pub fn bmx_err_en(&self) -> BMX_ERR_EN_R {
84 BMX_ERR_EN_R::new(((self.bits >> 8) & 1) != 0)
85 }
86 #[doc = "Bit 9"]
87 #[inline(always)]
88 pub fn bmx_busy_option_dis(&self) -> BMX_BUSY_OPTION_DIS_R {
89 BMX_BUSY_OPTION_DIS_R::new(((self.bits >> 9) & 1) != 0)
90 }
91 #[doc = "Bit 10"]
92 #[inline(always)]
93 pub fn bmx_gating_dis(&self) -> BMX_GATING_DIS_R {
94 BMX_GATING_DIS_R::new(((self.bits >> 10) & 1) != 0)
95 }
96 #[doc = "Bits 12:15"]
97 #[inline(always)]
98 pub fn hsel_option(&self) -> HSEL_OPTION_R {
99 HSEL_OPTION_R::new(((self.bits >> 12) & 0x0f) as u8)
100 }
101 #[doc = "Bits 16:23"]
102 #[inline(always)]
103 pub fn pds_apb_cfg(&self) -> PDS_APB_CFG_R {
104 PDS_APB_CFG_R::new(((self.bits >> 16) & 0xff) as u8)
105 }
106 #[doc = "Bits 24:31"]
107 #[inline(always)]
108 pub fn hbn_apb_cfg(&self) -> HBN_APB_CFG_R {
109 HBN_APB_CFG_R::new(((self.bits >> 24) & 0xff) as u8)
110 }
111}
112impl W {
113 #[doc = "Bits 0:3"]
114 #[inline(always)]
115 #[must_use]
116 pub fn bmx_timeout_en(&mut self) -> BMX_TIMEOUT_EN_W<0> {
117 BMX_TIMEOUT_EN_W::new(self)
118 }
119 #[doc = "Bits 4:5"]
120 #[inline(always)]
121 #[must_use]
122 pub fn bmx_arb_mode(&mut self) -> BMX_ARB_MODE_W<4> {
123 BMX_ARB_MODE_W::new(self)
124 }
125 #[doc = "Bit 8"]
126 #[inline(always)]
127 #[must_use]
128 pub fn bmx_err_en(&mut self) -> BMX_ERR_EN_W<8> {
129 BMX_ERR_EN_W::new(self)
130 }
131 #[doc = "Bit 9"]
132 #[inline(always)]
133 #[must_use]
134 pub fn bmx_busy_option_dis(&mut self) -> BMX_BUSY_OPTION_DIS_W<9> {
135 BMX_BUSY_OPTION_DIS_W::new(self)
136 }
137 #[doc = "Bit 10"]
138 #[inline(always)]
139 #[must_use]
140 pub fn bmx_gating_dis(&mut self) -> BMX_GATING_DIS_W<10> {
141 BMX_GATING_DIS_W::new(self)
142 }
143 #[doc = "Bits 12:15"]
144 #[inline(always)]
145 #[must_use]
146 pub fn hsel_option(&mut self) -> HSEL_OPTION_W<12> {
147 HSEL_OPTION_W::new(self)
148 }
149 #[doc = "Bits 16:23"]
150 #[inline(always)]
151 #[must_use]
152 pub fn pds_apb_cfg(&mut self) -> PDS_APB_CFG_W<16> {
153 PDS_APB_CFG_W::new(self)
154 }
155 #[doc = "Bits 24:31"]
156 #[inline(always)]
157 #[must_use]
158 pub fn hbn_apb_cfg(&mut self) -> HBN_APB_CFG_W<24> {
159 HBN_APB_CFG_W::new(self)
160 }
161 #[doc = "Writes raw bits to the register."]
162 #[inline(always)]
163 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
164 self.0.bits(bits);
165 self
166 }
167}
168#[doc = "bmx_cfg1.\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 [bmx_cfg1](index.html) module"]
169pub struct BMX_CFG1_SPEC;
170impl crate::RegisterSpec for BMX_CFG1_SPEC {
171 type Ux = u32;
172}
173#[doc = "`read()` method returns [bmx_cfg1::R](R) reader structure"]
174impl crate::Readable for BMX_CFG1_SPEC {
175 type Reader = R;
176}
177#[doc = "`write(|w| ..)` method takes [bmx_cfg1::W](W) writer structure"]
178impl crate::Writable for BMX_CFG1_SPEC {
179 type Writer = W;
180 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
181 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
182}
183#[doc = "`reset()` method sets bmx_cfg1 to value 0"]
184impl crate::Resettable for BMX_CFG1_SPEC {
185 const RESET_VALUE: Self::Ux = 0;
186}