cc13x0_pac 0.10.3

Peripheral Access Crate for TI's cc13x0 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
#[doc = "Register `DMABUSCFG` reader"]
pub type R = crate::R<DmabuscfgSpec>;
#[doc = "Register `DMABUSCFG` writer"]
pub type W = crate::W<DmabuscfgSpec>;
#[doc = "Field `RESERVED0` reader - 7:0\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
pub type Reserved0R = crate::FieldReader;
#[doc = "Field `RESERVED0` writer - 7:0\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
pub type Reserved0W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
#[doc = "8:8\\]
Endianess for the AHB master\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum AhbMst1Bigend {
    #[doc = "1: Big Endian"]
    BigEndian = 1,
    #[doc = "0: Little Endian"]
    LittleEndian = 0,
}
impl From<AhbMst1Bigend> for bool {
    #[inline(always)]
    fn from(variant: AhbMst1Bigend) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `AHB_MST1_BIGEND` reader - 8:8\\]
Endianess for the AHB master"]
pub type AhbMst1BigendR = crate::BitReader<AhbMst1Bigend>;
impl AhbMst1BigendR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> AhbMst1Bigend {
        match self.bits {
            true => AhbMst1Bigend::BigEndian,
            false => AhbMst1Bigend::LittleEndian,
        }
    }
    #[doc = "Big Endian"]
    #[inline(always)]
    pub fn is_big_endian(&self) -> bool {
        *self == AhbMst1Bigend::BigEndian
    }
    #[doc = "Little Endian"]
    #[inline(always)]
    pub fn is_little_endian(&self) -> bool {
        *self == AhbMst1Bigend::LittleEndian
    }
}
#[doc = "Field `AHB_MST1_BIGEND` writer - 8:8\\]
Endianess for the AHB master"]
pub type AhbMst1BigendW<'a, REG> = crate::BitWriter<'a, REG, AhbMst1Bigend>;
impl<'a, REG> AhbMst1BigendW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Big Endian"]
    #[inline(always)]
    pub fn big_endian(self) -> &'a mut crate::W<REG> {
        self.variant(AhbMst1Bigend::BigEndian)
    }
    #[doc = "Little Endian"]
    #[inline(always)]
    pub fn little_endian(self) -> &'a mut crate::W<REG> {
        self.variant(AhbMst1Bigend::LittleEndian)
    }
}
#[doc = "9:9\\]
Locked transform on AHB\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum AhbMst1LockEn {
    #[doc = "1: Transfers are locked"]
    Locked = 1,
    #[doc = "0: Transfers are not locked"]
    NotLocked = 0,
}
impl From<AhbMst1LockEn> for bool {
    #[inline(always)]
    fn from(variant: AhbMst1LockEn) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `AHB_MST1_LOCK_EN` reader - 9:9\\]
Locked transform on AHB"]
pub type AhbMst1LockEnR = crate::BitReader<AhbMst1LockEn>;
impl AhbMst1LockEnR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> AhbMst1LockEn {
        match self.bits {
            true => AhbMst1LockEn::Locked,
            false => AhbMst1LockEn::NotLocked,
        }
    }
    #[doc = "Transfers are locked"]
    #[inline(always)]
    pub fn is_locked(&self) -> bool {
        *self == AhbMst1LockEn::Locked
    }
    #[doc = "Transfers are not locked"]
    #[inline(always)]
    pub fn is_not_locked(&self) -> bool {
        *self == AhbMst1LockEn::NotLocked
    }
}
#[doc = "Field `AHB_MST1_LOCK_EN` writer - 9:9\\]
Locked transform on AHB"]
pub type AhbMst1LockEnW<'a, REG> = crate::BitWriter<'a, REG, AhbMst1LockEn>;
impl<'a, REG> AhbMst1LockEnW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Transfers are locked"]
    #[inline(always)]
    pub fn locked(self) -> &'a mut crate::W<REG> {
        self.variant(AhbMst1LockEn::Locked)
    }
    #[doc = "Transfers are not locked"]
    #[inline(always)]
    pub fn not_locked(self) -> &'a mut crate::W<REG> {
        self.variant(AhbMst1LockEn::NotLocked)
    }
}
#[doc = "10:10\\]
Burst length type of AHB transfer\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum AhbMst1IncrEn {
    #[doc = "1: Fixed length bursts or single transfers"]
    Specified = 1,
    #[doc = "0: Unspecified length burst transfers"]
    Unspecified = 0,
}
impl From<AhbMst1IncrEn> for bool {
    #[inline(always)]
    fn from(variant: AhbMst1IncrEn) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `AHB_MST1_INCR_EN` reader - 10:10\\]
