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
/* automatically generated by rust-bindgen */

pub const _STDINT_H: ::std::os::raw::c_uint = 1;
pub const _FEATURES_H: ::std::os::raw::c_uint = 1;
pub const _DEFAULT_SOURCE: ::std::os::raw::c_uint = 1;
pub const _BSD_SOURCE: ::std::os::raw::c_uint = 1;
pub const _SVID_SOURCE: ::std::os::raw::c_uint = 1;
pub const __USE_ISOC11: ::std::os::raw::c_uint = 1;
pub const __USE_ISOC99: ::std::os::raw::c_uint = 1;
pub const __USE_ISOC95: ::std::os::raw::c_uint = 1;
pub const __USE_POSIX_IMPLICITLY: ::std::os::raw::c_uint = 1;
pub const _POSIX_SOURCE: ::std::os::raw::c_uint = 1;
pub const _POSIX_C_SOURCE: ::std::os::raw::c_uint = 200809;
pub const __USE_POSIX: ::std::os::raw::c_uint = 1;
pub const __USE_POSIX2: ::std::os::raw::c_uint = 1;
pub const __USE_POSIX199309: ::std::os::raw::c_uint = 1;
pub const __USE_POSIX199506: ::std::os::raw::c_uint = 1;
pub const __USE_XOPEN2K: ::std::os::raw::c_uint = 1;
pub const __USE_XOPEN2K8: ::std::os::raw::c_uint = 1;
pub const _ATFILE_SOURCE: ::std::os::raw::c_uint = 1;
pub const __USE_MISC: ::std::os::raw::c_uint = 1;
pub const __USE_BSD: ::std::os::raw::c_uint = 1;
pub const __USE_SVID: ::std::os::raw::c_uint = 1;
pub const __USE_ATFILE: ::std::os::raw::c_uint = 1;
pub const __USE_FORTIFY_LEVEL: ::std::os::raw::c_uint = 0;
pub const _STDC_PREDEF_H: ::std::os::raw::c_uint = 1;
pub const __STDC_IEC_559__: ::std::os::raw::c_uint = 1;
pub const __STDC_IEC_559_COMPLEX__: ::std::os::raw::c_uint = 1;
pub const __STDC_ISO_10646__: ::std::os::raw::c_uint = 201103;
pub const __STDC_NO_THREADS__: ::std::os::raw::c_uint = 1;
pub const __GNU_LIBRARY__: ::std::os::raw::c_uint = 6;
pub const __GLIBC__: ::std::os::raw::c_uint = 2;
pub const __GLIBC_MINOR__: ::std::os::raw::c_uint = 19;
pub const _SYS_CDEFS_H: ::std::os::raw::c_uint = 1;
pub const __WORDSIZE: ::std::os::raw::c_uint = 64;
pub const __WORDSIZE_TIME64_COMPAT32: ::std::os::raw::c_uint = 1;
pub const __SYSCALL_WORDSIZE: ::std::os::raw::c_uint = 64;
pub const _BITS_WCHAR_H: ::std::os::raw::c_uint = 1;
pub const INT8_MIN: ::std::os::raw::c_int = -128;
pub const INT16_MIN: ::std::os::raw::c_int = -32768;
pub const INT32_MIN: ::std::os::raw::c_int = -2147483648;
pub const INT8_MAX: ::std::os::raw::c_uint = 127;
pub const INT16_MAX: ::std::os::raw::c_uint = 32767;
pub const INT32_MAX: ::std::os::raw::c_uint = 2147483647;
pub const UINT8_MAX: ::std::os::raw::c_uint = 255;
pub const UINT16_MAX: ::std::os::raw::c_uint = 65535;
pub const UINT32_MAX: ::std::os::raw::c_uint = 4294967295;
pub const INT_LEAST8_MIN: ::std::os::raw::c_int = -128;
pub const INT_LEAST16_MIN: ::std::os::raw::c_int = -32768;
pub const INT_LEAST32_MIN: ::std::os::raw::c_int = -2147483648;
pub const INT_LEAST8_MAX: ::std::os::raw::c_uint = 127;
pub const INT_LEAST16_MAX: ::std::os::raw::c_uint = 32767;
pub const INT_LEAST32_MAX: ::std::os::raw::c_uint = 2147483647;
pub const UINT_LEAST8_MAX: ::std::os::raw::c_uint = 255;
pub const UINT_LEAST16_MAX: ::std::os::raw::c_uint = 65535;
pub const UINT_LEAST32_MAX: ::std::os::raw::c_uint = 4294967295;
pub const INT_FAST8_MIN: ::std::os::raw::c_int = -128;
pub const INT_FAST16_MIN: ::std::os::raw::c_longlong = -9223372036854775808;
pub const INT_FAST32_MIN: ::std::os::raw::c_longlong = -9223372036854775808;
pub const INT_FAST8_MAX: ::std::os::raw::c_uint = 127;
pub const INT_FAST16_MAX: ::std::os::raw::c_ulonglong = 9223372036854775807;
pub const INT_FAST32_MAX: ::std::os::raw::c_ulonglong = 9223372036854775807;
pub const UINT_FAST8_MAX: ::std::os::raw::c_uint = 255;
pub const UINT_FAST16_MAX: ::std::os::raw::c_int = -1;
pub const UINT_FAST32_MAX: ::std::os::raw::c_int = -1;
pub const INTPTR_MIN: ::std::os::raw::c_longlong = -9223372036854775808;
pub const INTPTR_MAX: ::std::os::raw::c_ulonglong = 9223372036854775807;
pub const UINTPTR_MAX: ::std::os::raw::c_int = -1;
pub const PTRDIFF_MIN: ::std::os::raw::c_longlong = -9223372036854775808;
pub const PTRDIFF_MAX: ::std::os::raw::c_ulonglong = 9223372036854775807;
pub const SIG_ATOMIC_MIN: ::std::os::raw::c_int = -2147483648;
pub const SIG_ATOMIC_MAX: ::std::os::raw::c_uint = 2147483647;
pub const SIZE_MAX: ::std::os::raw::c_int = -1;
pub const WINT_MIN: ::std::os::raw::c_uint = 0;
pub const WINT_MAX: ::std::os::raw::c_uint = 4294967295;
pub const true_: ::std::os::raw::c_uint = 1;
pub const false_: ::std::os::raw::c_uint = 0;
pub const __bool_true_false_are_defined: ::std::os::raw::c_uint = 1;
pub const ADC_BUFFER_SIZE: ::std::os::raw::c_uint = 16384;
pub const RP_OK: ::std::os::raw::c_uint = 0;
pub const RP_EOED: ::std::os::raw::c_uint = 1;
pub const RP_EOMD: ::std::os::raw::c_uint = 2;
pub const RP_ECMD: ::std::os::raw::c_uint = 3;
pub const RP_EMMD: ::std::os::raw::c_uint = 4;
pub const RP_EUMD: ::std::os::raw::c_uint = 5;
pub const RP_EOOR: ::std::os::raw::c_uint = 6;
pub const RP_ELID: ::std::os::raw::c_uint = 7;
pub const RP_EMRO: ::std::os::raw::c_uint = 8;
pub const RP_EWIP: ::std::os::raw::c_uint = 9;
pub const RP_EPN: ::std::os::raw::c_uint = 10;
pub const RP_UIA: ::std::os::raw::c_uint = 11;
pub const RP_FCA: ::std::os::raw::c_uint = 12;
pub const RP_RCA: ::std::os::raw::c_uint = 13;
pub const RP_BTS: ::std::os::raw::c_uint = 14;
pub const RP_EIPV: ::std::os::raw::c_uint = 15;
pub const RP_EUF: ::std::os::raw::c_uint = 16;
pub const RP_ENN: ::std::os::raw::c_uint = 17;
pub const RP_EFOB: ::std::os::raw::c_uint = 18;
pub const RP_EFCB: ::std::os::raw::c_uint = 19;
pub const RP_EABA: ::std::os::raw::c_uint = 20;
pub const RP_EFRB: ::std::os::raw::c_uint = 21;
pub const RP_EFWB: ::std::os::raw::c_uint = 22;
pub const RP_EMNC: ::std::os::raw::c_uint = 23;
pub const SPECTR_OUT_SIG_LEN: ::std::os::raw::c_uint = 2048;
pub type int_least8_t = ::std::os::raw::c_schar;
pub type int_least16_t = ::std::os::raw::c_short;
pub type int_least32_t = ::std::os::raw::c_int;
pub type int_least64_t = ::std::os::raw::c_long;
pub type uint_least8_t = ::std::os::raw::c_uchar;
pub type uint_least16_t = ::std::os::raw::c_ushort;
pub type uint_least32_t = ::std::os::raw::c_uint;
pub type uint_least64_t = ::std::os::raw::c_ulong;
pub type int_fast8_t = ::std::os::raw::c_schar;
pub type int_fast16_t = ::std::os::raw::c_long;
pub type int_fast32_t = ::std::os::raw::c_long;
pub type int_fast64_t = ::std::os::raw::c_long;
pub type uint_fast8_t = ::std::os::raw::c_uchar;
pub type uint_fast16_t = ::std::os::raw::c_ulong;
pub type uint_fast32_t = ::std::os::raw::c_ulong;
pub type uint_fast64_t = ::std::os::raw::c_ulong;
pub type intmax_t = ::std::os::raw::c_long;
pub type uintmax_t = ::std::os::raw::c_ulong;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rp_dpin_t {
    RP_LED0 = 0,
    RP_LED1 = 1,
    RP_LED2 = 2,
    RP_LED3 = 3,
    RP_LED4 = 4,
    RP_LED5 = 5,
    RP_LED6 = 6,
    RP_LED7 = 7,
    RP_DIO0_P = 8,
    RP_DIO1_P = 9,
    RP_DIO2_P = 10,
    RP_DIO3_P = 11,
    RP_DIO4_P = 12,
    RP_DIO5_P = 13,
    RP_DIO6_P = 14,
    RP_DIO7_P = 15,
    RP_DIO0_N = 16,
    RP_DIO1_N = 17,
    RP_DIO2_N = 18,
    RP_DIO3_N = 19,
    RP_DIO4_N = 20,
    RP_DIO5_N = 21,
    RP_DIO6_N = 22,
    RP_DIO7_N = 23,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rp_pinState_t { RP_LOW = 0, RP_HIGH = 1, }
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rp_pinDirection_t { RP_IN = 0, RP_OUT = 1, }
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rp_apin_t {
    RP_AOUT0 = 0,
    RP_AOUT1 = 1,
    RP_AOUT2 = 2,
    RP_AOUT3 = 3,
    RP_AIN0 = 4,
    RP_AIN1 = 5,
    RP_AIN2 = 6,
    RP_AIN3 = 7,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rp_waveform_t {
    RP_WAVEFORM_SINE = 0,
    RP_WAVEFORM_SQUARE = 1,
    RP_WAVEFORM_TRIANGLE = 2,
    RP_WAVEFORM_RAMP_UP = 3,
    RP_WAVEFORM_RAMP_DOWN = 4,
    RP_WAVEFORM_DC = 5,
    RP_WAVEFORM_PWM = 6,
    RP_WAVEFORM_ARBITRARY = 7,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rp_gen_mode_t {
    RP_GEN_MODE_CONTINUOUS = 0,
    RP_GEN_MODE_BURST = 1,
    RP_GEN_MODE_STREAM = 2,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rp_trig_src_t {
    RP_GEN_TRIG_SRC_INTERNAL = 1,
    RP_GEN_TRIG_SRC_EXT_PE = 2,
    RP_GEN_TRIG_SRC_EXT_NE = 3,
    RP_GEN_TRIG_GATED_BURST = 4,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rp_channel_t { RP_CH_1 = 0, RP_CH_2 = 1, }
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rp_acq_sampling_rate_t {
    RP_SMP_125M = 0,
    RP_SMP_15_625M = 1,
    RP_SMP_1_953M = 2,
    RP_SMP_122_070K = 3,
    RP_SMP_15_258K = 4,
    RP_SMP_1_907K = 5,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rp_acq_decimation_t {
    RP_DEC_1 = 0,
    RP_DEC_8 = 1,
    RP_DEC_64 = 2,
    RP_DEC_1024 = 3,
    RP_DEC_8192 = 4,
    RP_DEC_65536 = 5,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rp_acq_trig_src_t {
    RP_TRIG_SRC_DISABLED = 0,
    RP_TRIG_SRC_NOW = 1,
    RP_TRIG_SRC_CHA_PE = 2,
    RP_TRIG_SRC_CHA_NE = 3,
    RP_TRIG_SRC_CHB_PE = 4,
    RP_TRIG_SRC_CHB_NE = 5,
    RP_TRIG_SRC_EXT_PE = 6,
    RP_TRIG_SRC_EXT_NE = 7,
    RP_TRIG_SRC_AWG_PE = 8,
    RP_TRIG_SRC_AWG_NE = 9,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum rp_acq_trig_state_t {
    RP_TRIG_STATE_TRIGGERED = 0,
    RP_TRIG_STATE_WAITING = 1,
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct rp_calib_params_t {
    pub fe_ch1_fs_g_hi: u32,
    pub fe_ch2_fs_g_hi: u32,
    pub fe_ch1_fs_g_lo: u32,
    pub fe_ch2_fs_g_lo: u32,
    pub fe_ch1_lo_offs: i32,
    pub fe_ch2_lo_offs: i32,
    pub be_ch1_fs: u32,
    pub be_ch2_fs: u32,
    pub be_ch1_dc_offs: i32,
    pub be_ch2_dc_offs: i32,
    pub magic: u32,
    pub fe_ch1_hi_offs: i32,
    pub fe_ch2_hi_offs: i32,
}
#[test]
fn bindgen_test_layout_rp_calib_params_t() {
    assert_eq!(::std::mem::size_of::<rp_calib_params_t>() , 52usize , concat !
               ( "Size of: " , stringify ! ( rp_calib_params_t ) ));
    assert_eq! (::std::mem::align_of::<rp_calib_params_t>() , 4usize , concat
                ! ( "Alignment of " , stringify ! ( rp_calib_params_t ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const rp_calib_params_t ) ) . fe_ch1_fs_g_hi as
                * const _ as usize } , 0usize , concat ! (
                "Alignment of field: " , stringify ! ( rp_calib_params_t ) ,
                "::" , stringify ! ( fe_ch1_fs_g_hi ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const rp_calib_params_t ) ) . fe_ch2_fs_g_hi as
                * const _ as usize } , 4usize , concat ! (
                "Alignment of field: " , stringify ! ( rp_calib_params_t ) ,
                "::" , stringify ! ( fe_ch2_fs_g_hi ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const rp_calib_params_t ) ) . fe_ch1_fs_g_lo as
                * const _ as usize } , 8usize , concat ! (
                "Alignment of field: " , stringify ! ( rp_calib_params_t ) ,
                "::" , stringify ! ( fe_ch1_fs_g_lo ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const rp_calib_params_t ) ) . fe_ch2_fs_g_lo as
                * const _ as usize } , 12usize , concat ! (
                "Alignment of field: " , stringify ! ( rp_calib_params_t ) ,
                "::" , stringify ! ( fe_ch2_fs_g_lo ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const rp_calib_params_t ) ) . fe_ch1_lo_offs as
                * const _ as usize } , 16usize , concat ! (
                "Alignment of field: " , stringify ! ( rp_calib_params_t ) ,
                "::" , stringify ! ( fe_ch1_lo_offs ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const rp_calib_params_t ) ) . fe_ch2_lo_offs as
                * const _ as usize } , 20usize , concat ! (
                "Alignment of field: " , stringify ! ( rp_calib_params_t ) ,
                "::" , stringify ! ( fe_ch2_lo_offs ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const rp_calib_params_t ) ) . be_ch1_fs as *
                const _ as usize } , 24usize , concat ! (
                "Alignment of field: " , stringify ! ( rp_calib_params_t ) ,
                "::" , stringify ! ( be_ch1_fs ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const rp_calib_params_t ) ) . be_ch2_fs as *
                const _ as usize } , 28usize , concat ! (
                "Alignment of field: " , stringify ! ( rp_calib_params_t ) ,
                "::" , stringify ! ( be_ch2_fs ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const rp_calib_params_t ) ) . be_ch1_dc_offs as
                * const _ as usize } , 32usize , concat ! (
                "Alignment of field: " , stringify ! ( rp_calib_params_t ) ,
                "::" , stringify ! ( be_ch1_dc_offs ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const rp_calib_params_t ) ) . be_ch2_dc_offs as
                * const _ as usize } , 36usize , concat ! (
                "Alignment of field: " , stringify ! ( rp_calib_params_t ) ,
                "::" , stringify ! ( be_ch2_dc_offs ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const rp_calib_params_t ) ) . magic as * const
                _ as usize } , 40usize , concat ! (
                "Alignment of field: " , stringify ! ( rp_calib_params_t ) ,
                "::" , stringify ! ( magic ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const rp_calib_params_t ) ) . fe_ch1_hi_offs as
                * const _ as usize } , 44usize , concat ! (
                "Alignment of field: " , stringify ! ( rp_calib_params_t ) ,
                "::" , stringify ! ( fe_ch1_hi_offs ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const rp_calib_params_t ) ) . fe_ch2_hi_offs as
                * const _ as usize } , 48usize , concat ! (
                "Alignment of field: " , stringify ! ( rp_calib_params_t ) ,
                "::" , stringify ! ( fe_ch2_hi_offs ) ));
}
impl Clone for rp_calib_params_t {
    fn clone(&self) -> Self { *self }
}
extern "C" {
    pub fn rp_Init() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_CalibInit() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_Release() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_Reset() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GetVersion() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn rp_GetError(errorCode: ::std::os::raw::c_int)
     -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn rp_EnableDigitalLoop(enable: bool) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GetCalibrationSettings() -> rp_calib_params_t;
}
extern "C" {
    pub fn rp_CalibrateFrontEndOffset(channel: rp_channel_t,
                                      gain: rp_pinState_t,
                                      out_params: *mut rp_calib_params_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_CalibrateFrontEndScaleLV(channel: rp_channel_t,
                                       referentialVoltage: f32,
                                       out_params: *mut rp_calib_params_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_CalibrateFrontEndScaleHV(channel: rp_channel_t,
                                       referentialVoltage: f32,
                                       out_params: *mut rp_calib_params_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_CalibrateBackEndOffset(channel: rp_channel_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_CalibrateBackEndScale(channel: rp_channel_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_CalibrateBackEnd(channel: rp_channel_t,
                               out_params: *mut rp_calib_params_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_CalibrationReset() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_CalibrationSetCachedParams() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_CalibrationWriteParams(calib_params: rp_calib_params_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_IdGetID(id: *mut u32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_IdGetDNA(dna: *mut u64) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_LEDSetState(state: u32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_LEDGetState(state: *mut u32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GPIOnSetDirection(direction: u32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GPIOnGetDirection(direction: *mut u32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GPIOnSetState(state: u32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GPIOnGetState(state: *mut u32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GPIOpSetDirection(direction: u32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GPIOpGetDirection(direction: *mut u32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GPIOpSetState(state: u32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GPIOpGetState(state: *mut u32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_DpinReset() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_DpinSetState(pin: rp_dpin_t, state: rp_pinState_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_DpinGetState(pin: rp_dpin_t, state: *mut rp_pinState_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_DpinSetDirection(pin: rp_dpin_t, direction: rp_pinDirection_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_DpinGetDirection(pin: rp_dpin_t,
                               direction: *mut rp_pinDirection_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_ApinReset() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_ApinGetValue(pin: rp_apin_t, value: *mut f32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_ApinGetValueRaw(pin: rp_apin_t, value: *mut u32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_ApinSetValue(pin: rp_apin_t, value: f32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_ApinSetValueRaw(pin: rp_apin_t, value: u32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_ApinGetRange(pin: rp_apin_t, min_val: *mut f32,
                           max_val: *mut f32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AIpinGetValue(pin: ::std::os::raw::c_uint, value: *mut f32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AIpinGetValueRaw(pin: ::std::os::raw::c_uint, value: *mut u32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AOpinReset() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AOpinGetValue(pin: ::std::os::raw::c_uint, value: *mut f32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AOpinGetValueRaw(pin: ::std::os::raw::c_uint, value: *mut u32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AOpinSetValue(pin: ::std::os::raw::c_uint, value: f32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AOpinSetValueRaw(pin: ::std::os::raw::c_uint, value: u32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AOpinGetRange(pin: ::std::os::raw::c_uint, min_val: *mut f32,
                            max_val: *mut f32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqSetArmKeep(enable: bool) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqSetDecimation(decimation: rp_acq_decimation_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetDecimation(decimation: *mut rp_acq_decimation_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetDecimationFactor(decimation: *mut u32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqSetSamplingRate(sampling_rate: rp_acq_sampling_rate_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetSamplingRate(sampling_rate: *mut rp_acq_sampling_rate_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetSamplingRateHz(sampling_rate: *mut f32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqSetAveraging(enabled: bool) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetAveraging(enabled: *mut bool) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqSetTriggerSrc(source: rp_acq_trig_src_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetTriggerSrc(source: *mut rp_acq_trig_src_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetTriggerState(state: *mut rp_acq_trig_state_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqSetTriggerDelay(decimated_data_num: i32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetTriggerDelay(decimated_data_num: *mut i32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqSetTriggerDelayNs(time_ns: i64) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetTriggerDelayNs(time_ns: *mut i64)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetPreTriggerCounter(value: *mut u32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqSetTriggerLevel(channel: rp_channel_t, voltage: f32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetTriggerLevel(voltage: *mut f32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqSetTriggerHyst(voltage: f32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetTriggerHyst(voltage: *mut f32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqSetGain(channel: rp_channel_t, state: rp_pinState_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetGain(channel: rp_channel_t, state: *mut rp_pinState_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetGainV(channel: rp_channel_t, voltage: *mut f32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetWritePointer(pos: *mut u32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetWritePointerAtTrig(pos: *mut u32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqStart() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqStop() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqReset() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetNormalizedDataPos(pos: u32) -> u32;
}
extern "C" {
    pub fn rp_AcqGetDataPosRaw(channel: rp_channel_t, start_pos: u32,
                               end_pos: u32, buffer: *mut i16,
                               buffer_size: *mut u32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetDataPosV(channel: rp_channel_t, start_pos: u32,
                             end_pos: u32, buffer: *mut f32,
                             buffer_size: *mut u32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetDataRaw(channel: rp_channel_t, pos: u32, size: *mut u32,
                            buffer: *mut i16) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetDataRawV2(pos: u32, size: *mut u32, buffer: *mut u16,
                              buffer2: *mut u16) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetOldestDataRaw(channel: rp_channel_t, size: *mut u32,
                                  buffer: *mut i16) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetLatestDataRaw(channel: rp_channel_t, size: *mut u32,
                                  buffer: *mut i16) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetDataV(channel: rp_channel_t, pos: u32, size: *mut u32,
                          buffer: *mut f32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetDataV2(pos: u32, size: *mut u32, buffer1: *mut f32,
                           buffer2: *mut f32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetOldestDataV(channel: rp_channel_t, size: *mut u32,
                                buffer: *mut f32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetLatestDataV(channel: rp_channel_t, size: *mut u32,
                                buffer: *mut f32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_AcqGetBufSize(size: *mut u32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenReset() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenOutEnable(channel: rp_channel_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenOutDisable(channel: rp_channel_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenOutIsEnabled(channel: rp_channel_t, value: *mut bool)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenAmp(channel: rp_channel_t, amplitude: f32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenGetAmp(channel: rp_channel_t, amplitude: *mut f32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenOffset(channel: rp_channel_t, offset: f32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenGetOffset(channel: rp_channel_t, offset: *mut f32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenFreq(channel: rp_channel_t, frequency: f32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenGetFreq(channel: rp_channel_t, frequency: *mut f32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenPhase(channel: rp_channel_t, phase: f32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenGetPhase(channel: rp_channel_t, phase: *mut f32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenWaveform(channel: rp_channel_t, type_: rp_waveform_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenGetWaveform(channel: rp_channel_t, type_: *mut rp_waveform_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenArbWaveform(channel: rp_channel_t, waveform: *mut f32,
                             length: u32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenGetArbWaveform(channel: rp_channel_t, waveform: *mut f32,
                                length: *mut u32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenDutyCycle(channel: rp_channel_t, ratio: f32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenGetDutyCycle(channel: rp_channel_t, ratio: *mut f32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenMode(channel: rp_channel_t, mode: rp_gen_mode_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenGetMode(channel: rp_channel_t, mode: *mut rp_gen_mode_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenBurstCount(channel: rp_channel_t, num: ::std::os::raw::c_int)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenGetBurstCount(channel: rp_channel_t,
                               num: *mut ::std::os::raw::c_int)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenBurstRepetitions(channel: rp_channel_t,
                                  repetitions: ::std::os::raw::c_int)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenGetBurstRepetitions(channel: rp_channel_t,
                                     repetitions: *mut ::std::os::raw::c_int)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenBurstPeriod(channel: rp_channel_t, period: u32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenGetBurstPeriod(channel: rp_channel_t, period: *mut u32)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenTriggerSource(channel: rp_channel_t, src: rp_trig_src_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenGetTriggerSource(channel: rp_channel_t,
                                  src: *mut rp_trig_src_t)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_GenTrigger(channel: u32) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rp_CmnCnvCntToV(field_len: u32, cnts: u32, adc_max_v: f32,
                           calibScale: u32,
                           calib_dc_off: ::std::os::raw::c_int,
                           user_dc_off: f32) -> f32;
}