iqs323-driver 0.1.0

An embedded async driver for the IQS323 IQ Switch ProxFusion touch and proximity sensing controller.
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
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
device_driver::create_device!(
    device_name: Registers,
    dsl: {
        config {
            type RegisterAddressType = u8;
            type DefaultByteOrder = LE;
        }

        #[cfg(feature = "movement-ui")]
        register Version {
            type Access = ReadOnly;
            const ADDRESS = 0;
            const SIZE_BITS = 48;
            const RESET_VALUE = [0xb6, 0x05, 0x01, 0x00, 0x04, 0x00];
            const ALLOW_ADDRESS_OVERLAP = true;

            product_number: uint = 0..16,
            major_version: uint = 16..32,
            minor_version: uint = 32..48,
        },
        #[cfg(not(feature = "movement-ui"))]
        register Version {
            type Access = ReadOnly;
            const ADDRESS = 0;
            const SIZE_BITS = 48;
            const RESET_VALUE = [0x52, 0x04, 0x01, 0x00, 0x03, 0x00];
            const ALLOW_ADDRESS_OVERLAP = true;

            product_number: uint = 0..16,
            major_version: uint = 16..32,
            minor_version: uint = 32..48,
        },
        block SysInfo {
            register SystemStatus {
                type Access = ReadOnly;
                const ADDRESS = 0x10;
                const SIZE_BITS = 16;

                prox_event: bool = 0,
                touch_event: bool = 1,
                slider_event: bool = 2,
                power_event: bool = 3,
                ati_event: bool = 4,
                ati_active: bool = 5,
                ati_error: bool = 6,
                reset_event: bool = 7,
                ch0_prox_event: bool = 8,
                ch0_touch_event: bool = 9,
                ch1_prox_event: bool = 10,
                ch1_touch_event: bool = 11,
                ch2_prox_event: bool = 12,
                ch2_touch_event: bool = 13,
                current_power_mode: uint as enum PowerModeStatus {
                    Normal = default,
                    Low = 1,
                    UltraLow = 2,
                    Halt = 3,
                } = 14..16,
            },
            register Gestures {
                type Access = ReadOnly;
                const ADDRESS = 0x11;
                const SIZE_BITS = 16;

                tap: bool = 0,
                swipe_positive: bool = 1,
                swipe_negative: bool = 2,
                flick_positive: bool = 3,
                flick_negative: bool = 4,
                hold: bool = 5,
                event: bool = 6,
                busy: bool = 7,
            },
            register SliderPosition {
                type Access = ReadOnly;
                const ADDRESS = 0x12;
                const SIZE_BITS = 16;

                value: uint = 0..16,
            },
            register Ch0FilteredCounts {
                type Access = ReadOnly;
                const ADDRESS = 0x13;
                const SIZE_BITS = 16;

                value: uint = 0..16,
            },
            register Ch0Lta {
                type Access = ReadOnly;
                const ADDRESS = 0x14;
                const SIZE_BITS = 16;

                value: uint = 0..16,
            },
            register Ch1FilteredCounts {
                type Access = ReadOnly;
                const ADDRESS = 0x15;
                const SIZE_BITS = 16;

                value: uint = 0..16,
            },
            register Ch1Lta {
                type Access = ReadOnly;
                const ADDRESS = 0x16;
                const SIZE_BITS = 16;

                value: uint = 0..16,
            },
            register Ch2FilteredCounts {
                type Access = ReadOnly;
                const ADDRESS = 0x17;
                const SIZE_BITS = 16;

                value: uint = 0..16,
            },
            register Ch2Lta {
                type Access = ReadOnly;
                const ADDRESS = 0x18;
                const SIZE_BITS = 16;

                value: uint = 0..16,
            },
        },
        #[cfg(not(feature = "movement-ui"))]
        block ReleaseUi {
            register Ch0ActivationLta {
                type Access = ReadOnly;
                const ADDRESS = 0x20;
                const SIZE_BITS = 16;
                const ALLOW_ADDRESS_OVERLAP = true;

                value: uint = 0..16,
            },
            register Ch1ActivationLta {
                type Access = ReadOnly;
                const ADDRESS = 0x21;
                const SIZE_BITS = 16;
                const ALLOW_ADDRESS_OVERLAP = true;

                value: uint = 0..16,
            },
            register Ch2ActivationLta {
                type Access = ReadOnly;
                const ADDRESS = 0x22;
                const SIZE_BITS = 16;
                const ALLOW_ADDRESS_OVERLAP = true;

                value: uint = 0..16,
            },
            register Ch0DeltaSnapshot {
                type Access = ReadOnly;
                const ADDRESS = 0x23;
                const SIZE_BITS = 16;
                const ALLOW_ADDRESS_OVERLAP = true;

                value: uint = 0..16,
            },
            register Ch1DeltaSnapshot {
                type Access = ReadOnly;
                const ADDRESS = 0x24;
                const SIZE_BITS = 16;
                const ALLOW_ADDRESS_OVERLAP = true;

                value: uint = 0..16,
            },
            register Ch2DeltaSnapshot {
                type Access = ReadOnly;
                const ADDRESS = 0x25;
                const SIZE_BITS = 16;
                const ALLOW_ADDRESS_OVERLAP = true;

                value: uint = 0..16,
            },
        },
        #[cfg(feature = "movement-ui")]
        block MovementUi {
            register Ch0MovementLta {
                type Access = ReadOnly;
                const ADDRESS = 0x20;
                const SIZE_BITS = 16;
                const ALLOW_ADDRESS_OVERLAP = true;

                value: uint = 0..16,
            },
            register Ch1MovementLta {
                type Access = ReadOnly;
                const ADDRESS = 0x21;
                const SIZE_BITS = 16;
                const ALLOW_ADDRESS_OVERLAP = true;

                value: uint = 0..16,
            },
            register Ch2MovementLta {
                type Access = ReadOnly;
                const ADDRESS = 0x22;
                const SIZE_BITS = 16;
                const ALLOW_ADDRESS_OVERLAP = true;

                value: uint = 0..16,
            },
            register MovementStatus {
                type Access = ReadOnly;
                const ADDRESS = 0x23;
                const SIZE_BITS = 16;
                const ALLOW_ADDRESS_OVERLAP = true;

                ch0_movement: bool = 0,
                ch1_movement: bool = 1,
                ch2_movement: bool = 2,
            },
        },
        block Sensor {
            const ADDRESS_OFFSET = 0x30;
            const REPEAT = { count: 3, stride: 0x10 };

            register SensorSetup {
                type Access = ReadWrite;
                const ADDRESS = 0x00;
                const SIZE_BITS = 16;

                cal_cap_rx_selected: bool = 14,
                cal_cap_tx_selected: bool = 13,
                txa_enabled: bool = 11,
                ctx2_enabled: bool = 10,
                ctx1_enabled: bool = 9,
                ctx0_enabled: bool = 8,
                ui_enabled: bool = 6,
                fosc_tx_freq_14mhz: bool = 5,
                vbias_on_cx2: bool = 4,
                invert_channel_logic: bool = 3,
                dual_direction_thresholds: bool = 2,
                linearise_counts: bool = 1,
                channel_enabled: bool = 0,
            },
            register ConversionFrequency {
                type Access = ReadWrite;
                const ADDRESS = 0x01;
                const SIZE_BITS = 16;
                const RESET_VALUE = 0x007f;

                period: uint = 8..16,
                frac: uint = 0..8,
            },
            register ProxControl {
                type Access = ReadWrite;
                const ADDRESS = 0x02;
                const SIZE_BITS = 16;

                discharge_0v5_enabled: bool = 14,
                /// Note: On hardware rev IQS3ed, the cs_size field is specified to be bits 11-12; however bit 11 is read-only so this still works.
                cs_size: uint as enum CsCapacitorSize {
                    Cs40pF,
                    Cs80pF = default,
                } = 12..13,
                sh_bias_Select: uint as enum SampleHoldBiasSelect {
                    Bias2uA,
                    Bias5uA,
                    Bias7uA,
                    Bias10uA = default,
                } = 8..10,
                max_counts: uint as enum MaxCounts {
                    Max1023,
                    Max2047,
                    Max4095,
                    Max16383 = default,
                } = 6..8,
                pxs_mode: uint as try enum PxsMode {
                    SelfCapacitance = 0x10,
                    MutualCapacitance = 0x13,
                    CurrentMeasurement = 0x1d,
                    Inductive = 0x3d,
                } = 0..6,
            },
            register ProxInput {
                type Access = ReadWrite;
                const ADDRESS = 0x03;
                const SIZE_BITS = 16;
                const RESET_VALUE = 0x0083;

                internal_reference_enabled: bool = 13,
                prox_engine_bias_current_enabled: bool = 12,
                calibration_capacitor_enabled: bool = 11,
                crx2_enabled: bool = 10,
                crx1_enabled: bool = 9,
                crx0_enabled: bool = 8,
                dead_time_enabled: bool = 6,
                auto_prox_cycle: uint as enum AutoProxCycleCount {
                    Cycles4 = default,
                    Cycles8,
                    Cycles16,
                    Cycles32,
                } = 2..4,
            },
            register PatternDefinitions {
                type Access = ReadWrite;
                const ADDRESS = 0x04;
                const SIZE_BITS = 16;

                wav_pattern_1: uint = 12..16,
                wav_pattern_0: uint = 8..12,
                calibration_cap: uint = 4..8,
                inactive_rxs: uint as try enum InactiveCxState {
                    Floating = 0x00,
                    BiasVolatage = 0x05,
                    Vss = 0x0a,
                    Vreg = 0x0f,
                } = 0..4,
            },
            register PatternSelectionAndEngineBiasCurrent {
                type Access = ReadWrite;
                const ADDRESS = 0x05;
                const SIZE_BITS = 16;

                engine_bias_current: int = 12..16,
                engine_bias_current_trim: int = 8..12,
                wav_pattern_select: uint = 0..8,
            },
            register AtiSetup {
                type Access = ReadWrite;
                const ADDRESS = 0x06;
                const SIZE_BITS = 16;

                resolution_factor: uint = 4..16,
                band: uint as enum AtiBand {
                    Small = default,
                    Large,
                } = 3..4,
                mode: uint as try enum AtiMode {
                    Disabled = default,
                    CompensationOnly,
                    FromCompensationDivider,
                    FromFineFractionalDivider,
                    Full = 4,
                } = 0..3,
            },
            register AtiBase {
                type Access = ReadWrite;
                const ADDRESS = 0x07;
                const SIZE_BITS = 16;

                value: uint = 0..16,
            },
            register AtiMultipliers {
                type Access = ReadWrite;
                const ADDRESS = 0x08;
                const SIZE_BITS = 16;

                fine_fractional_multiplier: uint = 14..16,
                fine_fractional_divider: uint = 9..14,
                coarse_fractional_multiplier: uint = 5..9,
                coarse_fractional_divider: uint = 0..5,
            },
            register Compensation {
                type Access = ReadWrite;
                const ADDRESS = 0x09;
                const SIZE_BITS = 16;

                divider: uint = 11..16,
                value: uint = 0..10,
            },
        },
        block Channel {
            const ADDRESS_OFFSET = 0x60;
            const REPEAT = { count: 3, stride: 0x10 };

            register ChannelSetup {
                type Access = ReadWrite;
                const ADDRESS = 0x00;
                const SIZE_BITS = 16;

                follower_event_mask: uint = 8..16,
                reference_sensor_id: uint = 4..8,
                channel_mode: uint as try enum ChannelMode {
                    Independent,
                    Follower,
                    Reference,
                } = 0..4,
            },
            register ProxSettings {
                type Access = ReadWrite;
                const ADDRESS = 0x01;
                const SIZE_BITS = 16;

                debounce_exit: uint = 12..16,
                debounce_enter: uint = 8..12,
                threshold: uint = 0..8,
            },
            register TouchSettings {
                type Access = ReadWrite;
                const ADDRESS = 0x02;
                const SIZE_BITS = 16;

                hysteresis: uint = 12..16,
                threshold: uint = 0..8,
            },
            register FollowerWeight {
                type Access = ReadWrite;
                const ADDRESS = 0x03;
                const SIZE_BITS = 16;

                value: uint = 0..16,
            },
            #[cfg(feature = "movement-ui")]
            register MovementUiSettings {
                type Access = ReadWrite;
                const ADDRESS = 0x04;
                const SIZE_BITS = 16;

                debounce_exit: uint = 12..16,
                debounce_enter: uint = 8..12,
                threshold: uint = 0..8,
            },
        },
        block SliderConfig {
            register SliderSetup {
                type Access = ReadWrite;
                const ADDRESS = 0x90;
                const SIZE_BITS = 16;

                lower_calibration_value: uint = 8..16,
                static_filter: uint as enum SliderStaticFilter {
                    Dynamic = default,
                    SlowStaticBeta,
                } = 6..7,
                slow_static_beta: uint = 3..6,
                total_channels: uint = 0..3,
            },
            register SliderBottomSpeed {
                type Access = ReadWrite;
                const ADDRESS = 0x91;
                const SIZE_BITS = 16;

                bottom_speed: uint = 8..16,
                upper_calibration_value: uint = 0..8,
            },
            register SliderTopSpeed {
                type Access = ReadWrite;
                const ADDRESS = 0x92;
                const SIZE_BITS = 16;

                value: uint = 0..16,
            },
            register SliderResolution {
                type Access = ReadWrite;
                const ADDRESS = 0x93;
                const SIZE_BITS = 16;

                value: uint = 0..16,
            },
            register SliderEnableMask {
                type Access = ReadWrite;
                const ADDRESS = 0x94;
                const SIZE_BITS = 16;

                ch2_enabled: bool = 2,
                ch1_enabled: bool = 1,
                ch0_enabled: bool = 0,
            },
            register DeltaLink0 {
                type Access = ReadWrite;
                const ADDRESS = 0x96;
                const SIZE_BITS = 16;

                value: uint as try DeltaLinkChannel = 0..16,
            },
            register DeltaLink1 {
                type Access = ReadWrite;
                const ADDRESS = 0x97;
                const SIZE_BITS = 16;

                value: uint as try DeltaLinkChannel = 0..16,
            },
            register DeltaLink2 {
                type Access = ReadWrite;
                const ADDRESS = 0x98;
                const SIZE_BITS = 16;

                value: uint as try DeltaLinkChannel = 0..16,
            },
            #[cfg(not(feature = "movement-ui"))]
            register SliderEnableStatusPointer {
                type Access = ReadWrite;
                const ADDRESS = 0x95;
                const SIZE_BITS = 16;
                const RESET_VALUE = 0x0558;
                const ALLOW_ADDRESS_OVERLAP = true;

                value: uint = 0..16,
            },
            #[cfg(feature = "movement-ui")]
            register SliderEnableStatusPointer {
                type Access = ReadWrite;
                const ADDRESS = 0x95;
                const SIZE_BITS = 16;
                const RESET_VALUE = 0x0552;
                const ALLOW_ADDRESS_OVERLAP = true;

                value: uint = 0..16,
            },
        },
        block GestureConfig {
            register GestureEnable {
                type Access = ReadWrite;
                const ADDRESS = 0xa0;
                const SIZE_BITS = 16;

                hold_enabled: bool = 3,
                flick_enabled: bool = 2,
                swipe_enabled: bool = 1,
                tap_enabled: bool = 0,
            },
            register MinimumGestureTime {
                type Access = ReadWrite;
                const ADDRESS = 0xa1;
                const SIZE_BITS = 16;

                ms: uint = 0..16,
            },
            register MaximumTapTime {
                type Access = ReadWrite;
                const ADDRESS = 0xa2;
                const SIZE_BITS = 16;

                ms: uint = 0..16,
            },
            register MaximumSwipeTime {
                type Access = ReadWrite;
                const ADDRESS = 0xa3;
                const SIZE_BITS = 16;

                ms: uint = 0..16,
            },
            register MinimumHoldTime {
                type Access = ReadWrite;
                const ADDRESS = 0xa4;
                const SIZE_BITS = 16;

                ms: uint = 0..16,
            },
            register MaximumTapDistance {
                type Access = ReadWrite;
                const ADDRESS = 0xa5;
                const SIZE_BITS = 16;

                value: uint = 0..16,
            },
            register MinimumSwipeDistance {
                type Access = ReadWrite;
                const ADDRESS = 0xa6;
                const SIZE_BITS = 16;

                value: uint = 0..16,
            },
        },
        block FilterBetas {
            register Counts {
                type Access = ReadWrite;
                const ADDRESS = 0xb0;
                const SIZE_BITS = 16;

                low_power: uint = 8..16,
                normal_power: uint = 0..8,
            },
            register Lta {
                type Access = ReadWrite;
                const ADDRESS = 0xb1;
                const SIZE_BITS = 16;

                low_power: uint = 8..16,
                normal_power: uint = 0..8,
            },
            register LtaFast {
                type Access = ReadWrite;
                const ADDRESS = 0xb2;
                const SIZE_BITS = 16;

                low_power: uint = 8..16,
                normal_power: uint = 0..8,
            },
            register FastFilterBand {
                type Access = ReadWrite;
                const ADDRESS = 0xb4;
                const SIZE_BITS = 16;

                value: uint = 0..16,
            },
            #[cfg(not(feature = "movement-ui"))]
            register ActivationLta {
                type Access = ReadWrite;
                const ADDRESS = 0xb3;
                const SIZE_BITS = 16;
                const ALLOW_ADDRESS_OVERLAP = true;

                low_power: uint = 8..16,
                normal_power: uint = 0..8,
            },
            #[cfg(feature = "movement-ui")]
            register MovementLta {
                type Access = ReadWrite;
                const ADDRESS = 0xb3;
                const SIZE_BITS = 16;
                const ALLOW_ADDRESS_OVERLAP = true;

                low_power: uint = 8..16,
                normal_power: uint = 0..8,
            },
        },
        block SysControl {
            register Control {
                type Access = ReadWrite;
                const ADDRESS = 0xc0;
                const SIZE_BITS = 16;

                ch2_timeout_disabled: bool = 10,
                ch1_timeout_disabled: bool = 9,
                ch0_timeout_disabled: bool = 8,
                interface: uint as enum InterfaceSelection {
                    I2cStreaming = default,
                    I2cEvents,
                } = 7..8,
                power_mode: uint as try enum PowerMode {
                    Normal,
                    Low,
                    UltraLow,
                    Halt,
                    Automatic,
                    AutomaticNoUlp,
                } = 4..7,
                trigger_reseed: bool = 3,
                trigger_ati: bool = 2,
                trigger_soft_reset: bool = 1,
                ack_reset: bool = 0,
            },
            register NormalPowerReportRate {
                type Access = ReadWrite;
                const ADDRESS = 0xc1;
                const SIZE_BITS = 16;

                ms: uint = 0..16,
            },
            register LowPowerReportRate {
                type Access = ReadWrite;
                const ADDRESS = 0xc2;
                const SIZE_BITS = 16;

                ms: uint = 0..16,
            },
            register UltraLowPowerReportRate {
                type Access = ReadWrite;
                const ADDRESS = 0xc3;
                const SIZE_BITS = 16;

                ms: uint = 0..16,
            },
            register HaltReportRate {
                type Access = ReadWrite;
                const ADDRESS = 0xc4;
                const SIZE_BITS = 16;

                ms: uint = 0..16,
            },
            register PowerModeTimeout {
                type Access = ReadWrite;
                const ADDRESS = 0xc5;
                const SIZE_BITS = 16;

                ms: uint = 0..16,
            },
        },
        block General {
            register OutAMask {
                type Access = ReadWrite;
                const ADDRESS = 0xd0;
                const SIZE_BITS = 16;

                value: uint = 0..16,
            },
            register TransactionTimeout {
                type Access = ReadWrite;
                const ADDRESS = 0xd1;
                const SIZE_BITS = 16;

                ms: uint = 0..16,
            },
            register EventTimeouts {
                type Access = ReadWrite;
                const ADDRESS = 0xd2;
                const SIZE_BITS = 16;

                touch: uint = 8..16,
                prox: uint = 0..8,
            },
            #[cfg(not(feature = "movement-ui"))]
            register EventsEnable {
                type Access = ReadWrite;
                const ADDRESS = 0xd3;
                const SIZE_BITS = 16;
                const ALLOW_ADDRESS_OVERLAP = true;

                activation_setting_threshold: uint = 8..16,
                ati_error: bool = 6,
                ati_event: bool = 4,
                power_event: bool = 3,
                slider_event: bool = 2,
                touch_event: bool = 1,
                prox_event: bool = 0,
            },
            #[cfg(feature = "movement-ui")]
            register EventsEnable {
                type Access = ReadWrite;
                const ADDRESS = 0xd3;
                const SIZE_BITS = 16;
                const ALLOW_ADDRESS_OVERLAP = true;

                ati_error: bool = 6,
                ati_event: bool = 4,
                power_event: bool = 3,
                slider_event: bool = 2,
                touch_event: bool = 1,
                prox_event: bool = 0,
            },
            #[cfg(not(feature = "movement-ui"))]
            register ReleaseUiSettings {
                type Access = ReadWrite;
                const ADDRESS = 0xd4;
                const SIZE_BITS = 16;
                const ALLOW_ADDRESS_OVERLAP = true;

                delta_snapshot_sample_delay: uint = 8..16,
                release_delta_percentage: uint = 0..8,
            },
            #[cfg(feature = "movement-ui")]
            register MovementTimeout {
                type Access = ReadWrite;
                const ADDRESS = 0xd4;
                const SIZE_BITS = 16;
                const ALLOW_ADDRESS_OVERLAP = true;

                value: uint = 0..16,
            },
        },
        block InterfaceSettings {
            register I2c {
                type Access = ReadWrite;
                const ADDRESS = 0xe0;
                const SIZE_BITS = 16;

                rw_check_disabled: bool = 1,
                stop_bit_disabled: bool = 0,
            },
            register HardwareId {
                type Access = ReadOnly;
                const ADDRESS = 0xe1;
                const SIZE_BITS = 16;

                value: uint = 0..16,
            },
        }
    }
);

cfg_if::cfg_if! {
    if #[cfg(feature = "movement-ui")] {
        #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, num_enum::IntoPrimitive, num_enum::TryFromPrimitive)]
        #[repr(u16)]
        pub enum DeltaLinkChannel {
            Disabled,
            Channel0 = 0x430,
            Channel1 = 0x474,
            Channel2 = 0x4b8,
        }
    } else {
        #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, num_enum::IntoPrimitive, num_enum::TryFromPrimitive)]
        #[repr(u16)]
        pub enum DeltaLinkChannel {
            Disabled,
            Channel0 = 0x430,
            Channel1 = 0x472,
            Channel2 = 0x4b4,
        }
    }
}