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
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
/* automatically generated by rust-bindgen 0.55.1 */

#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage, Align> {
    storage: Storage,
    align: [Align; 0],
}
impl<Storage, Align> __BindgenBitfieldUnit<Storage, Align> {
    #[inline]
    pub const fn new(storage: Storage) -> Self {
        Self { storage, align: [] }
    }
}
impl<Storage, Align> __BindgenBitfieldUnit<Storage, Align>
where
    Storage: AsRef<[u8]> + AsMut<[u8]>,
{
    #[inline]
    pub fn get_bit(&self, index: usize) -> bool {
        debug_assert!(index / 8 < self.storage.as_ref().len());
        let byte_index = index / 8;
        let byte = self.storage.as_ref()[byte_index];
        let bit_index = if cfg!(target_endian = "big") {
            7 - (index % 8)
        } else {
            index % 8
        };
        let mask = 1 << bit_index;
        byte & mask == mask
    }
    #[inline]
    pub fn set_bit(&mut self, index: usize, val: bool) {
        debug_assert!(index / 8 < self.storage.as_ref().len());
        let byte_index = index / 8;
        let byte = &mut self.storage.as_mut()[byte_index];
        let bit_index = if cfg!(target_endian = "big") {
            7 - (index % 8)
        } else {
            index % 8
        };
        let mask = 1 << bit_index;
        if val {
            *byte |= mask;
        } else {
            *byte &= !mask;
        }
    }
    #[inline]
    pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
        debug_assert!(bit_width <= 64);
        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
        debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
        let mut val = 0;
        for i in 0..(bit_width as usize) {
            if self.get_bit(i + bit_offset) {
                let index = if cfg!(target_endian = "big") {
                    bit_width as usize - 1 - i
                } else {
                    i
                };
                val |= 1 << index;
            }
        }
        val
    }
    #[inline]
    pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
        debug_assert!(bit_width <= 64);
        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
        debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
        for i in 0..(bit_width as usize) {
            let mask = 1 << i;
            let val_bit_is_set = val & mask == mask;
            let index = if cfg!(target_endian = "big") {
                bit_width as usize - 1 - i
            } else {
                i
            };
            self.set_bit(index + bit_offset, val_bit_is_set);
        }
    }
}
pub const EC_MAX_NUM_DEVICES: u32 = 1;
pub const EC_MAX_SYNC_MANAGERS: u32 = 16;
pub const EC_MAX_STRING_LENGTH: u32 = 64;
pub const EC_MAX_PORTS: u32 = 4;
pub const EC_MAX_SII_SIZE: u32 = 4096;
pub const EC_MAX_FMMUS: u32 = 16;
pub const EC_IOCTL_TYPE: u32 = 164;
pub const EC_IOCTL_VERSION_MAGIC: u32 = 30;
pub const EC_IOCTL_STRING_SIZE: u32 = 64;
pub const EC_MAX_SDO_DATA_SIZE: u32 = 1024;
pub const EC_MAX_IDN_DATA_SIZE: u32 = 1024;
pub type size_t = ::std::os::raw::c_ulong;
pub type __int8_t = ::std::os::raw::c_schar;
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __int16_t = ::std::os::raw::c_short;
pub type __uint16_t = ::std::os::raw::c_ushort;
pub type __int32_t = ::std::os::raw::c_int;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __uint64_t = ::std::os::raw::c_ulong;
#[doc = " Master state."]
#[doc = ""]
#[doc = " This is used for the output parameter of ecrt_master_state()."]
#[doc = ""]
#[doc = " \\see ecrt_master_state()."]
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ec_master_state_t {
    #[doc = "< Sum of responding slaves on all"]
    #[doc = "Ethernet devices."]
    pub slaves_responding: ::std::os::raw::c_uint,
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
    pub __bindgen_padding_0: [u8; 3usize],
}
impl ec_master_state_t {
    #[inline]
    pub fn al_states(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u32) }
    }
    #[inline]
    pub fn set_al_states(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(0usize, 4u8, val as u64)
        }
    }
    #[inline]
    pub fn link_up(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_link_up(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(4usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        al_states: ::std::os::raw::c_uint,
        link_up: ::std::os::raw::c_uint,
    ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 4u8, {
            let al_states: u32 = unsafe { ::std::mem::transmute(al_states) };
            al_states as u64
        });
        __bindgen_bitfield_unit.set(4usize, 1u8, {
            let link_up: u32 = unsafe { ::std::mem::transmute(link_up) };
            link_up as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = " Redundant link state."]
#[doc = ""]
#[doc = " This is used for the output parameter of ecrt_master_link_state()."]
#[doc = ""]
#[doc = " \\see ecrt_master_link_state()."]
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ec_master_link_state_t {
    #[doc = "< Sum of responding slaves on the given"]
    #[doc = "link."]
    pub slaves_responding: ::std::os::raw::c_uint,
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
    pub __bindgen_padding_0: [u8; 3usize],
}
impl ec_master_link_state_t {
    #[inline]
    pub fn al_states(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u32) }
    }
    #[inline]
    pub fn set_al_states(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(0usize, 4u8, val as u64)
        }
    }
    #[inline]
    pub fn link_up(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_link_up(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(4usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        al_states: ::std::os::raw::c_uint,
        link_up: ::std::os::raw::c_uint,
    ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 4u8, {
            let al_states: u32 = unsafe { ::std::mem::transmute(al_states) };
            al_states as u64
        });
        __bindgen_bitfield_unit.set(4usize, 1u8, {
            let link_up: u32 = unsafe { ::std::mem::transmute(link_up) };
            link_up as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = " Slave configuration state."]
#[doc = ""]
#[doc = " This is used as an output parameter of ecrt_slave_config_state()."]
#[doc = ""]
#[doc = " \\see ecrt_slave_config_state()."]
#[repr(C)]
#[repr(align(4))]
#[derive(Default, Copy, Clone)]
pub struct ec_slave_config_state_t {
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
    pub __bindgen_padding_0: [u8; 3usize],
}
impl ec_slave_config_state_t {
    #[inline]
    pub fn online(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_online(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn operational(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_operational(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(1usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn al_state(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 4u8) as u32) }
    }
    #[inline]
    pub fn set_al_state(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(2usize, 4u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        online: ::std::os::raw::c_uint,
        operational: ::std::os::raw::c_uint,
        al_state: ::std::os::raw::c_uint,
    ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let online: u32 = unsafe { ::std::mem::transmute(online) };
            online as u64
        });
        __bindgen_bitfield_unit.set(1usize, 1u8, {
            let operational: u32 = unsafe { ::std::mem::transmute(operational) };
            operational as u64
        });
        __bindgen_bitfield_unit.set(2usize, 4u8, {
            let al_state: u32 = unsafe { ::std::mem::transmute(al_state) };
            al_state as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "< Port is not implemented."]
pub const EC_PORT_NOT_IMPLEMENTED: ec_slave_port_desc_t = 0;
#[doc = "< Port is not configured."]
pub const EC_PORT_NOT_CONFIGURED: ec_slave_port_desc_t = 1;
#[doc = "< Port is an E-Bus."]
pub const EC_PORT_EBUS: ec_slave_port_desc_t = 2;
#[doc = "< Port is a MII."]
pub const EC_PORT_MII: ec_slave_port_desc_t = 3;
#[doc = " EtherCAT slave port descriptor."]
pub type ec_slave_port_desc_t = ::std::os::raw::c_uint;
#[doc = " EtherCAT slave port information."]
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ec_slave_port_link_t {
    #[doc = "< Link detected."]
    pub link_up: u8,
    #[doc = "< Loop closed."]
    pub loop_closed: u8,
    #[doc = "< Detected signal on RX port."]
    pub signal_detected: u8,
}
#[doc = "< No registered process data were exchanged."]
pub const EC_WC_ZERO: ec_wc_state_t = 0;
#[doc = "< Some of the registered process data were"]
#[doc = "exchanged."]
pub const EC_WC_INCOMPLETE: ec_wc_state_t = 1;
#[doc = "< All registered process data were exchanged."]
pub const EC_WC_COMPLETE: ec_wc_state_t = 2;
#[doc = " Domain working counter interpretation."]
#[doc = ""]
#[doc = " This is used in ec_domain_state_t."]
pub type ec_wc_state_t = ::std::os::raw::c_uint;
#[doc = " Domain state."]
#[doc = ""]
#[doc = " This is used for the output parameter of ecrt_domain_state()."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_domain_state_t {
    #[doc = "< Value of the last working counter."]
    pub working_counter: ::std::os::raw::c_uint,
    #[doc = "< Working counter interpretation."]
    pub wc_state: ec_wc_state_t,
    #[doc = "< Redundant link is in use."]
    pub redundancy_active: ::std::os::raw::c_uint,
}
impl Default for ec_domain_state_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[doc = "< Invalid direction. Do not use this value."]
pub const EC_DIR_INVALID: ec_direction_t = 0;
#[doc = "< Values written by the master."]
pub const EC_DIR_OUTPUT: ec_direction_t = 1;
#[doc = "< Values read by the master."]
pub const EC_DIR_INPUT: ec_direction_t = 2;
#[doc = "< Number of directions. For internal use only."]
pub const EC_DIR_COUNT: ec_direction_t = 3;
#[doc = " Direction type for PDO assignment functions."]
pub type ec_direction_t = ::std::os::raw::c_uint;
#[doc = "< Use the default setting of the sync manager."]
pub const EC_WD_DEFAULT: ec_watchdog_mode_t = 0;
#[doc = "< Enable the watchdog."]
pub const EC_WD_ENABLE: ec_watchdog_mode_t = 1;
#[doc = "< Disable the watchdog."]
pub const EC_WD_DISABLE: ec_watchdog_mode_t = 2;
#[doc = " Watchdog mode for sync manager configuration."]
#[doc = ""]
#[doc = " Used to specify, if a sync manager's watchdog is to be enabled."]
pub type ec_watchdog_mode_t = ::std::os::raw::c_uint;
#[doc = "< Not requested."]
pub const EC_REQUEST_UNUSED: ec_request_state_t = 0;
#[doc = "< Request is being processed."]
pub const EC_REQUEST_BUSY: ec_request_state_t = 1;
#[doc = "< Request was processed successfully."]
pub const EC_REQUEST_SUCCESS: ec_request_state_t = 2;
#[doc = "< Request processing failed."]
pub const EC_REQUEST_ERROR: ec_request_state_t = 3;
#[doc = " Request state."]
#[doc = ""]
#[doc = " This is used as return type for ecrt_sdo_request_state() and"]
#[doc = " ecrt_voe_handler_state()."]
pub type ec_request_state_t = ::std::os::raw::c_uint;
#[doc = "< Init."]
pub const EC_AL_STATE_INIT: ec_al_state_t = 1;
#[doc = "< Pre-operational."]
pub const EC_AL_STATE_PREOP: ec_al_state_t = 2;
#[doc = "< Safe-operational."]
pub const EC_AL_STATE_SAFEOP: ec_al_state_t = 4;
#[doc = "< Operational."]
pub const EC_AL_STATE_OP: ec_al_state_t = 8;
#[doc = " Application-layer state."]
pub type ec_al_state_t = ::std::os::raw::c_uint;
#[doc = " Slave information interface CANopen over EtherCAT details flags."]
#[repr(C, packed)]
#[derive(Default, Copy, Clone)]
pub struct ec_sii_coe_details_t {
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
}
impl ec_sii_coe_details_t {
    #[inline]
    pub fn enable_sdo(&self) -> u8 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_enable_sdo(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::std::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn enable_sdo_info(&self) -> u8 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_enable_sdo_info(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::std::mem::transmute(val);
            self._bitfield_1.set(1usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn enable_pdo_assign(&self) -> u8 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_enable_pdo_assign(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::std::mem::transmute(val);
            self._bitfield_1.set(2usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn enable_pdo_configuration(&self) -> u8 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_enable_pdo_configuration(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::std::mem::transmute(val);
            self._bitfield_1.set(3usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn enable_upload_at_startup(&self) -> u8 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_enable_upload_at_startup(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::std::mem::transmute(val);
            self._bitfield_1.set(4usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn enable_sdo_complete_access(&self) -> u8 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_enable_sdo_complete_access(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::std::mem::transmute(val);
            self._bitfield_1.set(5usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        enable_sdo: u8,
        enable_sdo_info: u8,
        enable_pdo_assign: u8,
        enable_pdo_configuration: u8,
        enable_upload_at_startup: u8,
        enable_sdo_complete_access: u8,
    ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let enable_sdo: u8 = unsafe { ::std::mem::transmute(enable_sdo) };
            enable_sdo as u64
        });
        __bindgen_bitfield_unit.set(1usize, 1u8, {
            let enable_sdo_info: u8 = unsafe { ::std::mem::transmute(enable_sdo_info) };
            enable_sdo_info as u64
        });
        __bindgen_bitfield_unit.set(2usize, 1u8, {
            let enable_pdo_assign: u8 = unsafe { ::std::mem::transmute(enable_pdo_assign) };
            enable_pdo_assign as u64
        });
        __bindgen_bitfield_unit.set(3usize, 1u8, {
            let enable_pdo_configuration: u8 =
                unsafe { ::std::mem::transmute(enable_pdo_configuration) };
            enable_pdo_configuration as u64
        });
        __bindgen_bitfield_unit.set(4usize, 1u8, {
            let enable_upload_at_startup: u8 =
                unsafe { ::std::mem::transmute(enable_upload_at_startup) };
            enable_upload_at_startup as u64
        });
        __bindgen_bitfield_unit.set(5usize, 1u8, {
            let enable_sdo_complete_access: u8 =
                unsafe { ::std::mem::transmute(enable_sdo_complete_access) };
            enable_sdo_complete_access as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = " Slave information interface general flags."]
#[repr(C, packed)]
#[derive(Default, Copy, Clone)]
pub struct ec_sii_general_flags_t {
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
}
impl ec_sii_general_flags_t {
    #[inline]
    pub fn enable_safeop(&self) -> u8 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_enable_safeop(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::std::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn enable_not_lrw(&self) -> u8 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_enable_not_lrw(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::std::mem::transmute(val);
            self._bitfield_1.set(1usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        enable_safeop: u8,
        enable_not_lrw: u8,
    ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let enable_safeop: u8 = unsafe { ::std::mem::transmute(enable_safeop) };
            enable_safeop as u64
        });
        __bindgen_bitfield_unit.set(1usize, 1u8, {
            let enable_not_lrw: u8 = unsafe { ::std::mem::transmute(enable_not_lrw) };
            enable_not_lrw as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "< 32 bit."]
pub const EC_DC_32: ec_slave_dc_range_t = 0;
pub const EC_DC_64: ec_slave_dc_range_t = 1;
#[doc = " EtherCAT slave distributed clocks range."]
pub type ec_slave_dc_range_t = ::std::os::raw::c_uint;
#[doc = " EtherCAT slave sync signal configuration."]
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ec_sync_signal_t {
    #[doc = "< Cycle time [ns]."]
    pub cycle_time: u32,
    #[doc = "< Shift time [ns]."]
    pub shift_time: i32,
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ec_ioctl_module_t {
    pub ioctl_version_magic: u32,
    pub master_count: u32,
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ec_ioctl_master_t {
    pub slave_count: u32,
    pub config_count: u32,
    pub domain_count: u32,
    pub eoe_handler_count: u32,
    pub phase: u8,
    pub active: u8,
    pub scan_busy: u8,
    pub devices: [ec_ioctl_master_t_ec_ioctl_device; 1usize],
    pub num_devices: u32,
    pub tx_count: u64,
    pub rx_count: u64,
    pub tx_bytes: u64,
    pub rx_bytes: u64,
    pub tx_frame_rates: [i32; 3usize],
    pub rx_frame_rates: [i32; 3usize],
    pub tx_byte_rates: [i32; 3usize],
    pub rx_byte_rates: [i32; 3usize],
    pub loss_rates: [i32; 3usize],
    pub app_time: u64,
    pub dc_ref_time: u64,
    pub ref_clock: u16,
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ec_ioctl_master_t_ec_ioctl_device {
    pub address: [u8; 6usize],
    pub attached: u8,
    pub link_state: u8,
    pub tx_count: u64,
    pub rx_count: u64,
    pub tx_bytes: u64,
    pub rx_bytes: u64,
    pub tx_errors: u64,
    pub tx_frame_rates: [i32; 3usize],
    pub rx_frame_rates: [i32; 3usize],
    pub tx_byte_rates: [i32; 3usize],
    pub rx_byte_rates: [i32; 3usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_slave_t {
    pub position: u16,
    pub device_index: ::std::os::raw::c_uint,
    pub vendor_id: u32,
    pub product_code: u32,
    pub revision_number: u32,
    pub serial_number: u32,
    pub alias: u16,
    pub boot_rx_mailbox_offset: u16,
    pub boot_rx_mailbox_size: u16,
    pub boot_tx_mailbox_offset: u16,
    pub boot_tx_mailbox_size: u16,
    pub std_rx_mailbox_offset: u16,
    pub std_rx_mailbox_size: u16,
    pub std_tx_mailbox_offset: u16,
    pub std_tx_mailbox_size: u16,
    pub mailbox_protocols: u16,
    pub has_general_category: u8,
    pub coe_details: ec_sii_coe_details_t,
    pub general_flags: ec_sii_general_flags_t,
    pub current_on_ebus: i16,
    pub ports: [ec_ioctl_slave_t__bindgen_ty_1; 4usize],
    pub fmmu_bit: u8,
    pub dc_supported: u8,
    pub dc_range: ec_slave_dc_range_t,
    pub has_dc_system_time: u8,
    pub transmission_delay: u32,
    pub al_state: u8,
    pub error_flag: u8,
    pub sync_count: u8,
    pub sdo_count: u16,
    pub sii_nwords: u32,
    pub group: [::std::os::raw::c_char; 64usize],
    pub image: [::std::os::raw::c_char; 64usize],
    pub order: [::std::os::raw::c_char; 64usize],
    pub name: [::std::os::raw::c_char; 64usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_slave_t__bindgen_ty_1 {
    pub desc: ec_slave_port_desc_t,
    pub link: ec_slave_port_link_t,
    pub receive_time: u32,
    pub next_slave: u16,
    pub delay_to_next_dc: u32,
}
impl Default for ec_ioctl_slave_t__bindgen_ty_1 {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
impl Default for ec_ioctl_slave_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ec_ioctl_slave_sync_t {
    pub slave_position: u16,
    pub sync_index: u32,
    pub physical_start_address: u16,
    pub default_size: u16,
    pub control_register: u8,
    pub enable: u8,
    pub pdo_count: u8,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_slave_sync_pdo_t {
    pub slave_position: u16,
    pub sync_index: u32,
    pub pdo_pos: u32,
    pub index: u16,
    pub entry_count: u8,
    pub name: [i8; 64usize],
}
impl Default for ec_ioctl_slave_sync_pdo_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_slave_sync_pdo_entry_t {
    pub slave_position: u16,
    pub sync_index: u32,
    pub pdo_pos: u32,
    pub entry_pos: u32,
    pub index: u16,
    pub subindex: u8,
    pub bit_length: u8,
    pub name: [i8; 64usize],
}
impl Default for ec_ioctl_slave_sync_pdo_entry_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ec_ioctl_domain_t {
    pub index: u32,
    pub data_size: u32,
    pub logical_base_address: u32,
    pub working_counter: [u16; 1usize],
    pub expected_working_counter: u16,
    pub fmmu_count: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_domain_fmmu_t {
    pub domain_index: u32,
    pub fmmu_index: u32,
    pub slave_config_alias: u16,
    pub slave_config_position: u16,
    pub sync_index: u8,
    pub dir: ec_direction_t,
    pub logical_address: u32,
    pub data_size: u32,
}
impl Default for ec_ioctl_domain_fmmu_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_domain_data_t {
    pub domain_index: u32,
    pub data_size: u32,
    pub target: *mut u8,
}
impl Default for ec_ioctl_domain_data_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ec_ioctl_slave_state_t {
    pub slave_position: u16,
    pub al_state: u8,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_slave_sdo_t {
    pub slave_position: u16,
    pub sdo_position: u16,
    pub sdo_index: u16,
    pub max_subindex: u8,
    pub name: [i8; 64usize],
}
impl Default for ec_ioctl_slave_sdo_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_slave_sdo_entry_t {
    pub slave_position: u16,
    pub sdo_spec: ::std::os::raw::c_int,
    pub sdo_entry_subindex: u8,
    pub data_type: u16,
    pub bit_length: u16,
    pub read_access: [u8; 3usize],
    pub write_access: [u8; 3usize],
    pub description: [i8; 64usize],
}
impl Default for ec_ioctl_slave_sdo_entry_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_slave_sdo_upload_t {
    pub slave_position: u16,
    pub sdo_index: u16,
    pub sdo_entry_subindex: u8,
    pub target_size: size_t,
    pub target: *mut u8,
    pub data_size: size_t,
    pub abort_code: u32,
}
impl Default for ec_ioctl_slave_sdo_upload_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_slave_sdo_download_t {
    pub slave_position: u16,
    pub sdo_index: u16,
    pub sdo_entry_subindex: u8,
    pub complete_access: u8,
    pub data_size: size_t,
    pub data: *mut u8,
    pub abort_code: u32,
}
impl Default for ec_ioctl_slave_sdo_download_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_slave_sii_t {
    pub slave_position: u16,
    pub offset: u16,
    pub nwords: u32,
    pub words: *mut u16,
}
impl Default for ec_ioctl_slave_sii_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_slave_reg_t {
    pub slave_position: u16,
    pub emergency: u8,
    pub address: u16,
    pub size: size_t,
    pub data: *mut u8,
}
impl Default for ec_ioctl_slave_reg_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_slave_foe_t {
    pub slave_position: u16,
    pub offset: u16,
    pub buffer_size: size_t,
    pub buffer: *mut u8,
    pub data_size: size_t,
    pub result: u32,
    pub error_code: u32,
    pub file_name: [::std::os::raw::c_char; 32usize],
}
impl Default for ec_ioctl_slave_foe_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_slave_soe_read_t {
    pub slave_position: u16,
    pub drive_no: u8,
    pub idn: u16,
    pub mem_size: size_t,
    pub data: *mut u8,
    pub data_size: size_t,
    pub error_code: u16,
}
impl Default for ec_ioctl_slave_soe_read_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_slave_soe_write_t {
    pub slave_position: u16,
    pub drive_no: u8,
    pub idn: u16,
    pub data_size: size_t,
    pub data: *mut u8,
    pub error_code: u16,
}
impl Default for ec_ioctl_slave_soe_write_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_config_t {
    pub config_index: u32,
    pub alias: u16,
    pub position: u16,
    pub vendor_id: u32,
    pub product_code: u32,
    pub syncs: [ec_ioctl_config_t__bindgen_ty_1; 16usize],
    pub watchdog_divider: u16,
    pub watchdog_intervals: u16,
    pub sdo_count: u32,
    pub idn_count: u32,
    pub slave_position: i32,
    pub dc_assign_activate: u16,
    pub dc_sync: [ec_sync_signal_t; 2usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_config_t__bindgen_ty_1 {
    pub dir: ec_direction_t,
    pub watchdog_mode: ec_watchdog_mode_t,
    pub pdo_count: u32,
    pub config_this: u8,
}
impl Default for ec_ioctl_config_t__bindgen_ty_1 {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
impl Default for ec_ioctl_config_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_config_pdo_t {
    pub config_index: u32,
    pub sync_index: u8,
    pub pdo_pos: u16,
    pub index: u16,
    pub entry_count: u8,
    pub name: [i8; 64usize],
}
impl Default for ec_ioctl_config_pdo_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_config_pdo_entry_t {
    pub config_index: u32,
    pub sync_index: u8,
    pub pdo_pos: u16,
    pub entry_pos: u8,
    pub index: u16,
    pub subindex: u8,
    pub bit_length: u8,
    pub name: [i8; 64usize],
}
impl Default for ec_ioctl_config_pdo_entry_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_config_sdo_t {
    pub config_index: u32,
    pub sdo_pos: u32,
    pub index: u16,
    pub subindex: u8,
    pub size: size_t,
    pub data: [u8; 1024usize],
    pub complete_access: u8,
}
impl Default for ec_ioctl_config_sdo_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_config_idn_t {
    pub config_index: u32,
    pub idn_pos: u32,
    pub drive_no: u8,
    pub idn: u16,
    pub state: ec_al_state_t,
    pub size: size_t,
    pub data: [u8; 1024usize],
}
impl Default for ec_ioctl_config_idn_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ec_ioctl_eoe_handler_t {
    pub eoe_index: u16,
    pub name: [::std::os::raw::c_char; 20usize],
    pub slave_position: u16,
    pub open: u8,
    pub rx_bytes: u32,
    pub rx_rate: u32,
    pub tx_bytes: u32,
    pub tx_rate: u32,
    pub tx_queued_frames: u32,
    pub tx_queue_size: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_master_activate_t {
    pub process_data: *mut ::std::os::raw::c_void,
    pub process_data_size: size_t,
}
impl Default for ec_ioctl_master_activate_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ec_ioctl_add_pdo_entry_t {
    pub config_index: u32,
    pub pdo_index: u16,
    pub entry_index: u16,
    pub entry_subindex: u8,
    pub entry_bit_length: u8,
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ec_ioctl_reg_pdo_entry_t {
    pub config_index: u32,
    pub entry_index: u16,
    pub entry_subindex: u8,
    pub domain_index: u32,
    pub bit_position: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ec_ioctl_reg_pdo_pos_t {
    pub config_index: u32,
    pub sync_index: u32,
    pub pdo_pos: u32,
    pub entry_pos: u32,
    pub domain_index: u32,
    pub bit_position: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_sc_sdo_t {
    pub config_index: u32,
    pub index: u16,
    pub subindex: u8,
    pub data: *const u8,
    pub size: size_t,
    pub complete_access: u8,
}
impl Default for ec_ioctl_sc_sdo_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_sc_emerg_t {
    pub config_index: u32,
    pub size: size_t,
    pub target: *mut u8,
    pub overruns: i32,
}
impl Default for ec_ioctl_sc_emerg_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_sc_state_t {
    pub config_index: u32,
    pub state: *mut ec_slave_config_state_t,
}
impl Default for ec_ioctl_sc_state_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_sc_idn_t {
    pub config_index: u32,
    pub drive_no: u8,
    pub idn: u16,
    pub al_state: ec_al_state_t,
    pub data: *const u8,
    pub size: size_t,
}
impl Default for ec_ioctl_sc_idn_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_domain_state_t {
    pub domain_index: u32,
    pub state: *mut ec_domain_state_t,
}
impl Default for ec_ioctl_domain_state_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_sdo_request_t {
    pub config_index: u32,
    pub request_index: u32,
    pub sdo_index: u16,
    pub sdo_subindex: u8,
    pub size: size_t,
    pub data: *mut u8,
    pub timeout: u32,
    pub state: ec_request_state_t,
}
impl Default for ec_ioctl_sdo_request_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_reg_request_t {
    pub config_index: u32,
    pub mem_size: size_t,
    pub request_index: u32,
    pub data: *mut u8,
    pub state: ec_request_state_t,
    pub new_data: u8,
    pub address: u16,
    pub transfer_size: size_t,
}
impl Default for ec_ioctl_reg_request_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_voe_t {
    pub config_index: u32,
    pub voe_index: u32,
    pub vendor_id: *mut u32,
    pub vendor_type: *mut u16,
    pub size: size_t,
    pub data: *mut u8,
    pub state: ec_request_state_t,
}
impl Default for ec_ioctl_voe_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ioctl_link_state_t {
    pub dev_idx: u32,
    pub state: *mut ec_master_link_state_t,
}
impl Default for ec_ioctl_link_state_t {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}