bl808-pac 0.0.0

Embedded Rust's Peripheral Access Crate for BL808 RISC-V microcontroller
Documentation
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
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
#[doc = "Register `config` reader"]
pub struct R(crate::R<CONFIG_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<CONFIG_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<CONFIG_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::R<CONFIG_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `config` writer"]
pub struct W(crate::W<CONFIG_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<CONFIG_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::ops::DerefMut for W {
    #[inline(always)]
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
impl From<crate::W<CONFIG_SPEC>> for W {
    #[inline(always)]
    fn from(writer: crate::W<CONFIG_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Field `master_enable` reader - Enable signal of I2C master function\n\n Asserting this bit will trigger the transaction, and should be de-asserted after finish."]
pub type MASTER_ENABLE_R = crate::BitReader<MASTER_ENABLE_A>;
#[doc = "Enable signal of I2C master function\n\n Asserting this bit will trigger the transaction, and should be de-asserted after finish.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum MASTER_ENABLE_A {
    #[doc = "1: Enable I2C master function"]
    ENABLE = 1,
    #[doc = "0: Disable I2C master function"]
    DISABLE = 0,
}
impl From<MASTER_ENABLE_A> for bool {
    #[inline(always)]
    fn from(variant: MASTER_ENABLE_A) -> Self {
        variant as u8 != 0
    }
}
impl MASTER_ENABLE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> MASTER_ENABLE_A {
        match self.bits {
            true => MASTER_ENABLE_A::ENABLE,
            false => MASTER_ENABLE_A::DISABLE,
        }
    }
    #[doc = "Checks if the value of the field is `ENABLE`"]
    #[inline(always)]
    pub fn is_enable(&self) -> bool {
        *self == MASTER_ENABLE_A::ENABLE
    }
    #[doc = "Checks if the value of the field is `DISABLE`"]
    #[inline(always)]
    pub fn is_disable(&self) -> bool {
        *self == MASTER_ENABLE_A::DISABLE
    }
}
#[doc = "Field `master_enable` writer - Enable signal of I2C master function\n\n Asserting this bit will trigger the transaction, and should be de-asserted after finish."]
pub type MASTER_ENABLE_W<'a, const O: u8> =
    crate::BitWriter<'a, u32, CONFIG_SPEC, MASTER_ENABLE_A, O>;
impl<'a, const O: u8> MASTER_ENABLE_W<'a, O> {
    #[doc = "Enable I2C master function"]
    #[inline(always)]
    pub fn enable(self) -> &'a mut W {
        self.variant(MASTER_ENABLE_A::ENABLE)
    }
    #[doc = "Disable I2C master function"]
    #[inline(always)]
    pub fn disable(self) -> &'a mut W {
        self.variant(MASTER_ENABLE_A::DISABLE)
    }
}
#[doc = "Field `transfer_direction` reader - Packet transfer direction"]
pub type TRANSFER_DIRECTION_R = crate::BitReader<TRANSFER_DIRECTION_A>;
#[doc = "Packet transfer direction\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TRANSFER_DIRECTION_A {
    #[doc = "0: Write from master side"]
    WRITE = 0,
    #[doc = "1: Read from master side"]
    READ = 1,
}
impl From<TRANSFER_DIRECTION_A> for bool {
    #[inline(always)]
    fn from(variant: TRANSFER_DIRECTION_A) -> Self {
        variant as u8 != 0
    }
}
impl TRANSFER_DIRECTION_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TRANSFER_DIRECTION_A {
        match self.bits {
            false => TRANSFER_DIRECTION_A::WRITE,
            true => TRANSFER_DIRECTION_A::READ,
        }
    }
    #[doc = "Checks if the value of the field is `WRITE`"]
    #[inline(always)]
    pub fn is_write(&self) -> bool {
        *self == TRANSFER_DIRECTION_A::WRITE
    }
    #[doc = "Checks if the value of the field is `READ`"]
    #[inline(always)]
    pub fn is_read(&self) -> bool {
        *self == TRANSFER_DIRECTION_A::READ
    }
}
#[doc = "Field `transfer_direction` writer - Packet transfer direction"]
pub type TRANSFER_DIRECTION_W<'a, const O: u8> =
    crate::BitWriter<'a, u32, CONFIG_SPEC, TRANSFER_DIRECTION_A, O>;
