mimxrt685s-pac 0.5.0

Peripheral Access Crate for MIMXRT685s devices
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
#[doc = "Register `MCTRL` reader"]
pub type R = crate::R<MctrlSpec>;
#[doc = "Register `MCTRL` writer"]
pub type W = crate::W<MctrlSpec>;
#[doc = "Request\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Request {
    #[doc = "0: NONE: Returns to this when finished with any request. The MSTATUS register indicates the master's state. See also AutoIBI mode. NONE is only written as 0: when setting RDTERM to 1 (to stop a read in progress) or when setting IBI reponse field (IBIRESP) for MSG use"]
    None = 0,
    #[doc = "1: EMITSTARTADDR: Emit START with address and direction from a stopped state or in the middle of a Single Data Rate (SDR) message. If from a stopped state (IDLE), then emit start may be prevented by an event (like IBI, MR, HJ), in which case the appropriate interrupt is signaled; note that Emit START can be resubmitted."]
    Emitstartaddr = 1,
    #[doc = "2: EMITSTOP: Emit a STOP on bus. Must be in Single Data Rate (SDR) mode. If in Dynamic Address Assignment (DAA) mode, Emit stop will exit DAA mode."]
    Emitstop = 2,
    #[doc = "3: IBIACKNACK: Manual In-Band Interrupt (IBI) Acknowledge (ACK) or Not Acknowledge (NACK). When IBIRESP has indicated a hold on an In-Band Interrupt to allow a manual decision, this request completes it. Uses IBIRESP to provide the information."]
    Ibiacknack = 3,
    #[doc = "4: PROCESSDAA: If not in Dynamic Address Assignment (DAA) mode now, will issue START, 7E, ENTDAA, and then will emit 7E/R to process each slave. Will stop just before the new Dynamic Address (DA) is to be emitted. The next Process DAA request will use the Addr field as the new DA to assign. If NACKed on the 7E/R, then the interrupt will indicate this situation, and a STOP will be emitted."]
    Processdaa = 4,
    #[doc = "6: FORCEEXIT and IBHR: Emit an Exit Pattern from any state, but end Double Data Rate (DDR) (including MSGDDR), if in DDR mode now. Includes a STOP afterward. If TYPE != 0, then it will perform an IBHR (In-Band Hardware Reset). If TYPE=2, then it does a normal reset (DEFRST can prevent the reset). If TYPE=3, it does a forced reset (will always reset)."]
    Forceexit = 6,
    #[doc = "7: AUTOIBI: Hold in a stopped state, but auto-emit START,7E when the slave is holding down SDA to get an In-Band Interrupt (IBI). Actual In-Band Interrupt handling is defined by IBIRESP."]
    Autoibi = 7,
}
impl From<Request> for u8 {
    #[inline(always)]
    fn from(variant: Request) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Request {
    type Ux = u8;
}
impl crate::IsEnum for Request {}
#[doc = "Field `REQUEST` reader - Request"]
pub type RequestR = crate::FieldReader<Request>;
impl RequestR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Request> {
        match self.bits {
            0 => Some(Request::None),
            1 => Some(Request::Emitstartaddr),
            2 => Some(Request::Emitstop),
            3 => Some(Request::Ibiacknack),
            4 => Some(Request::Processdaa),
            6 => Some(Request::Forceexit),
            7 => Some(Request::Autoibi),
            _ => None,
        }
    }
    #[doc = "NONE: Returns to this when finished with any request. The MSTATUS register indicates the master's state. See also AutoIBI mode. NONE is only written as 0: when setting RDTERM to 1 (to stop a read in progress) or when setting IBI reponse field (IBIRESP) for MSG use"]
    #[inline(always)]
    pub fn is_none(&self) -> bool {
        *self == Request::None
    }
    #[doc = "EMITSTARTADDR: Emit START with address and direction from a stopped state or in the middle of a Single Data Rate (SDR) message. If from a stopped state (IDLE), then emit start may be prevented by an event (like IBI, MR, HJ), in which case the appropriate interrupt is signaled; note that Emit START can be resubmitted."]
    #[inline(always)]
    pub fn is_emitstartaddr(&self) -> bool {
        *self == Request::Emitstartaddr
    }
    #[doc = "EMITSTOP: Emit a STOP on bus. Must be in Single Data Rate (SDR) mode. If in Dynamic Address Assignment (DAA) mode, Emit stop will exit DAA mode."]
    #[inline(always)]
    pub fn is_emitstop(&self) -> bool {
        *self == Request::Emitstop
    }
    #[doc = "IBIACKNACK: Manual In-Band Interrupt (IBI) Acknowledge (ACK) or Not Acknowledge (NACK). When IBIRESP has indicated a hold on an In-Band Interrupt to allow a manual decision, this request completes it. Uses IBIRESP to provide the information."]
    #[inline(always)]
    pub fn is_ibiacknack(&self) -> bool {
        *self == Request::Ibiacknack
    }
    #[doc = "PROCESSDAA: If not in Dynamic Address Assignment (DAA) mode now, will issue START, 7E, ENTDAA, and then will emit 7E/R to process each slave. Will stop just before the new Dynamic Address (DA) is to be emitted. The next Process DAA request will use the Addr field as the new DA to assign. If NACKed on the 7E/R, then the interrupt will indicate this situation, and a STOP will be emitted."]
    #[inline(always)]
    pub fn is_processdaa(&self) -> bool {
        *self == Request::Processdaa
    }
    #[doc = "FORCEEXIT and IBHR: Emit an Exit Pattern from any state, but end Double Data Rate (DDR) (including MSGDDR), if in DDR mode now. Includes a STOP afterward. If TYPE != 0, then it will perform an IBHR (In-Band Hardware Reset). If TYPE=2, then it does a normal reset (DEFRST can prevent the reset). If TYPE=3, it does a forced reset (will always reset)."]
    #[inline(always)]
    pub fn is_forceexit(&self) -> bool {
        *self == Request::Forceexit
    }
    #[doc = "AUTOIBI: Hold in a stopped state, but auto-emit START,7E when the slave is holding down SDA to get an In-Band Interrupt (IBI). Actual In-Band Interrupt handling is defined by IBIRESP."]
    #[inline(always)]
    pub fn is_autoibi(&self) -> bool {
        *self == Request::Autoibi
    }
}
#[doc = "Field `REQUEST` writer - Request"]
pub type RequestW<'a, REG> = crate::FieldWriter<'a, REG, 3, Request>;
impl<'a, REG> RequestW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "NONE: Returns to this when finished with any request. The MSTATUS register indicates the master's state. See also AutoIBI mode. NONE is only written as 0: when setting RDTERM to 1 (to stop a read in progress) or when setting IBI reponse field (IBIRESP) for MSG use"]
    #[inline(always)]
    pub fn none(self) -> &'a mut crate::W<REG> {
        self.variant(Request::None)
    }
    #[doc = "EMITSTARTADDR: Emit START with address and direction from a stopped state or in the middle of a Single Data Rate (SDR) message. If from a stopped state (IDLE), then emit start may be prevented by an event (like IBI, MR, HJ), in which case the appropriate interrupt is signaled; note that Emit START can be resubmitted."]
    #[inline(always)]
    pub fn emitstartaddr(self) -> &'a mut crate::W<REG> {
        self.variant(Request::Emitstartaddr)
    }
    #[doc = "EMITSTOP: Emit a STOP on bus. Must be in Single Data Rate (SDR) mode. If in Dynamic Address Assignment (DAA) mode, Emit stop will exit DAA mode."]
    #[inline(always)]
    pub fn emitstop(self) -> &'a mut crate::W<REG> {
        self.variant(Request::Emitstop)
    }
    #[doc = "IBIACKNACK: Manual In-Band Interrupt (IBI) Acknowledge (ACK) or Not Acknowledge (NACK). When IBIRESP has indicated a hold on an In-Band Interrupt to allow a manual decision, this request completes it. Uses IBIRESP to provide the information."]
    #[inline(always)]
    pub fn ibiacknack(self) -> &'a mut crate::W<REG> {
        self.variant(Request::Ibiacknack)
    }
    #[doc = "PROCESSDAA: If not in Dynamic Address Assignment (DAA) mode now, will issue START, 7E, ENTDAA, and then will emit 7E/R to process each slave. Will stop just before the new Dynamic Address (DA) is to be emitted. The next Process DAA request will use the Addr field as the new DA to assign. If NACKed on the 7E/R, then the interrupt will indicate this situation, and a STOP will be emitted."]
    #[inline(always)]
    pub fn processdaa(self) -> &'a mut crate::W<REG> {
        self.variant(Request::Processdaa)
    }
    #[doc = "FORCEEXIT and IBHR: Emit an Exit Pattern from any state, but end Double Data Rate (DDR) (including MSGDDR), if in DDR mode now. Includes a STOP afterward. If TYPE != 0, then it will perform an IBHR (In-Band Hardware Reset). If TYPE=2, then it does a normal reset (DEFRST can prevent the reset). If TYPE=3, it does a forced reset (will always reset)."]
    #[inline(always)]
    pub fn forceexit(self) -> &'a mut crate::W<REG> {
        self.variant(Request::Forceexit)
    }
    #[doc = "AUTOIBI: Hold in a stopped state, but auto-emit START,7E when the slave is holding down SDA to get an In-Band Interrupt (IBI). Actual In-Band Interrupt handling is defined by IBIRESP."]
    #[inline(always)]
    pub fn autoibi(self) -> &'a mut crate::W<REG> {
        self.variant(Request::Autoibi)
    }
}
#[doc = "Bus type with START\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Type {
    #[doc = "0: I3C: Normally the SDR mode of I3C. For ForceExit, the Exit pattern."]
    I3c = 0,
    #[doc = "1: I2C: Normally the Standard I2C protocol."]
    I2c = 1,
    #[doc = "2: DDR: (Double Data Rate): Normally the HDR-DDR mode of I3C. Enter DDR mode (7E and then ENTHDR0), if the module is not already in DDR mode. The 1st byte written to the TX FIFO should be a command, and should already be in the FIFO. To end DDR mode, use ForceExit. For ForceExit, the normal IBHR (In-Band Hardware Reset)."]
    Ddr = 2,
    #[doc = "3: For ForcedExit, this is forced IBHR."]
    Forcedibhr = 3,
}
impl From<Type> for u8 {
    #[inline(always)]
    fn from(variant: Type) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Type {
    type Ux = u8;
}
impl crate::IsEnum for Type {}
#[doc = "Field `TYPE` reader - Bus type with START"]
pub type TypeR = crate::FieldReader<Type>;
impl TypeR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Type {
        match self.bits {
            0 => Type::I3c,
            1 => Type::I2c,
            2 => Type::Ddr,
            3 => Type::Forcedibhr,
            _ => unreachable!(),
        }
    }
    #[doc = "I3C: Normally the SDR mode of I3C. For ForceExit, the Exit pattern."]
    #[inline(always)]
    pub fn is_i3c(&self) -> bool {
        *self == Type::I3c
    }
    #[doc = "I2C: Normally the Standard I2C protocol."]
    #[inline(always)]
    pub fn is_i2c(&self) -> bool {
        *self == Type::I2c
    }
    #[doc = "DDR: (Double Data Rate): Normally the HDR-DDR mode of I3C. Enter DDR mode (7E and then ENTHDR0), if the module is not already in DDR mode. The 1st byte written to the TX FIFO should be a command, and should already be in the FIFO. To end DDR mode, use ForceExit. For ForceExit, the normal IBHR (In-Band Hardware Reset)."]
    #[inline(always)]
    pub fn is_ddr(&self) -> bool {
        *self == Type::Ddr
    }
    #[doc = "For ForcedExit, this is forced IBHR."]
    #[inline(always)]
    pub fn is_forcedibhr(&self) -> bool {
        *self == Type::Forcedibhr
    }
}
#[doc = "Field `TYPE` writer - Bus type with START"]
pub type TypeW<'a, REG> = crate::FieldWriter<'a, REG, 2, Type, crate::Safe>;
impl<'a, REG> TypeW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "I3C: Normally the SDR mode of I3C. For ForceExit, the Exit pattern."]
    #[inline(always)]
    pub fn i3c(self) -> &'a mut crate::W<REG> {
        self.variant(Type::I3c)
    }
    #[doc = "I2C: Normally the Standard I2C protocol."]
    #[inline(always)]
    pub fn i2c(self) -> &'a mut crate::W<REG> {
        self.variant(Type::I2c)
    }
    #[doc = "DDR: (Double Data Rate): Normally the HDR-DDR mode of I3C. Enter DDR mode (7E and then ENTHDR0), if the module is not already in DDR mode. The 1st byte written to the TX FIFO should be a command, and should already be in the FIFO. To end DDR mode, use ForceExit. For ForceExit, the normal IBHR (In-Band Hardware Reset)."]
    #[inline(always)]
    pub fn ddr(self) -> &'a mut crate::W<REG> {
        self.variant(Type::Ddr)
    }
    #[doc = "For ForcedExit, this is forced IBHR."]
    #[inline(always)]
    pub fn forcedibhr(self) -> &'a mut crate::W<REG> {
        self.variant(Type::Forcedibhr)
    }
}
#[doc = "In-Band Interrupt (IBI) response\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Ibiresp {
    #[doc = "0: ACK: Acknowledge. A mandatory byte (or not) is decided by the Master In-band Interrupt Registry and Rules Register (MIBIRULES). To limit the maximum number of IBI bytes, configure the Read Termination field (MCTRL.RDTERM)."]
    Ack = 0,
    #[doc = "1: NACK: Not acknowledge"]
    Nack = 1,
    #[doc = "2: ACK_WITH_MANDATORY: Acknowledge with mandatory byte (ignores the MIBIRULES register). Acknowledge with mandatory byte should not be used, unless only slaves with a mandatory byte can cause an In-Band Interrupt."]
    AckWithMandatory = 2,
    #[doc = "3: MANUAL: stop and wait for a decision using the IBIAckNack request"]
    Manual = 3,
}
impl From<Ibiresp> for u8 {
    #[inline(always)]
    fn from(variant: Ibiresp) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Ibiresp {
    type Ux = u8;
}
impl crate::IsEnum for Ibiresp {}
#[doc = "Field `IBIRESP` reader - In-Band Interrupt (IBI) response"]
pub type IbirespR = crate::FieldReader<Ibiresp>;
impl IbirespR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Ibiresp {
        match self.bits {
            0 => Ibiresp::Ack,
            1 => Ibiresp::Nack,
            2 => Ibiresp::AckWithMandatory,
            3 => Ibiresp::Manual,
            _ => unreachable!(),
        }
    }
    #[doc = "ACK: Acknowledge. A mandatory byte (or not) is decided by the Master In-band Interrupt Registry and Rules Register (MIBIRULES). To limit the maximum number of IBI bytes, configure the Read Termination field (MCTRL.RDTERM)."]
    #[inline(always)]
    pub fn is_ack(&self) -> bool {
        *self == Ibiresp::Ack
    }
    #[doc = "NACK: Not acknowledge"]
    #[inline(always)]
    pub fn is_nack(&self) -> bool {
        *self == Ibiresp::Nack
    }
    #[doc = "ACK_WITH_MANDATORY: Acknowledge with mandatory byte (ignores the MIBIRULES register). Acknowledge with mandatory byte should not be used, unless only slaves with a mandatory byte can cause an In-Band Interrupt."]
    #[inline(always)]
    pub fn is_ack_with_mandatory(&self) -> bool {
        *self == Ibiresp::AckWithMandatory
    }
    #[doc = "MANUAL: stop and wait for a decision using the IBIAckNack request"]
    #[inline(always)]
    pub fn is_manual(&self) -> bool {
        *self == Ibiresp::Manual
    }
}
#[doc = "Field `IBIRESP` writer - In-Band Interrupt (IBI) response"]
pub type IbirespW<'a, REG> = crate::FieldWriter<'a, REG, 2, Ibiresp, crate::Safe>;
impl<'a, REG> IbirespW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "ACK: Acknowledge. A mandatory byte (or not) is decided by the Master In-band Interrupt Registry and Rules Register (MIBIRULES). To limit the maximum number of IBI bytes, configure the Read Termination field (MCTRL.RDTERM)."]
    #[inline(always)]
    pub fn ack(self) -> &'a mut crate::W<REG> {
        self.variant(Ibiresp::Ack)
    }
    #[doc = "NACK: Not acknowledge"]
    #[inline(always)]
    pub fn nack(self) -> &'a mut crate::W<REG> {
        self.variant(Ibiresp::Nack)
    }
    #[doc = "ACK_WITH_MANDATORY: Acknowledge with mandatory byte (ignores the MIBIRULES register). Acknowledge with mandatory byte should not be used, unless only slaves with a mandatory byte can cause an In-Band Interrupt."]
    #[inline(always)]
    pub fn ack_with_mandatory(self) -> &'a mut crate::W<REG> {
        self.variant(Ibiresp::AckWithMandatory)
    }
    #[doc = "MANUAL: stop and wait for a decision using the IBIAckNack request"]
    #[inline(always)]
    pub fn manual(self) -> &'a mut crate::W<REG> {
        self.variant(Ibiresp::Manual)
    }
}
#[doc = "DIR\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Dir {
    #[doc = "0: DIRWRITE: Write"]
    Dirwrite = 0,
    #[doc = "1: DIRREAD: Read"]
    Dirread = 1,
}
impl From<Dir> for bool {
    #[inline(always)]
    fn from(variant: Dir) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `DIR` reader - DIR"]
pub type DirR = crate::BitReader<Dir>;
impl DirR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Dir {
        match self.bits {
            false => Dir::Dirwrite,
            true => Dir::Dirread,
        }
    }
    #[doc = "DIRWRITE: Write"]
    #[inline(always)]
    pub fn is_dirwrite(&self) -> bool {
        *self == Dir::Dirwrite
    }
    #[doc = "DIRREAD: Read"]
    #[inline(always)]
    pub fn is_dirread(&self) -> bool {
        *self == Dir::Dirread
    }
}
#[doc = "Field `DIR` writer - DIR"]
pub type DirW<'a, REG> = crate::BitWriter<'a, REG, Dir>;
impl<'a, REG> DirW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "DIRWRITE: Write"]
    #[inline(always)]
    pub fn dirwrite(self) -> &'a mut crate::W<REG> {
        self.variant(Dir::Dirwrite)
    }
    #[doc = "DIRREAD: Read"]
    #[inline(always)]
    pub fn dirread(self) -> &'a mut crate::W<REG> {
        self.variant(Dir::Dirread)
    }
}
#[doc = "Field `ADDR` reader - ADDR"]
pub type AddrR = crate::FieldReader;
#[doc = "Field `ADDR` writer - ADDR"]
pub type AddrW<'a, REG> = crate::FieldWriter<'a, REG, 7>;
#[doc = "Field `RDTERM` reader - Read terminate"]
pub type RdtermR = crate::FieldReader;
#[doc = "Field `RDTERM` writer - Read terminate"]
pub type RdtermW<'a, REG> = crate::FieldWriter<'a, REG, 8>;
impl R {
    #[doc = "Bits 0:2 - Request"]
    #[inline(always)]
    pub fn request(&self) -> RequestR {
        RequestR::new((self.bits & 7) as u8)
    }
    #[doc = "Bits 4:5 - Bus type with START"]
    #[inline(always)]
    pub fn type_(&self) -> TypeR {
        TypeR::new(((self.bits >> 4) & 3) as u8)
    }
    #[doc = "Bits 6:7 - In-Band Interrupt (IBI) response"]
    #[inline(always)]
    pub fn ibiresp(&self) -> IbirespR {
        IbirespR::new(((self.bits >> 6) & 3) as u8)
    }
    #[doc = "Bit 8 - DIR"]
    #[inline(always)]
    pub fn dir(&self) -> DirR {
        DirR::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bits 9:15 - ADDR"]
    #[inline(always)]
    pub fn addr(&self) -> AddrR {
        AddrR::new(((self.bits >> 9) & 0x7f) as u8)
    }
    #[doc = "Bits 16:23 - Read terminate"]
    #[inline(always)]
    pub fn rdterm(&self) -> RdtermR {
        RdtermR::new(((self.bits >> 16) & 0xff) as u8)
    }
}
#[cfg(feature = "debug")]
impl core::fmt::Debug for R {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("MCTRL")
            .field("request", &self.request())
            .field("type_", &self.type_())
            .field("ibiresp", &self.ibiresp())
            .field("dir", &self.dir())
            .field("addr", &self.addr())
            .field("rdterm", &self.rdterm())
            .finish()
    }
}
impl W {
    #[doc = "Bits 0:2 - Request"]
    #[inline(always)]
    pub fn request(&mut self) -> RequestW<MctrlSpec> {
        RequestW::new(self, 0)
    }
    #[doc = "Bits 4:5 - Bus type with START"]
    #[inline(always)]
    pub fn type_(&mut self) -> TypeW<MctrlSpec> {
        TypeW::new(self, 4)
    }
    #[doc = "Bits 6:7 - In-Band Interrupt (IBI) response"]
    #[inline(always)]
    pub fn ibiresp(&mut self) -> IbirespW<MctrlSpec> {
        IbirespW::new(self, 6)
    }
    #[doc = "Bit 8 - DIR"]
    #[inline(always)]
    pub fn dir(&mut self) -> DirW<MctrlSpec> {
        DirW::new(self, 8)
    }
    #[doc = "Bits 9:15 - ADDR"]
    #[inline(always)]
    pub fn addr(&mut self) -> AddrW<MctrlSpec> {
        AddrW::new(self, 9)
    }
    #[doc = "Bits 16:23 - Read terminate"]
    #[inline(always)]
    pub fn rdterm(&mut self) -> RdtermW<MctrlSpec> {
        RdtermW::new(self, 16)
    }
}
#[doc = "Master Main Control Register\n\nYou can [`read`](crate::Reg::read) this register and get [`mctrl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`mctrl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct MctrlSpec;
impl crate::RegisterSpec for MctrlSpec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`mctrl::R`](R) reader structure"]
impl crate::Readable for MctrlSpec {}
#[doc = "`write(|w| ..)` method takes [`mctrl::W`](W) writer structure"]
impl crate::Writable for MctrlSpec {
    type Safety = crate::Unsafe;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
}
#[doc = "`reset()` method sets MCTRL to value 0"]
impl crate::Resettable for MctrlSpec {
    const RESET_VALUE: u32 = 0;
}