Burst length type of AHB transfer"]
pub type AhbMst1IncrEnR = crate::BitReader<AhbMst1IncrEn>;
impl AhbMst1IncrEnR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> AhbMst1IncrEn {
        match self.bits {
            true => AhbMst1IncrEn::Specified,
            false => AhbMst1IncrEn::Unspecified,
        }
    }
    #[doc = "Fixed length bursts or single transfers"]
    #[inline(always)]
    pub fn is_specified(&self) -> bool {
        *self == AhbMst1IncrEn::Specified
    }
    #[doc = "Unspecified length burst transfers"]
    #[inline(always)]
    pub fn is_unspecified(&self) -> bool {
        *self == AhbMst1IncrEn::Unspecified
    }
}
#[doc = "Field `AHB_MST1_INCR_EN` writer - 10:10\\]
Burst length type of AHB transfer"]
pub type AhbMst1IncrEnW<'a, REG> = crate::BitWriter<'a, REG, AhbMst1IncrEn>;
impl<'a, REG> AhbMst1IncrEnW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Fixed length bursts or single transfers"]
    #[inline(always)]
    pub fn specified(self) -> &'a mut crate::W<REG> {
        self.variant(AhbMst1IncrEn::Specified)
    }
    #[doc = "Unspecified length burst transfers"]
    #[inline(always)]
    pub fn unspecified(self) -> &'a mut crate::W<REG> {
        self.variant(AhbMst1IncrEn::Unspecified)
    }
}
#[doc = "11:11\\]
Idle transfer insertion between consecutive burst transfers on AHB\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum AhbMst1IdleEn {
    #[doc = "1: Idle transfer insertion enabled"]
    Idle = 1,
    #[doc = "0: Do not insert idle transfers."]
    NoIdle = 0,
}
impl From<AhbMst1IdleEn> for bool {
    #[inline(always)]
    fn from(variant: AhbMst1IdleEn) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `AHB_MST1_IDLE_EN` reader - 11:11\\]