impl<'a, const O: u8> TRANSFER_DIRECTION_W<'a, O> {
    #[doc = "Write from master side"]
    #[inline(always)]
    pub fn write(self) -> &'a mut W {
        self.variant(TRANSFER_DIRECTION_A::WRITE)
    }
    #[doc = "Read from master side"]
    #[inline(always)]
    pub fn read(self) -> &'a mut W {
        self.variant(TRANSFER_DIRECTION_A::READ)
    }
}
#[doc = "Field `deglitch_enable` reader - Enable de-glitch function on all input pins"]
pub type DEGLITCH_ENABLE_R = crate::BitReader<DEGLITCH_ENABLE_A>;
#[doc = "Enable de-glitch function on all input pins\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum DEGLITCH_ENABLE_A {
    #[doc = "1: Enable de-glitch function on inputs"]
    ENABLE = 1,
    #[doc = "0: Disable de-glitch function on inputs"]
    DISABLE = 0,
}
impl From<DEGLITCH_ENABLE_A> for bool {
    #[inline(always)]
    fn from(variant: DEGLITCH_ENABLE_A) -> Self {
        variant as u8 != 0
    }
}
impl DEGLITCH_ENABLE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> DEGLITCH_ENABLE_A {
        match self.bits {
            true => DEGLITCH_ENABLE_A::ENABLE,
            false => DEGLITCH_ENABLE_A::DISABLE,
        }
    }
    #[doc = "Checks if the value of the field is `ENABLE`"]
    #[inline(always)]
    pub fn is_enable(&self) -> bool {
        *self == DEGLITCH_ENABLE_A::ENABLE
    }
    #[doc = "Checks if the value of the field is `DISABLE`"]
    #[inline(always)]
    pub fn is_disable(&self) -> bool {
        *self == DEGLITCH_ENABLE_A::DISABLE
    }
}
#[doc = "Field `deglitch_enable` writer - Enable de-glitch function on all input pins"]
pub type DEGLITCH_ENABLE_W<'a, const O: u8> =
    crate::BitWriter<'a, u32, CONFIG_SPEC, DEGLITCH_ENABLE_A, O>;
impl<'a, const O: u8> DEGLITCH_ENABLE_W<'a, O> {
    #[doc = "Enable de-glitch function on inputs"]
    #[inline(always)]
    pub fn enable(self) -> &'a mut W {
        self.variant(DEGLITCH_ENABLE_A::ENABLE)
    }
    #[doc = "Disable de-glitch function on inputs"]
    #[inline(always)]
    pub fn disable(self) -> &'a mut W {
        self.variant(DEGLITCH_ENABLE_A::DISABLE)
    }
}
#[doc = "Field `clock_synchronize` reader - Enable I2C clock synchronization\n\n Enable this bit to support multi-master and clock-stretching. It should not be turned-off normally."]
pub type CLOCK_SYNCHRONIZE_R = crate::BitReader<CLOCK_SYNCHRONIZE_A>;
#[doc = "Enable I2C clock synchronization\n\n Enable this bit to support multi-master and clock-stretching. It should not be turned-off normally.\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CLOCK_SYNCHRONIZE_A {
    #[doc = "1: Enable clock synchronization"]
    ENABLE = 1,
    #[doc = "0: Disable clock synchronization"]
    DISABLE = 0,
}
impl From<CLOCK_SYNCHRONIZE_A> for bool {
    #[inline(always)]
    fn from(variant: CLOCK_SYNCHRONIZE_A) -> Self {
        variant as u8 != 0
    }
}
impl CLOCK_SYNCHRONIZE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> CLOCK_SYNCHRONIZE_A {
        match self.bits {
            true => CLOCK_SYNCHRONIZE_A::ENABLE,
            false => CLOCK_SYNCHRONIZE_A::DISABLE,
        }
    }
    #[doc = "Checks if the value of the field is `ENABLE`"]
    #[inline(always)]
    pub fn is_enable(&self) -> bool {
        *self == CLOCK_SYNCHRONIZE_A::ENABLE
    }
    #[doc = "Checks if the value of the field is `DISABLE`"]
    #[inline(always)]
    pub fn is_disable(&self) -> bool {
        *self == CLOCK_SYNCHRONIZE_A::DISABLE
    }
}
#[doc = "Field `clock_synchronize` writer - Enable I2C clock synchronization\n\n Enable this bit to support multi-master and clock-stretching. It should not be turned-off normally."]
pub type CLOCK_SYNCHRONIZE_W<'a, const O: u8> =
    crate::BitWriter<'a, u32, CONFIG_SPEC, CLOCK_SYNCHRONIZE_A, O>;
