1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
#[doc = "Register `CTRL_CFG` reader"]
pub type R = crate::R<CTRL_CFG_SPEC>;
#[doc = "Register `CTRL_CFG` writer"]
pub type W = crate::W<CTRL_CFG_SPEC>;
#[doc = "Field `HW_AUTO_ACK_TX_EN` reader - "]
pub type HW_AUTO_ACK_TX_EN_R = crate::BitReader;
#[doc = "Field `HW_AUTO_ACK_TX_EN` writer - "]
pub type HW_AUTO_ACK_TX_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `HW_ENHANCE_ACK_TX_EN` reader - "]
pub type HW_ENHANCE_ACK_TX_EN_R = crate::BitReader;
#[doc = "Field `HW_ENHANCE_ACK_TX_EN` writer - "]
pub type HW_ENHANCE_ACK_TX_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `HW_AUTO_ACK_RX_EN` reader - "]
pub type HW_AUTO_ACK_RX_EN_R = crate::BitReader;
#[doc = "Field `HW_AUTO_ACK_RX_EN` writer - "]
pub type HW_AUTO_ACK_RX_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `DIS_IFS_CONTROL` reader - "]
pub type DIS_IFS_CONTROL_R = crate::BitReader;
#[doc = "Field `DIS_IFS_CONTROL` writer - "]
pub type DIS_IFS_CONTROL_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PAN_COORDINATOR` reader - "]
pub type PAN_COORDINATOR_R = crate::BitReader;
#[doc = "Field `PAN_COORDINATOR` writer - "]
pub type PAN_COORDINATOR_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PROMISCUOUS_MODE` reader - "]
pub type PROMISCUOUS_MODE_R = crate::BitReader;
#[doc = "Field `PROMISCUOUS_MODE` writer - "]
pub type PROMISCUOUS_MODE_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `DIS_FRAME_VERSION_RSV_FILTER` reader - "]
pub type DIS_FRAME_VERSION_RSV_FILTER_R = crate::BitReader;
#[doc = "Field `DIS_FRAME_VERSION_RSV_FILTER` writer - "]
pub type DIS_FRAME_VERSION_RSV_FILTER_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `AUTOPEND_ENHANCE` reader - "]
pub type AUTOPEND_ENHANCE_R = crate::BitReader;
#[doc = "Field `AUTOPEND_ENHANCE` writer - "]
pub type AUTOPEND_ENHANCE_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `FILTER_ENHANCE` reader - "]
pub type FILTER_ENHANCE_R = crate::BitReader;
#[doc = "Field `FILTER_ENHANCE` writer - "]
pub type FILTER_ENHANCE_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `COEX_ARB_DELAY` reader - "]
pub type COEX_ARB_DELAY_R = crate::FieldReader;
#[doc = "Field `COEX_ARB_DELAY` writer - "]
pub type COEX_ARB_DELAY_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
#[doc = "Field `BIT_ORDER` reader - "]
pub type BIT_ORDER_R = crate::BitReader;
#[doc = "Field `BIT_ORDER` writer - "]
pub type BIT_ORDER_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `NO_RSS_TRK_ENB` reader - "]
pub type NO_RSS_TRK_ENB_R = crate::BitReader;
#[doc = "Field `NO_RSS_TRK_ENB` writer - "]
pub type NO_RSS_TRK_ENB_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `FORCE_RX_ENB` reader - "]
pub type FORCE_RX_ENB_R = crate::BitReader;
#[doc = "Field `FORCE_RX_ENB` writer - "]
pub type FORCE_RX_ENB_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `RX_DONE_TRIGGER_IDLE` reader - "]
pub type RX_DONE_TRIGGER_IDLE_R = crate::BitReader;
#[doc = "Field `RX_DONE_TRIGGER_IDLE` writer - "]
pub type RX_DONE_TRIGGER_IDLE_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `MAC_INF0_ENABLE` reader - "]
pub type MAC_INF0_ENABLE_R = crate::BitReader;
#[doc = "Field `MAC_INF0_ENABLE` writer - "]
pub type MAC_INF0_ENABLE_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `MAC_INF1_ENABLE` reader - "]
pub type MAC_INF1_ENABLE_R = crate::BitReader;
#[doc = "Field `MAC_INF1_ENABLE` writer - "]
pub type MAC_INF1_ENABLE_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `MAC_INF2_ENABLE` reader - "]
pub type MAC_INF2_ENABLE_R = crate::BitReader;
#[doc = "Field `MAC_INF2_ENABLE` writer - "]
pub type MAC_INF2_ENABLE_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `MAC_INF3_ENABLE` reader - "]
pub type MAC_INF3_ENABLE_R = crate::BitReader;
#[doc = "Field `MAC_INF3_ENABLE` writer - "]
pub type MAC_INF3_ENABLE_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
    #[doc = "Bit 0"]
    #[inline(always)]
    pub fn hw_auto_ack_tx_en(&self) -> HW_AUTO_ACK_TX_EN_R {
        HW_AUTO_ACK_TX_EN_R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1"]
    #[inline(always)]
    pub fn hw_enhance_ack_tx_en(&self) -> HW_ENHANCE_ACK_TX_EN_R {
        HW_ENHANCE_ACK_TX_EN_R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 3"]
    #[inline(always)]
    pub fn hw_auto_ack_rx_en(&self) -> HW_AUTO_ACK_RX_EN_R {
        HW_AUTO_ACK_RX_EN_R::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 5"]
    #[inline(always)]
    pub fn dis_ifs_control(&self) -> DIS_IFS_CONTROL_R {
        DIS_IFS_CONTROL_R::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "Bit 6"]
    #[inline(always)]
    pub fn pan_coordinator(&self) -> PAN_COORDINATOR_R {
        PAN_COORDINATOR_R::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bit 7"]
    #[inline(always)]
    pub fn promiscuous_mode(&self) -> PROMISCUOUS_MODE_R {
        PROMISCUOUS_MODE_R::new(((self.bits >> 7) & 1) != 0)
    }
    #[doc = "Bit 11"]
    #[inline(always)]
    pub fn dis_frame_version_rsv_filter(&self) -> DIS_FRAME_VERSION_RSV_FILTER_R {
        DIS_FRAME_VERSION_RSV_FILTER_R::new(((self.bits >> 11) & 1) != 0)
    }
    #[doc = "Bit 12"]
    #[inline(always)]
    pub fn autopend_enhance(&self) -> AUTOPEND_ENHANCE_R {
        AUTOPEND_ENHANCE_R::new(((self.bits >> 12) & 1) != 0)
    }
    #[doc = "Bit 14"]
    #[inline(always)]
    pub fn filter_enhance(&self) -> FILTER_ENHANCE_R {
        FILTER_ENHANCE_R::new(((self.bits >> 14) & 1) != 0)
    }
    #[doc = "Bits 16:20"]
    #[inline(always)]
    pub fn coex_arb_delay(&self) -> COEX_ARB_DELAY_R {
        COEX_ARB_DELAY_R::new(((self.bits >> 16) & 0x1f) as u8)
    }
    #[doc = "Bit 24"]
    #[inline(always)]
    pub fn bit_order(&self) -> BIT_ORDER_R {
        BIT_ORDER_R::new(((self.bits >> 24) & 1) != 0)
    }
    #[doc = "Bit 25"]
    #[inline(always)]
    pub fn no_rss_trk_enb(&self) -> NO_RSS_TRK_ENB_R {
        NO_RSS_TRK_ENB_R::new(((self.bits >> 25) & 1) != 0)
    }
    #[doc = "Bit 26"]
    #[inline(always)]
    pub fn force_rx_enb(&self) -> FORCE_RX_ENB_R {
        FORCE_RX_ENB_R::new(((self.bits >> 26) & 1) != 0)
    }
    #[doc = "Bit 27"]
    #[inline(always)]
    pub fn rx_done_trigger_idle(&self) -> RX_DONE_TRIGGER_IDLE_R {
        RX_DONE_TRIGGER_IDLE_R::new(((self.bits >> 27) & 1) != 0)
    }
    #[doc = "Bit 28"]
    #[inline(always)]
    pub fn mac_inf0_enable(&self) -> MAC_INF0_ENABLE_R {
        MAC_INF0_ENABLE_R::new(((self.bits >> 28) & 1) != 0)
    }
    #[doc = "Bit 29"]
    #[inline(always)]
    pub fn mac_inf1_enable(&self) -> MAC_INF1_ENABLE_R {
        MAC_INF1_ENABLE_R::new(((self.bits >> 29) & 1) != 0)
    }
    #[doc = "Bit 30"]
    #[inline(always)]
    pub fn mac_inf2_enable(&self) -> MAC_INF2_ENABLE_R {
        MAC_INF2_ENABLE_R::new(((self.bits >> 30) & 1) != 0)
    }
    #[doc = "Bit 31"]
    #[inline(always)]
    pub fn mac_inf3_enable(&self) -> MAC_INF3_ENABLE_R {
        MAC_INF3_ENABLE_R::new(((self.bits >> 31) & 1) != 0)
    }
}
#[cfg(feature = "impl-register-debug")]
impl core::fmt::Debug for R {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("CTRL_CFG")
            .field("hw_auto_ack_tx_en", &self.hw_auto_ack_tx_en())
            .field("hw_enhance_ack_tx_en", &self.hw_enhance_ack_tx_en())
            .field("hw_auto_ack_rx_en", &self.hw_auto_ack_rx_en())
            .field("dis_ifs_control", &self.dis_ifs_control())
            .field("pan_coordinator", &self.pan_coordinator())
            .field("promiscuous_mode", &self.promiscuous_mode())
            .field(
                "dis_frame_version_rsv_filter",
                &self.dis_frame_version_rsv_filter(),
            )
            .field("autopend_enhance", &self.autopend_enhance())
            .field("filter_enhance", &self.filter_enhance())
            .field("coex_arb_delay", &self.coex_arb_delay())
            .field("bit_order", &self.bit_order())
            .field("no_rss_trk_enb", &self.no_rss_trk_enb())
            .field("force_rx_enb", &self.force_rx_enb())
            .field("rx_done_trigger_idle", &self.rx_done_trigger_idle())
            .field("mac_inf0_enable", &self.mac_inf0_enable())
            .field("mac_inf1_enable", &self.mac_inf1_enable())
            .field("mac_inf2_enable", &self.mac_inf2_enable())
            .field("mac_inf3_enable", &self.mac_inf3_enable())
            .finish()
    }
}
impl W {
    #[doc = "Bit 0"]
    #[inline(always)]
    #[must_use]
    pub fn hw_auto_ack_tx_en(&mut self) -> HW_AUTO_ACK_TX_EN_W<CTRL_CFG_SPEC> {
        HW_AUTO_ACK_TX_EN_W::new(self, 0)
    }
    #[doc = "Bit 1"]
    #[inline(always)]
    #[must_use]
    pub fn hw_enhance_ack_tx_en(&mut self) -> HW_ENHANCE_ACK_TX_EN_W<CTRL_CFG_SPEC> {
        HW_ENHANCE_ACK_TX_EN_W::new(self, 1)
    }
    #[doc = "Bit 3"]
    #[inline(always)]
    #[must_use]
    pub fn hw_auto_ack_rx_en(&mut self) -> HW_AUTO_ACK_RX_EN_W<CTRL_CFG_SPEC> {
        HW_AUTO_ACK_RX_EN_W::new(self, 3)
    }
    #[doc = "Bit 5"]
    #[inline(always)]
    #[must_use]
    pub fn dis_ifs_control(&mut self) -> DIS_IFS_CONTROL_W<CTRL_CFG_SPEC> {
        DIS_IFS_CONTROL_W::new(self, 5)
    }
    #[doc = "Bit 6"]
    #[inline(always)]
    #[must_use]
    pub fn pan_coordinator(&mut self) -> PAN_COORDINATOR_W<CTRL_CFG_SPEC> {
        PAN_COORDINATOR_W::new(self, 6)
    }
    #[doc = "Bit 7"]
    #[inline(always)]
    #[must_use]
    pub fn promiscuous_mode(&mut self) -> PROMISCUOUS_MODE_W<CTRL_CFG_SPEC> {
        PROMISCUOUS_MODE_W::new(self, 7)
    }
    #[doc = "Bit 11"]
    #[inline(always)]
    #[must_use]
    pub fn dis_frame_version_rsv_filter(
        &mut self,
    ) -> DIS_FRAME_VERSION_RSV_FILTER_W<CTRL_CFG_SPEC> {
        DIS_FRAME_VERSION_RSV_FILTER_W::new(self, 11)
    }
    #[doc = "Bit 12"]
    #[inline(always)]
    #[must_use]
    pub fn autopend_enhance(&mut self) -> AUTOPEND_ENHANCE_W<CTRL_CFG_SPEC> {
        AUTOPEND_ENHANCE_W::new(self, 12)
    }
    #[doc = "Bit 14"]
    #[inline(always)]
    #[must_use]
    pub fn filter_enhance(&mut self) -> FILTER_ENHANCE_W<CTRL_CFG_SPEC> {
        FILTER_ENHANCE_W::new(self, 14)
    }
    #[doc = "Bits 16:20"]
    #[inline(always)]
    #[must_use]
    pub fn coex_arb_delay(&mut self) -> COEX_ARB_DELAY_W<CTRL_CFG_SPEC> {
        COEX_ARB_DELAY_W::new(self, 16)
    }
    #[doc = "Bit 24"]
    #[inline(always)]
    #[must_use]
    pub fn bit_order(&mut self) -> BIT_ORDER_W<CTRL_CFG_SPEC> {
        BIT_ORDER_W::new(self, 24)
    }
    #[doc = "Bit 25"]
    #[inline(always)]
    #[must_use]
    pub fn no_rss_trk_enb(&mut self) -> NO_RSS_TRK_ENB_W<CTRL_CFG_SPEC> {
        NO_RSS_TRK_ENB_W::new(self, 25)
    }
    #[doc = "Bit 26"]
    #[inline(always)]
    #[must_use]
    pub fn force_rx_enb(&mut self) -> FORCE_RX_ENB_W<CTRL_CFG_SPEC> {
        FORCE_RX_ENB_W::new(self, 26)
    }
    #[doc = "Bit 27"]
    #[inline(always)]
    #[must_use]
    pub fn rx_done_trigger_idle(&mut self) -> RX_DONE_TRIGGER_IDLE_W<CTRL_CFG_SPEC> {
        RX_DONE_TRIGGER_IDLE_W::new(self, 27)
    }
    #[doc = "Bit 28"]
    #[inline(always)]
    #[must_use]
    pub fn mac_inf0_enable(&mut self) -> MAC_INF0_ENABLE_W<CTRL_CFG_SPEC> {
        MAC_INF0_ENABLE_W::new(self, 28)
    }
    #[doc = "Bit 29"]
    #[inline(always)]
    #[must_use]
    pub fn mac_inf1_enable(&mut self) -> MAC_INF1_ENABLE_W<CTRL_CFG_SPEC> {
        MAC_INF1_ENABLE_W::new(self, 29)
    }
    #[doc = "Bit 30"]
    #[inline(always)]
    #[must_use]
    pub fn mac_inf2_enable(&mut self) -> MAC_INF2_ENABLE_W<CTRL_CFG_SPEC> {
        MAC_INF2_ENABLE_W::new(self, 30)
    }
    #[doc = "Bit 31"]
    #[inline(always)]
    #[must_use]
    pub fn mac_inf3_enable(&mut self) -> MAC_INF3_ENABLE_W<CTRL_CFG_SPEC> {
        MAC_INF3_ENABLE_W::new(self, 31)
    }
}
#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`ctrl_cfg::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrl_cfg::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct CTRL_CFG_SPEC;
impl crate::RegisterSpec for CTRL_CFG_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [`ctrl_cfg::R`](R) reader structure"]
impl crate::Readable for CTRL_CFG_SPEC {}
#[doc = "`write(|w| ..)` method takes [`ctrl_cfg::W`](W) writer structure"]
impl crate::Writable for CTRL_CFG_SPEC {
    type Safety = crate::Unsafe;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
}
#[doc = "`reset()` method sets CTRL_CFG to value 0"]
impl crate::Resettable for CTRL_CFG_SPEC {
    const RESET_VALUE: u32 = 0;
}