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
#[doc = "Register `FEATURE` reader"]
pub type R = crate::R<FeatureSpec>;
#[doc = "FMMU Operation\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Fmmu {
    #[doc = "0: Bit oriented"]
    Value1 = 0,
    #[doc = "1: Byte oriented"]
    Value2 = 1,
}
impl From<Fmmu> for bool {
    #[inline(always)]
    fn from(variant: Fmmu) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `FMMU` reader - FMMU Operation"]
pub type FmmuR = crate::BitReader<Fmmu>;
impl FmmuR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Fmmu {
        match self.bits {
            false => Fmmu::Value1,
            true => Fmmu::Value2,
        }
    }
    #[doc = "Bit oriented"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == Fmmu::Value1
    }
    #[doc = "Byte oriented"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == Fmmu::Value2
    }
}
#[doc = "Distributed Clocks\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Clks {
    #[doc = "0: Not available"]
    Value1 = 0,
    #[doc = "1: Available"]
    Value2 = 1,
}
impl From<Clks> for bool {
    #[inline(always)]
    fn from(variant: Clks) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CLKS` reader - Distributed Clocks"]
pub type ClksR = crate::BitReader<Clks>;
impl ClksR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Clks {
        match self.bits {
            false => Clks::Value1,
            true => Clks::Value2,
        }
    }
    #[doc = "Not available"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == Clks::Value1
    }
    #[doc = "Available"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == Clks::Value2
    }
}
#[doc = "Distributed Clocks (width)\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ClksW {
    #[doc = "0: 32 bits"]
    Value1 = 0,
    #[doc = "1: 64 bits"]
    Value2 = 1,
}
impl From<ClksW> for bool {
    #[inline(always)]
    fn from(variant: ClksW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CLKS_W` reader - Distributed Clocks (width)"]
pub type ClksWR = crate::BitReader<ClksW>;
impl ClksWR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> ClksW {
        match self.bits {
            false => ClksW::Value1,
            true => ClksW::Value2,
        }
    }
    #[doc = "32 bits"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == ClksW::Value1
    }
    #[doc = "64 bits"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == ClksW::Value2
    }
}
#[doc = "Low Jitter EBUS\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum LjEbus {
    #[doc = "0: Not available, standard jitter"]
    Value1 = 0,
    #[doc = "1: Available, jitter minimized"]
    Value2 = 1,
}
impl From<LjEbus> for bool {
    #[inline(always)]
    fn from(variant: LjEbus) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `LJ_EBUS` reader - Low Jitter EBUS"]
pub type LjEbusR = crate::BitReader<LjEbus>;
impl LjEbusR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> LjEbus {
        match self.bits {
            false => LjEbus::Value1,
            true => LjEbus::Value2,
        }
    }
    #[doc = "Not available, standard jitter"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == LjEbus::Value1
    }
    #[doc = "Available, jitter minimized"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == LjEbus::Value2
    }
}
#[doc = "Enhanced Link Detection EBUS\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EldEbus {
    #[doc = "0: Not available"]
    Value1 = 0,
    #[doc = "1: Available"]
    Value2 = 1,
}
impl From<EldEbus> for bool {
    #[inline(always)]
    fn from(variant: EldEbus) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `ELD_EBUS` reader - Enhanced Link Detection EBUS"]
pub type EldEbusR = crate::BitReader<EldEbus>;
impl EldEbusR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> EldEbus {
        match self.bits {
            false => EldEbus::Value1,
            true => EldEbus::Value2,
        }
    }
    #[doc = "Not available"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == EldEbus::Value1
    }
    #[doc = "Available"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == EldEbus::Value2
    }
}
#[doc = "Enhanced Link Detection MII\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EldMii {
    #[doc = "0: Not available"]
    Value1 = 0,
    #[doc = "1: Available"]
    Value2 = 1,
}
impl From<EldMii> for bool {
    #[inline(always)]
    fn from(variant: EldMii) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `ELD_MII` reader - Enhanced Link Detection MII"]
pub type EldMiiR = crate::BitReader<EldMii>;
impl EldMiiR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> EldMii {
        match self.bits {
            false => EldMii::Value1,
            true => EldMii::Value2,
        }
    }
    #[doc = "Not available"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == EldMii::Value1
    }
    #[doc = "Available"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == EldMii::Value2
    }
}
#[doc = "Separate Handling of FCS Errors\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ShFcse {
    #[doc = "0: Not supported"]
    Value1 = 0,
    #[doc = "1: Supported, frames with wrong FCS and additional nibble will be counted separately in Forwarded RX Error Counter"]
    Value2 = 1,
}
impl From<ShFcse> for bool {
    #[inline(always)]
    fn from(variant: ShFcse) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `SH_FCSE` reader - Separate Handling of FCS Errors"]
pub type ShFcseR = crate::BitReader<ShFcse>;
impl ShFcseR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> ShFcse {
        match self.bits {
            false => ShFcse::Value1,
            true => ShFcse::Value2,
        }
    }
    #[doc = "Not supported"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == ShFcse::Value1
    }
    #[doc = "Supported, frames with wrong FCS and additional nibble will be counted separately in Forwarded RX Error Counter"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == ShFcse::Value2
    }
}
#[doc = "Enhanced DC SYNC Activation\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EdcSynca {
    #[doc = "0: Not available"]
    Value1 = 0,
    #[doc = "1: Available"]
    Value2 = 1,
}
impl From<EdcSynca> for bool {
    #[inline(always)]
    fn from(variant: EdcSynca) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `EDC_SYNCA` reader - Enhanced DC SYNC Activation"]
pub type EdcSyncaR = crate::BitReader<EdcSynca>;
impl EdcSyncaR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> EdcSynca {
        match self.bits {
            false => EdcSynca::Value1,
            true => EdcSynca::Value2,
        }
    }
    #[doc = "Not available"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == EdcSynca::Value1
    }
    #[doc = "Available"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == EdcSynca::Value2
    }
}
#[doc = "EtherCAT LRW command support\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum LrwCs {
    #[doc = "0: Supported"]
    Value1 = 0,
    #[doc = "1: Not supported"]
    Value2 = 1,
}
impl From<LrwCs> for bool {
    #[inline(always)]
    fn from(variant: LrwCs) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `LRW_CS` reader - EtherCAT LRW command support"]
pub type LrwCsR = crate::BitReader<LrwCs>;
impl LrwCsR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> LrwCs {
        match self.bits {
            false => LrwCs::Value1,
            true => LrwCs::Value2,
        }
    }
    #[doc = "Supported"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == LrwCs::Value1
    }
    #[doc = "Not supported"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == LrwCs::Value2
    }
}
#[doc = "EtherCAT read/write command support (BRW, APRW, FPRW)\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RwCs {
    #[doc = "0: Supported"]
    Value1 = 0,
    #[doc = "1: Not supported"]
    Value2 = 1,
}
impl From<RwCs> for bool {
    #[inline(always)]
    fn from(variant: RwCs) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `RW_CS` reader - EtherCAT read/write command support (BRW, APRW, FPRW)"]
pub type RwCsR = crate::BitReader<RwCs>;
impl RwCsR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> RwCs {
        match self.bits {
            false => RwCs::Value1,
            true => RwCs::Value2,
        }
    }
    #[doc = "Supported"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == RwCs::Value1
    }
    #[doc = "Not supported"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == RwCs::Value2
    }
}
#[doc = "Fixed FMMU/SyncManager configuration\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FxConf {
    #[doc = "0: Variable configuration"]
    Value1 = 0,
    #[doc = "1: Fixed configuration (refer to documentation of supporting ESCs)"]
    Value2 = 1,
}
impl From<FxConf> for bool {
    #[inline(always)]
    fn from(variant: FxConf) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `FX_CONF` reader - Fixed FMMU/SyncManager configuration"]
pub type FxConfR = crate::BitReader<FxConf>;
impl FxConfR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> FxConf {
        match self.bits {
            false => FxConf::Value1,
            true => FxConf::Value2,
        }
    }
    #[doc = "Variable configuration"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == FxConf::Value1
    }
    #[doc = "Fixed configuration (refer to documentation of supporting ESCs)"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == FxConf::Value2
    }
}
impl R {
    #[doc = "Bit 0 - FMMU Operation"]
    #[inline(always)]
    pub fn fmmu(&self) -> FmmuR {
        FmmuR::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 2 - Distributed Clocks"]
    #[inline(always)]
    pub fn clks(&self) -> ClksR {
        ClksR::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - Distributed Clocks (width)"]
    #[inline(always)]
    pub fn clks_w(&self) -> ClksWR {
        ClksWR::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 4 - Low Jitter EBUS"]
    #[inline(always)]
    pub fn lj_ebus(&self) -> LjEbusR {
        LjEbusR::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 5 - Enhanced Link Detection EBUS"]
    #[inline(always)]
    pub fn eld_ebus(&self) -> EldEbusR {
        EldEbusR::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "Bit 6 - Enhanced Link Detection MII"]
    #[inline(always)]
    pub fn eld_mii(&self) -> EldMiiR {
        EldMiiR::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bit 7 - Separate Handling of FCS Errors"]
    #[inline(always)]
    pub fn sh_fcse(&self) -> ShFcseR {
        ShFcseR::new(((self.bits >> 7) & 1) != 0)
    }
    #[doc = "Bit 8 - Enhanced DC SYNC Activation"]
    #[inline(always)]
    pub fn edc_synca(&self) -> EdcSyncaR {
        EdcSyncaR::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bit 9 - EtherCAT LRW command support"]
    #[inline(always)]
    pub fn lrw_cs(&self) -> LrwCsR {
        LrwCsR::new(((self.bits >> 9) & 1) != 0)
    }
    #[doc = "Bit 10 - EtherCAT read/write command support (BRW, APRW, FPRW)"]
    #[inline(always)]
    pub fn rw_cs(&self) -> RwCsR {
        RwCsR::new(((self.bits >> 10) & 1) != 0)
    }
    #[doc = "Bit 11 - Fixed FMMU/SyncManager configuration"]
    #[inline(always)]
    pub fn fx_conf(&self) -> FxConfR {
        FxConfR::new(((self.bits >> 11) & 1) != 0)
    }
}
#[doc = "ESC Features Supported\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`feature::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct FeatureSpec;
impl crate::RegisterSpec for FeatureSpec {
    type Ux = u16;
}
#[doc = "`read()` method returns [`feature::R`](R) reader structure"]
impl crate::Readable for FeatureSpec {}
#[doc = "`reset()` method sets FEATURE to value 0x01cc"]
impl crate::Resettable for FeatureSpec {
    const RESET_VALUE: u16 = 0x01cc;
}