impl<'a, const O: u8> CLOCK_SYNCHRONIZE_W<'a, O> {
    #[doc = "Enable clock synchronization"]
    #[inline(always)]
    pub fn enable(self) -> &'a mut W {
        self.variant(CLOCK_SYNCHRONIZE_A::ENABLE)
    }
    #[doc = "Disable clock synchronization"]
    #[inline(always)]
    pub fn disable(self) -> &'a mut W {
        self.variant(CLOCK_SYNCHRONIZE_A::DISABLE)
    }
}
#[doc = "Field `sub_address_enable` reader - Enable sub-address fields"]
pub type SUB_ADDRESS_ENABLE_R = crate::BitReader<SUB_ADDRESS_ENABLE_A>;
#[doc = "Enable sub-address fields\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum SUB_ADDRESS_ENABLE_A {
    #[doc = "1: Enable sub-address fields"]
    ENABLE = 1,
    #[doc = "0: Disable sub-address fields"]
    DISABLE = 0,
}
impl From<SUB_ADDRESS_ENABLE_A> for bool {
    #[inline(always)]
    fn from(variant: SUB_ADDRESS_ENABLE_A) -> Self {
        variant as u8 != 0
    }
}
impl SUB_ADDRESS_ENABLE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> SUB_ADDRESS_ENABLE_A {
        match self.bits {
            true => SUB_ADDRESS_ENABLE_A::ENABLE,
            false => SUB_ADDRESS_ENABLE_A::DISABLE,
        }
    }
    #[doc = "Checks if the value of the field is `ENABLE`"]
    #[inline(always)]
    pub fn is_enable(&self) -> bool {
        *self == SUB_ADDRESS_ENABLE_A::ENABLE
    }
    #[doc = "Checks if the value of the field is `DISABLE`"]
    #[inline(always)]
    pub fn is_disable(&self) -> bool {
        *self == SUB_ADDRESS_ENABLE_A::DISABLE
    }
}
#[doc = "Field `sub_address_enable` writer - Enable sub-address fields"]
pub type SUB_ADDRESS_ENABLE_W<'a, const O: u8> =
    crate::BitWriter<'a, u32, CONFIG_SPEC, SUB_ADDRESS_ENABLE_A, O>;