Idle transfer insertion between consecutive burst transfers on AHB"]
pub type AhbMst1IdleEnR = crate::BitReader<AhbMst1IdleEn>;
impl AhbMst1IdleEnR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> AhbMst1IdleEn {
        match self.bits {
            true => AhbMst1IdleEn::Idle,
            false => AhbMst1IdleEn::NoIdle,
        }
    }
    #[doc = "Idle transfer insertion enabled"]
    #[inline(always)]
    pub fn is_idle(&self) -> bool {
        *self == AhbMst1IdleEn::Idle
    }
    #[doc = "Do not insert idle transfers."]
    #[inline(always)]
    pub fn is_no_idle(&self) -> bool {
        *self == AhbMst1IdleEn::NoIdle
    }
}
#[doc = "Field `AHB_MST1_IDLE_EN` writer - 11:11\\]
Idle transfer insertion between consecutive burst transfers on AHB"]
pub type AhbMst1IdleEnW<'a, REG> = crate::BitWriter<'a, REG, AhbMst1IdleEn>;
impl<'a, REG> AhbMst1IdleEnW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Idle transfer insertion enabled"]
    #[inline(always)]
    pub fn idle(self) -> &'a mut crate::W<REG> {
        self.variant(AhbMst1IdleEn::Idle)
    }
    #[doc = "Do not insert idle transfers."]
    #[inline(always)]
    pub fn no_idle(self) -> &'a mut crate::W<REG> {
        self.variant(AhbMst1IdleEn::NoIdle)
    }
}
#[doc = "15:12\\]
Maximum burst size that can be performed on the AHB bus\n\nValue on reset: 2"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum AhbMst1BurstSize {
    #[doc = "6: 64 bytes"]
    _64Byte = 6,
    #[doc = "5: 32 bytes"]
    _32Byte = 5,
    #[doc = "4: 16 bytes"]
    _16Byte = 4,
    #[doc = "3: 8 bytes"]
    _8Byte = 3,
    #[doc = "2: 4 bytes"]
    _4Byte = 2,
}
impl From<AhbMst1BurstSize> for u8 {
    #[inline(always)]
    fn from(variant: AhbMst1BurstSize) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for AhbMst1BurstSize {
    type Ux = u8;
}
impl crate::IsEnum for AhbMst1BurstSize {}
#[doc = "Field `AHB_MST1_BURST_SIZE` reader - 15:12\\]
Maximum burst size that can be performed on the AHB bus"]
pub type AhbMst1BurstSizeR = crate::FieldReader<AhbMst1BurstSize>;
impl AhbMst1BurstSizeR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<AhbMst1BurstSize> {
        match self.bits {
            6 => Some(AhbMst1BurstSize::_64Byte),
            5 => Some(AhbMst1BurstSize::_32Byte),
            4 => Some(AhbMst1BurstSize::_16Byte),
            3 => Some(AhbMst1BurstSize::_8Byte),
            2 => Some(AhbMst1BurstSize::_4Byte),
            _ => None,
        }
    }
    #[doc = "64 bytes"]
    #[inline(always)]
    pub fn is_64_byte(&self) -> bool {
        *self == AhbMst1BurstSize::_64Byte
    }
    #[doc = "32 bytes"]
    #[inline(always)]
    pub fn is_32_byte(&self) -> bool {
        *self == AhbMst1BurstSize::_32Byte
    }
    #[doc = "16 bytes"]
    #[inline(always)]
    pub fn is_16_byte(&self) -> bool {
        *self == AhbMst1BurstSize::_16Byte
    }
    #[doc = "8 bytes"]
    #[inline(always)]
    pub fn is_8_byte(&self) -> bool {
        *self == AhbMst1BurstSize::_8Byte
    }
    #[doc = "4 bytes"]
    #[inline(always)]
    pub fn is_4_byte(&self) -> bool {
        *self == AhbMst1BurstSize::_4Byte
    }
}
#[doc = "Field `AHB_MST1_BURST_SIZE` writer - 15:12\\]
Maximum burst size that can be performed on the AHB bus"]
pub type AhbMst1BurstSizeW<'a, REG> = crate::FieldWriter<'a, REG, 4, AhbMst1BurstSize>;
impl<'a, REG> AhbMst1BurstSizeW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "64 bytes"]
    #[inline(always)]
    pub fn _64_byte(self) -> &'a mut crate::W<REG> {
        self.variant(AhbMst1BurstSize::_64Byte)
    }
    #[doc = "32 bytes"]
    #[inline(always)]
    pub fn _32_byte(self) -> &'a mut crate::W<REG> {
        self.variant(AhbMst1BurstSize::_32Byte)
    }
    #[doc = "16 bytes"]
    #[inline(always)]
    pub fn _16_byte(self) -> &'a mut crate::W<REG> {
        self.variant(AhbMst1BurstSize::_16Byte)
    }
    #[doc = "8 bytes"]
    #[inline(always)]
    pub fn _8_byte(self) -> &'a mut crate::W<REG> {
        self.variant(AhbMst1BurstSize::_8Byte)
    }
    #[doc = "4 bytes"]
    #[inline(always)]
    pub fn _4_byte(self) -> &'a mut crate::W<REG> {
        self.variant(AhbMst1BurstSize::_4Byte)
    }
}
#[doc = "Field `RESERVED16` reader - 31:16\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
pub type Reserved16R = crate::FieldReader<u16>;
#[doc = "Field `RESERVED16` writer - 31:16\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
pub type Reserved16W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
impl R {
    #[doc = "Bits 0:7 - 7:0\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
    #[inline(always)]
    pub fn reserved0(&self) -> Reserved0R {
        Reserved0R::new((self.bits & 0xff) as u8)
    }
    #[doc = "Bit 8 - 8:8\\]
Endianess for the AHB master"]
    #[inline(always)]
    pub fn ahb_mst1_bigend(&self) -> AhbMst1BigendR {
        AhbMst1BigendR::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bit 9 - 9:9\\]
Locked transform on AHB"]
    #[inline(always)]
    pub fn ahb_mst1_lock_en(&self) -> AhbMst1LockEnR {
        AhbMst1LockEnR::new(((self.bits >> 9) & 1) != 0)
    }
    #[doc = "Bit 10 - 10:10\\]
Burst length type of AHB transfer"]
    #[inline(always)]
    pub fn ahb_mst1_incr_en(&self) -> AhbMst1IncrEnR {
        AhbMst1IncrEnR::new(((self.bits >> 10) & 1) != 0)
    }
    #[doc = "Bit 11 - 11:11\\]
Idle transfer insertion between consecutive burst transfers on AHB"]
    #[inline(always)]
    pub fn ahb_mst1_idle_en(&self) -> AhbMst1IdleEnR {
        AhbMst1IdleEnR::new(((self.bits >> 11) & 1) != 0)
    }
    #[doc = "Bits 12:15 - 15:12\\]
Maximum burst size that can be performed on the AHB bus"]
    #[inline(always)]
    pub fn ahb_mst1_burst_size(&self) -> AhbMst1BurstSizeR {
        AhbMst1BurstSizeR::new(((self.bits >> 12) & 0x0f) as u8)
    }
    #[doc = "Bits 16:31 - 31:16\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
    #[inline(always)]
    pub fn reserved16(&self) -> Reserved16R {
        Reserved16R::new(((self.bits >> 16) & 0xffff) as u16)
    }
}
impl W {
    #[doc = "Bits 0:7 - 7:0\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
    #[inline(always)]
    #[must_use]
    pub fn reserved0(&mut self) -> Reserved0W<DmabuscfgSpec> {
        Reserved0W::new(self, 0)
    }
    #[doc = "Bit 8 - 8:8\\]
Endianess for the AHB master"]
    #[inline(always)]
    #[must_use]
    pub fn ahb_mst1_bigend(&mut self) -> AhbMst1BigendW<DmabuscfgSpec> {
        AhbMst1BigendW::new(self, 8)
    }
    #[doc = "Bit 9 - 9:9\\]
Locked transform on AHB"]
    #[inline(always)]
    #[must_use]
    pub fn ahb_mst1_lock_en(&mut self) -> AhbMst1LockEnW<DmabuscfgSpec> {
        AhbMst1LockEnW::new(self, 9)
    }
    #[doc = "Bit 10 - 10:10\\]
Burst length type of AHB transfer"]
    #[inline(always)]
    #[must_use]
    pub fn ahb_mst1_incr_en(&mut self) -> AhbMst1IncrEnW<DmabuscfgSpec> {
        AhbMst1IncrEnW::new(self, 10)
    }
    #[doc = "Bit 11 - 11:11\\]
Idle transfer insertion between consecutive burst transfers on AHB"]
    #[inline(always)]
    #[must_use]
    pub fn ahb_mst1_idle_en(&mut self) -> AhbMst1IdleEnW<DmabuscfgSpec> {
        AhbMst1IdleEnW::new(self, 11)
    }
    #[doc = "Bits 12:15 - 15:12\\]
Maximum burst size that can be performed on the AHB bus"]
    #[inline(always)]
    #[must_use]
    pub fn ahb_mst1_burst_size(&mut self) -> AhbMst1BurstSizeW<DmabuscfgSpec> {
        AhbMst1BurstSizeW::new(self, 12)
    }
    #[doc = "Bits 16:31 - 31:16\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
    #[inline(always)]
    #[must_use]
    pub fn reserved16(&mut self) -> Reserved16W<DmabuscfgSpec> {
        Reserved16W::new(self, 16)
    }
}
#[doc = "DMA Controller Master Configuration\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`dmabuscfg::R`](R).  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`dmabuscfg::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct DmabuscfgSpec;
impl crate::RegisterSpec for DmabuscfgSpec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`dmabuscfg::R`](R) reader structure"]
impl crate::Readable for DmabuscfgSpec {}
#[doc = "`write(|w| ..)` method takes [`dmabuscfg::W`](W) writer structure"]
impl crate::Writable for DmabuscfgSpec {
    type Safety = crate::Unsafe;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
}
#[doc = "`reset()` method sets DMABUSCFG to value 0x2400"]
impl crate::Resettable for DmabuscfgSpec {
    const RESET_VALUE: u32 = 0x2400;
}