impl<'a, const O: u8> SUB_ADDRESS_ENABLE_W<'a, O> {
    #[doc = "Enable sub-address fields"]
    #[inline(always)]
    pub fn enable(self) -> &'a mut W {
        self.variant(SUB_ADDRESS_ENABLE_A::ENABLE)
    }
    #[doc = "Disable sub-address fields"]
    #[inline(always)]
    pub fn disable(self) -> &'a mut W {
        self.variant(SUB_ADDRESS_ENABLE_A::DISABLE)
    }
}
#[doc = "Field `sub_address_length` reader - Byte count for I2C sub-address"]
pub type SUB_ADDRESS_LENGTH_R = crate::FieldReader<u8, SUB_ADDRESS_LENGTH_A>;
#[doc = "Byte count for I2C sub-address\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum SUB_ADDRESS_LENGTH_A {
    #[doc = "0: Sub-addresses include 1 byte"]
    ONE = 0,
    #[doc = "1: Sub-addresses include 2 bytes"]
    TWO = 1,
    #[doc = "2: Sub-addresses include 3 bytes"]
    THREE = 2,
    #[doc = "3: Sub-addresses include 4 bytes"]
    FOUR = 3,
}
impl From<SUB_ADDRESS_LENGTH_A> for u8 {
    #[inline(always)]
    fn from(variant: SUB_ADDRESS_LENGTH_A) -> Self {
        variant as _
    }
}
impl SUB_ADDRESS_LENGTH_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> SUB_ADDRESS_LENGTH_A {
        match self.bits {
            0 => SUB_ADDRESS_LENGTH_A::ONE,
            1 => SUB_ADDRESS_LENGTH_A::TWO,
            2 => SUB_ADDRESS_LENGTH_A::THREE,
            3 => SUB_ADDRESS_LENGTH_A::FOUR,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `ONE`"]
    #[inline(always)]
    pub fn is_one(&self) -> bool {
        *self == SUB_ADDRESS_LENGTH_A::ONE
    }
    #[doc = "Checks if the value of the field is `TWO`"]
    #[inline(always)]
    pub fn is_two(&self) -> bool {
        *self == SUB_ADDRESS_LENGTH_A::TWO
    }
    #[doc = "Checks if the value of the field is `THREE`"]
    #[inline(always)]
    pub fn is_three(&self) -> bool {
        *self == SUB_ADDRESS_LENGTH_A::THREE
    }
    #[doc = "Checks if the value of the field is `FOUR`"]
    #[inline(always)]
    pub fn is_four(&self) -> bool {
        *self == SUB_ADDRESS_LENGTH_A::FOUR
    }
}
#[doc = "Field `sub_address_length` writer - Byte count for I2C sub-address"]
pub type SUB_ADDRESS_LENGTH_W<'a, const O: u8> =
    crate::FieldWriterSafe<'a, u32, CONFIG_SPEC, u8, SUB_ADDRESS_LENGTH_A, 2, O>;
impl<'a, const O: u8> SUB_ADDRESS_LENGTH_W<'a, O> {
    #[doc = "Sub-addresses include 1 byte"]
    #[inline(always)]
    pub fn one(self) -> &'a mut W {
        self.variant(SUB_ADDRESS_LENGTH_A::ONE)
    }
    #[doc = "Sub-addresses include 2 bytes"]
    #[inline(always)]
    pub fn two(self) -> &'a mut W {
        self.variant(SUB_ADDRESS_LENGTH_A::TWO)
    }
    #[doc = "Sub-addresses include 3 bytes"]
    #[inline(always)]
    pub fn three(self) -> &'a mut W {
        self.variant(SUB_ADDRESS_LENGTH_A::THREE)
    }
    #[doc = "Sub-addresses include 4 bytes"]
    #[inline(always)]
    pub fn four(self) -> &'a mut W {
        self.variant(SUB_ADDRESS_LENGTH_A::FOUR)
    }
}
#[doc = "Field `slave_address` reader - I2C transaction slave address"]
pub type SLAVE_ADDRESS_R = crate::FieldReader<u8, u8>;
#[doc = "Field `slave_address` writer - I2C transaction slave address"]
pub type SLAVE_ADDRESS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CONFIG_SPEC, u8, u8, 7, O>;
#[doc = "Field `packet_length` reader - Byte count for each packet"]
pub type PACKET_LENGTH_R = crate::FieldReader<u8, u8>;
#[doc = "Field `packet_length` writer - Byte count for each packet"]
pub type PACKET_LENGTH_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CONFIG_SPEC, u8, u8, 8, O>;
#[doc = "Field `deglitch_cycle` reader - De-glitch function cycle count"]
pub type DEGLITCH_CYCLE_R = crate::FieldReader<u8, u8>;
#[doc = "Field `deglitch_cycle` writer - De-glitch function cycle count"]
pub type DEGLITCH_CYCLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CONFIG_SPEC, u8, u8, 4, O>;
impl R {
    #[doc = "Bit 0 - Enable signal of I2C master function\n\n Asserting this bit will trigger the transaction, and should be de-asserted after finish."]
    #[inline(always)]
    pub fn master_enable(&self) -> MASTER_ENABLE_R {
        MASTER_ENABLE_R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - Packet transfer direction"]
    #[inline(always)]
    pub fn transfer_direction(&self) -> TRANSFER_DIRECTION_R {
        TRANSFER_DIRECTION_R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - Enable de-glitch function on all input pins"]
    #[inline(always)]
    pub fn deglitch_enable(&self) -> DEGLITCH_ENABLE_R {
        DEGLITCH_ENABLE_R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - Enable I2C clock synchronization\n\n Enable this bit to support multi-master and clock-stretching. It should not be turned-off normally."]
    #[inline(always)]
    pub fn clock_synchronize(&self) -> CLOCK_SYNCHRONIZE_R {
        CLOCK_SYNCHRONIZE_R::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 4 - Enable sub-address fields"]
    #[inline(always)]
    pub fn sub_address_enable(&self) -> SUB_ADDRESS_ENABLE_R {
        SUB_ADDRESS_ENABLE_R::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bits 5:6 - Byte count for I2C sub-address"]
    #[inline(always)]
    pub fn sub_address_length(&self) -> SUB_ADDRESS_LENGTH_R {
        SUB_ADDRESS_LENGTH_R::new(((self.bits >> 5) & 3) as u8)
    }
    #[doc = "Bits 8:14 - I2C transaction slave address"]
    #[inline(always)]
    pub fn slave_address(&self) -> SLAVE_ADDRESS_R {
        SLAVE_ADDRESS_R::new(((self.bits >> 8) & 0x7f) as u8)
    }
    #[doc = "Bits 16:23 - Byte count for each packet"]
    #[inline(always)]
    pub fn packet_length(&self) -> PACKET_LENGTH_R {
        PACKET_LENGTH_R::new(((self.bits >> 16) & 0xff) as u8)
    }
    #[doc = "Bits 28:31 - De-glitch function cycle count"]
    #[inline(always)]
    pub fn deglitch_cycle(&self) -> DEGLITCH_CYCLE_R {
        DEGLITCH_CYCLE_R::new(((self.bits >> 28) & 0x0f) as u8)
    }
}
impl W {
    #[doc = "Bit 0 - Enable signal of I2C master function\n\n Asserting this bit will trigger the transaction, and should be de-asserted after finish."]
    #[inline(always)]
    pub fn master_enable(&mut self) -> MASTER_ENABLE_W<0> {
        MASTER_ENABLE_W::new(self)
    }
    #[doc = "Bit 1 - Packet transfer direction"]
    #[inline(always)]
    pub fn transfer_direction(&mut self) -> TRANSFER_DIRECTION_W<1> {
        TRANSFER_DIRECTION_W::new(self)
    }
    #[doc = "Bit 2 - Enable de-glitch function on all input pins"]
    #[inline(always)]
    pub fn deglitch_enable(&mut self) -> DEGLITCH_ENABLE_W<2> {
        DEGLITCH_ENABLE_W::new(self)
    }
    #[doc = "Bit 3 - Enable I2C clock synchronization\n\n Enable this bit to support multi-master and clock-stretching. It should not be turned-off normally."]
    #[inline(always)]
    pub fn clock_synchronize(&mut self) -> CLOCK_SYNCHRONIZE_W<3> {
        CLOCK_SYNCHRONIZE_W::new(self)
    }
    #[doc = "Bit 4 - Enable sub-address fields"]
    #[inline(always)]
    pub fn sub_address_enable(&mut self) -> SUB_ADDRESS_ENABLE_W<4> {
        SUB_ADDRESS_ENABLE_W::new(self)
    }
    #[doc = "Bits 5:6 - Byte count for I2C sub-address"]
    #[inline(always)]
    pub fn sub_address_length(&mut self) -> SUB_ADDRESS_LENGTH_W<5> {
        SUB_ADDRESS_LENGTH_W::new(self)
    }
    #[doc = "Bits 8:14 - I2C transaction slave address"]
    #[inline(always)]
    pub fn slave_address(&mut self) -> SLAVE_ADDRESS_W<8> {
        SLAVE_ADDRESS_W::new(self)
    }
    #[doc = "Bits 16:23 - Byte count for each packet"]
    #[inline(always)]
    pub fn packet_length(&mut self) -> PACKET_LENGTH_W<16> {
        PACKET_LENGTH_W::new(self)
    }
    #[doc = "Bits 28:31 - De-glitch function cycle count"]
    #[inline(always)]
    pub fn deglitch_cycle(&mut self) -> DEGLITCH_CYCLE_W<28> {
        DEGLITCH_CYCLE_W::new(self)
    }
    #[doc = "Writes raw bits to the register."]
    #[inline(always)]
    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
        self.0.bits(bits);
        self
    }
}
#[doc = "Function configuration 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 [config](index.html) module"]
pub struct CONFIG_SPEC;
impl crate::RegisterSpec for CONFIG_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [config::R](R) reader structure"]
impl crate::Readable for CONFIG_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"]
impl crate::Writable for CONFIG_SPEC {
    type Writer = W;
}
#[doc = "`reset()` method sets config to value 0x0a"]
impl crate::Resettable for CONFIG_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0x0a
    }
}