pico_sys_dynamic/
ps4000.rs

1pub const PS4000_MAX_OVERSAMPLE_12BIT: u32 = 16;
2pub const PS4000_MAX_OVERSAMPLE_8BIT: u32 = 256;
3pub const PS4XXX_MAX_ETS_CYCLES: u32 = 400;
4pub const PS4XXX_MAX_INTERLEAVE: u32 = 80;
5pub const PS4262_MAX_VALUE: u32 = 32767;
6pub const PS4262_MIN_VALUE: i32 = -32767;
7pub const PS4000_MAX_VALUE: u32 = 32764;
8pub const PS4000_MIN_VALUE: i32 = -32764;
9pub const PS4000_LOST_DATA: i32 = -32768;
10pub const PS4000_EXT_MAX_VALUE: u32 = 32767;
11pub const PS4000_EXT_MIN_VALUE: i32 = -32767;
12pub const MAX_PULSE_WIDTH_QUALIFIER_COUNT: u32 = 16777215;
13pub const MAX_DELAY_COUNT: u32 = 8388607;
14pub const MIN_SIG_GEN_FREQ: f64 = 0.0;
15pub const MAX_SIG_GEN_FREQ: f64 = 100000.0;
16pub const MAX_SIG_GEN_FREQ_4262: f64 = 20000.0;
17pub const MIN_SIG_GEN_BUFFER_SIZE: u32 = 1;
18pub const MAX_SIG_GEN_BUFFER_SIZE: u32 = 8192;
19pub const MIN_DWELL_COUNT: u32 = 10;
20pub const PS4262_MAX_WAVEFORM_BUFFER_SIZE: u32 = 4096;
21pub const PS4262_MIN_DWELL_COUNT: u32 = 3;
22pub const MAX_SWEEPS_SHOTS: u32 = 1073741823;
23
24pub type PICO_POINTER = *mut ::std::os::raw::c_void;
25pub type PICO_INFO = u32;
26pub type PICO_STATUS = u32;
27pub const enPicoStringValue_PICO_SV_MEMORY: enPicoStringValue = 0;
28pub const enPicoStringValue_PICO_SV_MEMORY_NO_OF_SEGMENTS: enPicoStringValue = 1;
29pub const enPicoStringValue_PICO_SV_MEMORY_MAX_SAMPLES: enPicoStringValue = 2;
30pub const enPicoStringValue_PICO_SV_NO_OF_CHANNELS: enPicoStringValue = 3;
31pub const enPicoStringValue_PICO_SV_ARRAY_OF_CHANNELS: enPicoStringValue = 4;
32pub const enPicoStringValue_PICO_SV_CHANNEL: enPicoStringValue = 5;
33pub const enPicoStringValue_PICO_SV_CHANNEL_NAME: enPicoStringValue = 6;
34pub const enPicoStringValue_PICO_SV_CHANNEL_RANGE: enPicoStringValue = 7;
35pub const enPicoStringValue_PICO_SV_CHANNEL_COUPLING: enPicoStringValue = 8;
36pub const enPicoStringValue_PICO_SV_CHANNEL_ENABLED: enPicoStringValue = 9;
37pub const enPicoStringValue_PICO_SV_CHANNEL_ANALOGUE_OFFSET: enPicoStringValue = 10;
38pub const enPicoStringValue_PICO_SV_CHANNEL_FILTER: enPicoStringValue = 11;
39pub const enPicoStringValue_PICO_SV_TRIGGER: enPicoStringValue = 12;
40pub const enPicoStringValue_PICO_SV_TRIGGER_AUXIO_OUTPUT_ENABLED: enPicoStringValue = 13;
41pub const enPicoStringValue_PICO_SV_TRIGGER_AUTO_TRIGGER_MICROSECONDS: enPicoStringValue = 14;
42pub const enPicoStringValue_PICO_SV_TRIGGER_PROPERTIES: enPicoStringValue = 15;
43pub const enPicoStringValue_PICO_SV_NO_OF_TRIGGER_PROPERTIES: enPicoStringValue = 16;
44pub const enPicoStringValue_PICO_SV_TRIGGER_PROPERTIES_CHANNEL: enPicoStringValue = 17;
45pub const enPicoStringValue_PICO_SV_TRIGGER_PROPERTIES_THRESHOLD_UPPER: enPicoStringValue = 18;
46pub const enPicoStringValue_PICO_SV_TRIGGER_PROPERTIES_THRESHOLD_UPPER_HYSTERESIS:
47    enPicoStringValue = 19;
48pub const enPicoStringValue_PICO_SV_TRIGGER_PROPERTIES_THRESHOLD_LOWER: enPicoStringValue = 20;
49pub const enPicoStringValue_PICO_SV_TRIGGER_PROPERTIES_THRESHOLD_LOWER_HYSTERESIS:
50    enPicoStringValue = 21;
51pub const enPicoStringValue_PICO_SV_TRIGGER_PROPERTIES_THRESHOLD_MODE: enPicoStringValue = 22;
52pub const enPicoStringValue_PICO_SV_TRIGGER_ARRAY_OF_BLOCK_CONDITIONS: enPicoStringValue = 23;
53pub const enPicoStringValue_PICO_SV_TRIGGER_NO_OF_BLOCK_CONDITIONS: enPicoStringValue = 24;
54pub const enPicoStringValue_PICO_SV_TRIGGER_CONDITIONS: enPicoStringValue = 25;
55pub const enPicoStringValue_PICO_SV_TRIGGER_NO_OF_CONDITIONS: enPicoStringValue = 26;
56pub const enPicoStringValue_PICO_SV_TRIGGER_CONDITION_SOURCE: enPicoStringValue = 27;
57pub const enPicoStringValue_PICO_SV_TRIGGER_CONDITION_STATE: enPicoStringValue = 28;
58pub const enPicoStringValue_PICO_SV_TRIGGER_DIRECTION: enPicoStringValue = 29;
59pub const enPicoStringValue_PICO_SV_TRIGGER_NO_OF_DIRECTIONS: enPicoStringValue = 30;
60pub const enPicoStringValue_PICO_SV_TRIGGER_DIRECTION_CHANNEL: enPicoStringValue = 31;
61pub const enPicoStringValue_PICO_SV_TRIGGER_DIRECTION_DIRECTION: enPicoStringValue = 32;
62pub const enPicoStringValue_PICO_SV_TRIGGER_DELAY: enPicoStringValue = 33;
63pub const enPicoStringValue_PICO_SV_TRIGGER_DELAY_MS: enPicoStringValue = 34;
64pub const enPicoStringValue_PICO_SV_FREQUENCY_COUNTER: enPicoStringValue = 35;
65pub const enPicoStringValue_PICO_SV_FREQUENCY_COUNTER_ENABLED: enPicoStringValue = 36;
66pub const enPicoStringValue_PICO_SV_FREQUENCY_COUNTER_CHANNEL: enPicoStringValue = 37;
67pub const enPicoStringValue_PICO_SV_FREQUENCY_COUNTER_RANGE: enPicoStringValue = 38;
68pub const enPicoStringValue_PICO_SV_FREQUENCY_COUNTER_TRESHOLDMAJOR: enPicoStringValue = 39;
69pub const enPicoStringValue_PICO_SV_FREQUENCY_COUNTER_TRESHOLDMINOR: enPicoStringValue = 40;
70pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_PROPERTIES: enPicoStringValue = 41;
71pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_PROPERTIES_DIRECTION: enPicoStringValue = 42;
72pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_PROPERTIES_LOWER: enPicoStringValue = 43;
73pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_PROPERTIES_UPPER: enPicoStringValue = 44;
74pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_PROPERTIES_TYPE: enPicoStringValue = 45;
75pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_ARRAY_OF_BLOCK_CONDITIONS: enPicoStringValue = 46;
76pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_NO_OF_BLOCK_CONDITIONS: enPicoStringValue = 47;
77pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_CONDITIONS: enPicoStringValue = 48;
78pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_NO_OF_CONDITIONS: enPicoStringValue = 49;
79pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_CONDITIONS_SOURCE: enPicoStringValue = 50;
80pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_CONDITIONS_STATE: enPicoStringValue = 51;
81pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES: enPicoStringValue = 52;
82pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_PRE_TRIGGER_SAMPLES: enPicoStringValue = 53;
83pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_POST_TRIGGER_SAMPLES: enPicoStringValue = 54;
84pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_TIMEBASE: enPicoStringValue = 55;
85pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_NO_OF_CAPTURES: enPicoStringValue = 56;
86pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_RESOLUTION: enPicoStringValue = 57;
87pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_OVERLAPPED: enPicoStringValue = 58;
88pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_OVERLAPPED_DOWN_SAMPLE_RATIO:
89    enPicoStringValue = 59;
90pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_OVERLAPPED_DOWN_SAMPLE_RATIO_MODE:
91    enPicoStringValue = 60;
92pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_OVERLAPPED_REQUERSTED_NO_OF_SAMPLES:
93    enPicoStringValue = 61;
94pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_OVERLAPPED_SEGMENT_INDEX_FROM:
95    enPicoStringValue = 62;
96pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_OVERLAPPED_SEGMENT_INDEX_TO:
97    enPicoStringValue = 63;
98pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR: enPicoStringValue = 64;
99pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_BUILT_IN: enPicoStringValue = 65;
100pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_BUILT_IN_WAVE_TYPE: enPicoStringValue = 66;
101pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_BUILT_IN_START_FREQUENCY: enPicoStringValue =
102    67;
103pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_BUILT_IN_STOP_FREQUENCY: enPicoStringValue =
104    68;
105pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_BUILT_IN_INCREMENT: enPicoStringValue = 69;
106pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_BUILT_IN_DWELL_TIME: enPicoStringValue = 70;
107pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_AWG: enPicoStringValue = 71;
108pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_AWG_START_DELTA_PHASE: enPicoStringValue = 72;
109pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_AWG_STOP_DELTA_PHASE: enPicoStringValue = 73;
110pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_AWG_DELTA_PHASE_INCREMENT: enPicoStringValue =
111    74;
112pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_AWG_DWELL_COUNT: enPicoStringValue = 75;
113pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_AWG_INDEX_MODE: enPicoStringValue = 76;
114pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_AWG_WAVEFORM_SIZE: enPicoStringValue = 77;
115pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_ARRAY_OF_AWG_WAVEFORM_VALUES:
116    enPicoStringValue = 78;
117pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_OFFSET_VOLTAGE: enPicoStringValue = 79;
118pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_PK_TO_PK: enPicoStringValue = 80;
119pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_OPERATION: enPicoStringValue = 81;
120pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_SHOTS: enPicoStringValue = 82;
121pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_SWEEPS: enPicoStringValue = 83;
122pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_SWEEP_TYPE: enPicoStringValue = 84;
123pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_TRIGGER_TYPE: enPicoStringValue = 85;
124pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_TRIGGER_SOURCE: enPicoStringValue = 86;
125pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_EXT_IN_THRESHOLD: enPicoStringValue = 87;
126pub const enPicoStringValue_PICO_SV_ETS: enPicoStringValue = 88;
127pub const enPicoStringValue_PICO_SV_ETS_STATE: enPicoStringValue = 89;
128pub const enPicoStringValue_PICO_SV_ETS_CYCLE: enPicoStringValue = 90;
129pub const enPicoStringValue_PICO_SV_ETS_INTERLEAVE: enPicoStringValue = 91;
130pub const enPicoStringValue_PICO_SV_ETS_SAMPLE_TIME_PICOSECONDS: enPicoStringValue = 92;
131pub type enPicoStringValue = ::std::os::raw::c_uint;
132pub use self::enPicoStringValue as PICO_STRING_VALUE;
133pub const enChannelBufferIndex_PS4000_CHANNEL_A_MAX: enChannelBufferIndex = 0;
134pub const enChannelBufferIndex_PS4000_CHANNEL_A_MIN: enChannelBufferIndex = 1;
135pub const enChannelBufferIndex_PS4000_CHANNEL_B_MAX: enChannelBufferIndex = 2;
136pub const enChannelBufferIndex_PS4000_CHANNEL_B_MIN: enChannelBufferIndex = 3;
137pub const enChannelBufferIndex_PS4000_CHANNEL_C_MAX: enChannelBufferIndex = 4;
138pub const enChannelBufferIndex_PS4000_CHANNEL_C_MIN: enChannelBufferIndex = 5;
139pub const enChannelBufferIndex_PS4000_CHANNEL_D_MAX: enChannelBufferIndex = 6;
140pub const enChannelBufferIndex_PS4000_CHANNEL_D_MIN: enChannelBufferIndex = 7;
141pub const enChannelBufferIndex_PS4000_MAX_CHANNEL_BUFFERS: enChannelBufferIndex = 8;
142pub type enChannelBufferIndex = ::std::os::raw::c_uint;
143pub use self::enChannelBufferIndex as PS4000_CHANNEL_BUFFER_INDEX;
144pub const enPS4000Channel_PS4000_CHANNEL_A: enPS4000Channel = 0;
145pub const enPS4000Channel_PS4000_CHANNEL_B: enPS4000Channel = 1;
146pub const enPS4000Channel_PS4000_CHANNEL_C: enPS4000Channel = 2;
147pub const enPS4000Channel_PS4000_CHANNEL_D: enPS4000Channel = 3;
148pub const enPS4000Channel_PS4000_EXTERNAL: enPS4000Channel = 4;
149pub const enPS4000Channel_PS4000_MAX_CHANNELS: enPS4000Channel = 4;
150pub const enPS4000Channel_PS4000_TRIGGER_AUX: enPS4000Channel = 5;
151pub const enPS4000Channel_PS4000_MAX_TRIGGER_SOURCES: enPS4000Channel = 6;
152pub type enPS4000Channel = ::std::os::raw::c_uint;
153pub use self::enPS4000Channel as PS4000_CHANNEL;
154pub const enPS4000Range_PS4000_10MV: enPS4000Range = 0;
155pub const enPS4000Range_PS4000_20MV: enPS4000Range = 1;
156pub const enPS4000Range_PS4000_50MV: enPS4000Range = 2;
157pub const enPS4000Range_PS4000_100MV: enPS4000Range = 3;
158pub const enPS4000Range_PS4000_200MV: enPS4000Range = 4;
159pub const enPS4000Range_PS4000_500MV: enPS4000Range = 5;
160pub const enPS4000Range_PS4000_1V: enPS4000Range = 6;
161pub const enPS4000Range_PS4000_2V: enPS4000Range = 7;
162pub const enPS4000Range_PS4000_5V: enPS4000Range = 8;
163pub const enPS4000Range_PS4000_10V: enPS4000Range = 9;
164pub const enPS4000Range_PS4000_20V: enPS4000Range = 10;
165pub const enPS4000Range_PS4000_50V: enPS4000Range = 11;
166pub const enPS4000Range_PS4000_100V: enPS4000Range = 12;
167pub const enPS4000Range_PS4000_MAX_RANGES: enPS4000Range = 13;
168pub const enPS4000Range_PS4000_RESISTANCE_100R: enPS4000Range = 13;
169pub const enPS4000Range_PS4000_RESISTANCE_1K: enPS4000Range = 14;
170pub const enPS4000Range_PS4000_RESISTANCE_10K: enPS4000Range = 15;
171pub const enPS4000Range_PS4000_RESISTANCE_100K: enPS4000Range = 16;
172pub const enPS4000Range_PS4000_RESISTANCE_1M: enPS4000Range = 17;
173pub const enPS4000Range_PS4000_MAX_RESISTANCES: enPS4000Range = 18;
174pub const enPS4000Range_PS4000_ACCELEROMETER_10MV: enPS4000Range = 18;
175pub const enPS4000Range_PS4000_ACCELEROMETER_20MV: enPS4000Range = 19;
176pub const enPS4000Range_PS4000_ACCELEROMETER_50MV: enPS4000Range = 20;
177pub const enPS4000Range_PS4000_ACCELEROMETER_100MV: enPS4000Range = 21;
178pub const enPS4000Range_PS4000_ACCELEROMETER_200MV: enPS4000Range = 22;
179pub const enPS4000Range_PS4000_ACCELEROMETER_500MV: enPS4000Range = 23;
180pub const enPS4000Range_PS4000_ACCELEROMETER_1V: enPS4000Range = 24;
181pub const enPS4000Range_PS4000_ACCELEROMETER_2V: enPS4000Range = 25;
182pub const enPS4000Range_PS4000_ACCELEROMETER_5V: enPS4000Range = 26;
183pub const enPS4000Range_PS4000_ACCELEROMETER_10V: enPS4000Range = 27;
184pub const enPS4000Range_PS4000_ACCELEROMETER_20V: enPS4000Range = 28;
185pub const enPS4000Range_PS4000_ACCELEROMETER_50V: enPS4000Range = 29;
186pub const enPS4000Range_PS4000_ACCELEROMETER_100V: enPS4000Range = 30;
187pub const enPS4000Range_PS4000_MAX_ACCELEROMETER: enPS4000Range = 31;
188pub const enPS4000Range_PS4000_TEMPERATURE_UPTO_40: enPS4000Range = 31;
189pub const enPS4000Range_PS4000_TEMPERATURE_UPTO_70: enPS4000Range = 32;
190pub const enPS4000Range_PS4000_TEMPERATURE_UPTO_100: enPS4000Range = 33;
191pub const enPS4000Range_PS4000_TEMPERATURE_UPTO_130: enPS4000Range = 34;
192pub const enPS4000Range_PS4000_MAX_TEMPERATURES: enPS4000Range = 35;
193pub const enPS4000Range_PS4000_RESISTANCE_5K: enPS4000Range = 35;
194pub const enPS4000Range_PS4000_RESISTANCE_25K: enPS4000Range = 36;
195pub const enPS4000Range_PS4000_RESISTANCE_50K: enPS4000Range = 37;
196pub const enPS4000Range_PS4000_MAX_EXTRA_RESISTANCES: enPS4000Range = 38;
197pub type enPS4000Range = ::std::os::raw::c_uint;
198pub use self::enPS4000Range as PS4000_RANGE;
199pub const enPS4000Probe_P_NONE: enPS4000Probe = 0;
200pub const enPS4000Probe_P_CURRENT_CLAMP_10A: enPS4000Probe = 1;
201pub const enPS4000Probe_P_CURRENT_CLAMP_1000A: enPS4000Probe = 2;
202pub const enPS4000Probe_P_TEMPERATURE_SENSOR: enPS4000Probe = 3;
203pub const enPS4000Probe_P_CURRENT_MEASURING_DEVICE: enPS4000Probe = 4;
204pub const enPS4000Probe_P_PRESSURE_SENSOR_50BAR: enPS4000Probe = 5;
205pub const enPS4000Probe_P_PRESSURE_SENSOR_5BAR: enPS4000Probe = 6;
206pub const enPS4000Probe_P_OPTICAL_SWITCH: enPS4000Probe = 7;
207pub const enPS4000Probe_P_UNKNOWN: enPS4000Probe = 8;
208pub const enPS4000Probe_P_MAX_PROBES: enPS4000Probe = 8;
209pub type enPS4000Probe = ::std::os::raw::c_uint;
210pub use self::enPS4000Probe as PS4000_PROBE;
211pub const enPS4000ChannelInfo_CI_RANGES: enPS4000ChannelInfo = 0;
212pub const enPS4000ChannelInfo_CI_RESISTANCES: enPS4000ChannelInfo = 1;
213pub const enPS4000ChannelInfo_CI_ACCELEROMETER: enPS4000ChannelInfo = 2;
214pub const enPS4000ChannelInfo_CI_PROBES: enPS4000ChannelInfo = 3;
215pub const enPS4000ChannelInfo_CI_TEMPERATURES: enPS4000ChannelInfo = 4;
216pub type enPS4000ChannelInfo = ::std::os::raw::c_uint;
217pub use self::enPS4000ChannelInfo as PS4000_CHANNEL_INFO;
218pub const enPS4000EtsMode_PS4000_ETS_OFF: enPS4000EtsMode = 0;
219pub const enPS4000EtsMode_PS4000_ETS_FAST: enPS4000EtsMode = 1;
220pub const enPS4000EtsMode_PS4000_ETS_SLOW: enPS4000EtsMode = 2;
221pub const enPS4000EtsMode_PS4000_ETS_MODES_MAX: enPS4000EtsMode = 3;
222pub type enPS4000EtsMode = ::std::os::raw::c_uint;
223pub use self::enPS4000EtsMode as PS4000_ETS_MODE;
224pub const enPS4000TimeUnits_PS4000_FS: enPS4000TimeUnits = 0;
225pub const enPS4000TimeUnits_PS4000_PS: enPS4000TimeUnits = 1;
226pub const enPS4000TimeUnits_PS4000_NS: enPS4000TimeUnits = 2;
227pub const enPS4000TimeUnits_PS4000_US: enPS4000TimeUnits = 3;
228pub const enPS4000TimeUnits_PS4000_MS: enPS4000TimeUnits = 4;
229pub const enPS4000TimeUnits_PS4000_S: enPS4000TimeUnits = 5;
230pub const enPS4000TimeUnits_PS4000_MAX_TIME_UNITS: enPS4000TimeUnits = 6;
231pub type enPS4000TimeUnits = ::std::os::raw::c_uint;
232pub use self::enPS4000TimeUnits as PS4000_TIME_UNITS;
233pub const enSweepType_UP: enSweepType = 0;
234pub const enSweepType_DOWN: enSweepType = 1;
235pub const enSweepType_UPDOWN: enSweepType = 2;
236pub const enSweepType_DOWNUP: enSweepType = 3;
237pub const enSweepType_MAX_SWEEP_TYPES: enSweepType = 4;
238pub type enSweepType = ::std::os::raw::c_uint;
239pub use self::enSweepType as SWEEP_TYPE;
240pub const enPS4000OperationTypes_PS4000_OP_NONE: enPS4000OperationTypes = 0;
241pub const enPS4000OperationTypes_PS4000_WHITENOISE: enPS4000OperationTypes = 1;
242pub const enPS4000OperationTypes_PS4000_PRBS: enPS4000OperationTypes = 2;
243pub type enPS4000OperationTypes = ::std::os::raw::c_uint;
244pub use self::enPS4000OperationTypes as PS4000_OPERATION_TYPES;
245pub const enWaveType_PS4000_SINE: enWaveType = 0;
246pub const enWaveType_PS4000_SQUARE: enWaveType = 1;
247pub const enWaveType_PS4000_TRIANGLE: enWaveType = 2;
248pub const enWaveType_PS4000_RAMP_UP: enWaveType = 3;
249pub const enWaveType_PS4000_RAMP_DOWN: enWaveType = 4;
250pub const enWaveType_PS4000_SINC: enWaveType = 5;
251pub const enWaveType_PS4000_GAUSSIAN: enWaveType = 6;
252pub const enWaveType_PS4000_HALF_SINE: enWaveType = 7;
253pub const enWaveType_PS4000_DC_VOLTAGE: enWaveType = 8;
254pub const enWaveType_PS4000_WHITE_NOISE: enWaveType = 9;
255pub const enWaveType_MAX_WAVE_TYPES: enWaveType = 10;
256pub type enWaveType = ::std::os::raw::c_uint;
257pub use self::enWaveType as WAVE_TYPE;
258pub const enSigGenTrigType_SIGGEN_RISING: enSigGenTrigType = 0;
259pub const enSigGenTrigType_SIGGEN_FALLING: enSigGenTrigType = 1;
260pub const enSigGenTrigType_SIGGEN_GATE_HIGH: enSigGenTrigType = 2;
261pub const enSigGenTrigType_SIGGEN_GATE_LOW: enSigGenTrigType = 3;
262pub type enSigGenTrigType = ::std::os::raw::c_uint;
263pub use self::enSigGenTrigType as SIGGEN_TRIG_TYPE;
264pub const enSigGenTrigSource_SIGGEN_NONE: enSigGenTrigSource = 0;
265pub const enSigGenTrigSource_SIGGEN_SCOPE_TRIG: enSigGenTrigSource = 1;
266pub const enSigGenTrigSource_SIGGEN_AUX_IN: enSigGenTrigSource = 2;
267pub const enSigGenTrigSource_SIGGEN_EXT_IN: enSigGenTrigSource = 3;
268pub const enSigGenTrigSource_SIGGEN_SOFT_TRIG: enSigGenTrigSource = 4;
269pub type enSigGenTrigSource = ::std::os::raw::c_uint;
270pub use self::enSigGenTrigSource as SIGGEN_TRIG_SOURCE;
271pub const enIndexMode_SINGLE: enIndexMode = 0;
272pub const enIndexMode_DUAL: enIndexMode = 1;
273pub const enIndexMode_QUAD: enIndexMode = 2;
274pub const enIndexMode_MAX_INDEX_MODES: enIndexMode = 3;
275pub type enIndexMode = ::std::os::raw::c_uint;
276pub use self::enIndexMode as INDEX_MODE;
277pub const enThresholdMode_LEVEL: enThresholdMode = 0;
278pub const enThresholdMode_WINDOW: enThresholdMode = 1;
279pub type enThresholdMode = ::std::os::raw::c_uint;
280pub use self::enThresholdMode as THRESHOLD_MODE;
281pub const enThresholdDirection_ABOVE: enThresholdDirection = 0;
282pub const enThresholdDirection_BELOW: enThresholdDirection = 1;
283pub const enThresholdDirection_RISING: enThresholdDirection = 2;
284pub const enThresholdDirection_FALLING: enThresholdDirection = 3;
285pub const enThresholdDirection_RISING_OR_FALLING: enThresholdDirection = 4;
286pub const enThresholdDirection_ABOVE_LOWER: enThresholdDirection = 5;
287pub const enThresholdDirection_BELOW_LOWER: enThresholdDirection = 6;
288pub const enThresholdDirection_RISING_LOWER: enThresholdDirection = 7;
289pub const enThresholdDirection_FALLING_LOWER: enThresholdDirection = 8;
290pub const enThresholdDirection_INSIDE: enThresholdDirection = 0;
291pub const enThresholdDirection_OUTSIDE: enThresholdDirection = 1;
292pub const enThresholdDirection_ENTER: enThresholdDirection = 2;
293pub const enThresholdDirection_EXIT: enThresholdDirection = 3;
294pub const enThresholdDirection_ENTER_OR_EXIT: enThresholdDirection = 4;
295pub const enThresholdDirection_POSITIVE_RUNT: enThresholdDirection = 9;
296pub const enThresholdDirection_NEGATIVE_RUNT: enThresholdDirection = 10;
297pub const enThresholdDirection_NONE: enThresholdDirection = 2;
298pub type enThresholdDirection = ::std::os::raw::c_uint;
299pub use self::enThresholdDirection as THRESHOLD_DIRECTION;
300pub const enTriggerState_CONDITION_DONT_CARE: enTriggerState = 0;
301pub const enTriggerState_CONDITION_TRUE: enTriggerState = 1;
302pub const enTriggerState_CONDITION_FALSE: enTriggerState = 2;
303pub const enTriggerState_CONDITION_MAX: enTriggerState = 3;
304pub type enTriggerState = ::std::os::raw::c_uint;
305pub use self::enTriggerState as TRIGGER_STATE;
306#[repr(C, packed)]
307#[derive(Debug, Copy, Clone)]
308pub struct tTriggerConditions {
309    pub channelA: TRIGGER_STATE,
310    pub channelB: TRIGGER_STATE,
311    pub channelC: TRIGGER_STATE,
312    pub channelD: TRIGGER_STATE,
313    pub external: TRIGGER_STATE,
314    pub aux: TRIGGER_STATE,
315    pub pulseWidthQualifier: TRIGGER_STATE,
316}
317pub type TRIGGER_CONDITIONS = tTriggerConditions;
318#[repr(C, packed)]
319#[derive(Debug, Copy, Clone)]
320pub struct tPwqConditions {
321    pub channelA: TRIGGER_STATE,
322    pub channelB: TRIGGER_STATE,
323    pub channelC: TRIGGER_STATE,
324    pub channelD: TRIGGER_STATE,
325    pub external: TRIGGER_STATE,
326    pub aux: TRIGGER_STATE,
327}
328pub type PWQ_CONDITIONS = tPwqConditions;
329#[repr(C, packed)]
330#[derive(Debug, Copy, Clone)]
331pub struct tTriggerChannelProperties {
332    pub thresholdUpper: i16,
333    pub thresholdUpperHysteresis: u16,
334    pub thresholdLower: i16,
335    pub thresholdLowerHysteresis: u16,
336    pub channel: PS4000_CHANNEL,
337    pub thresholdMode: THRESHOLD_MODE,
338}
339
340pub type TRIGGER_CHANNEL_PROPERTIES = tTriggerChannelProperties;
341pub const enRatioMode_RATIO_MODE_NONE: enRatioMode = 0;
342pub const enRatioMode_RATIO_MODE_AGGREGATE: enRatioMode = 1;
343pub const enRatioMode_RATIO_MODE_AVERAGE: enRatioMode = 2;
344pub type enRatioMode = ::std::os::raw::c_uint;
345pub use self::enRatioMode as RATIO_MODE;
346pub const enPulseWidthType_PW_TYPE_NONE: enPulseWidthType = 0;
347pub const enPulseWidthType_PW_TYPE_LESS_THAN: enPulseWidthType = 1;
348pub const enPulseWidthType_PW_TYPE_GREATER_THAN: enPulseWidthType = 2;
349pub const enPulseWidthType_PW_TYPE_IN_RANGE: enPulseWidthType = 3;
350pub const enPulseWidthType_PW_TYPE_OUT_OF_RANGE: enPulseWidthType = 4;
351pub type enPulseWidthType = ::std::os::raw::c_uint;
352pub use self::enPulseWidthType as PULSE_WIDTH_TYPE;
353pub const enPs4000HoldOffType_PS4000_TIME: enPs4000HoldOffType = 0;
354pub const enPs4000HoldOffType_PS4000_MAX_HOLDOFF_TYPE: enPs4000HoldOffType = 1;
355pub type enPs4000HoldOffType = ::std::os::raw::c_uint;
356pub use self::enPs4000HoldOffType as PS4000_HOLDOFF_TYPE;
357pub const enPS4000FrequencyCounterRange_FC_2K: enPS4000FrequencyCounterRange = 0;
358pub const enPS4000FrequencyCounterRange_FC_20K: enPS4000FrequencyCounterRange = 1;
359pub const enPS4000FrequencyCounterRange_FC_20: enPS4000FrequencyCounterRange = 2;
360pub const enPS4000FrequencyCounterRange_FC_200: enPS4000FrequencyCounterRange = 3;
361pub const enPS4000FrequencyCounterRange_FC_MAX: enPS4000FrequencyCounterRange = 4;
362pub type enPS4000FrequencyCounterRange = ::std::os::raw::c_uint;
363pub use self::enPS4000FrequencyCounterRange as PS4000_FREQUENCY_COUNTER_RANGE;
364pub type ps4000BlockReady = ::std::option::Option<
365    extern "C" fn(handle: i16, status: PICO_STATUS, pParameter: *mut ::std::os::raw::c_void),
366>;
367pub type ps4000StreamingReady = ::std::option::Option<
368    unsafe extern "C" fn(
369        handle: i16,
370        noOfSamples: i32,
371        startIndex: u32,
372        overflow: i16,
373        triggerAt: u32,
374        triggered: i16,
375        autoStop: i16,
376        pParameter: *mut ::std::os::raw::c_void,
377    ),
378>;
379pub type ps4000DataReady = ::std::option::Option<
380    unsafe extern "C" fn(
381        handle: i16,
382        noOfSamples: i32,
383        overflow: i16,
384        triggerAt: u32,
385        triggered: i16,
386        pParameter: *mut ::std::os::raw::c_void,
387    ),
388>;
389pub type __builtin_va_list = [__va_list_tag; 1usize];
390#[repr(C)]
391#[derive(Debug, Copy, Clone)]
392pub struct __va_list_tag {
393    pub gp_offset: ::std::os::raw::c_uint,
394    pub fp_offset: ::std::os::raw::c_uint,
395    pub overflow_arg_area: *mut ::std::os::raw::c_void,
396    pub reg_save_area: *mut ::std::os::raw::c_void,
397}
398
399extern crate libloading;
400pub struct PS4000Loader {
401    __library: ::libloading::Library,
402    pub ps4000ApplyFix: Result<unsafe extern "C" fn(u32, u16), ::libloading::Error>,
403    pub ps4000OpenUnit:
404        Result<unsafe extern "C" fn(handle: *mut i16) -> PICO_STATUS, ::libloading::Error>,
405    pub ps4000OpenUnitAsync:
406        Result<unsafe extern "C" fn(status: *mut i16) -> PICO_STATUS, ::libloading::Error>,
407    pub ps4000OpenUnitEx: Result<
408        unsafe extern "C" fn(handle: *mut i16, serial: *mut i8) -> PICO_STATUS,
409        ::libloading::Error,
410    >,
411    pub ps4000OpenUnitAsyncEx: Result<
412        unsafe extern "C" fn(status: *mut i16, serial: *mut i8) -> PICO_STATUS,
413        ::libloading::Error,
414    >,
415    pub ps4000OpenUnitProgress: Result<
416        unsafe extern "C" fn(
417            handle: *mut i16,
418            progressPercent: *mut i16,
419            complete: *mut i16,
420        ) -> PICO_STATUS,
421        ::libloading::Error,
422    >,
423    pub ps4000GetUnitInfo: Result<
424        unsafe extern "C" fn(
425            handle: i16,
426            string: *mut i8,
427            stringLength: i16,
428            requiredSize: *mut i16,
429            info: PICO_INFO,
430        ) -> PICO_STATUS,
431        ::libloading::Error,
432    >,
433    pub ps4000FlashLed:
434        Result<unsafe extern "C" fn(handle: i16, start: i16) -> PICO_STATUS, ::libloading::Error>,
435    pub ps4000IsLedFlashing: Result<
436        unsafe extern "C" fn(handle: i16, status: *mut i16) -> PICO_STATUS,
437        ::libloading::Error,
438    >,
439    pub ps4000CloseUnit:
440        Result<unsafe extern "C" fn(handle: i16) -> PICO_STATUS, ::libloading::Error>,
441    pub ps4000MemorySegments: Result<
442        unsafe extern "C" fn(handle: i16, nSegments: u16, nMaxSamples: *mut i32) -> PICO_STATUS,
443        ::libloading::Error,
444    >,
445    pub ps4000SetChannel: Result<
446        unsafe extern "C" fn(
447            handle: i16,
448            channel: PS4000_CHANNEL,
449            enabled: i16,
450            dc: i16,
451            range: PS4000_RANGE,
452        ) -> PICO_STATUS,
453        ::libloading::Error,
454    >,
455    pub ps4000SetNoOfCaptures: Result<
456        unsafe extern "C" fn(handle: i16, nCaptures: u16) -> PICO_STATUS,
457        ::libloading::Error,
458    >,
459    pub ps4000GetTimebase: Result<
460        unsafe extern "C" fn(
461            handle: i16,
462            timebase: u32,
463            noSamples: i32,
464            timeIntervalNanoseconds: *mut i32,
465            oversample: i16,
466            maxSamples: *mut i32,
467            segmentIndex: u16,
468        ) -> PICO_STATUS,
469        ::libloading::Error,
470    >,
471    pub ps4000GetTimebase2: Result<
472        unsafe extern "C" fn(
473            handle: i16,
474            timebase: u32,
475            noSamples: i32,
476            timeIntervalNanoseconds: *mut f32,
477            oversample: i16,
478            maxSamples: *mut i32,
479            segmentIndex: u16,
480        ) -> PICO_STATUS,
481        ::libloading::Error,
482    >,
483    pub ps4000SigGenOff:
484        Result<unsafe extern "C" fn(handle: i16) -> PICO_STATUS, ::libloading::Error>,
485    pub ps4000SetSigGenArbitrary: Result<
486        unsafe extern "C" fn(
487            handle: i16,
488            offsetVoltage: i32,
489            pkToPk: u32,
490            startDeltaPhase: u32,
491            stopDeltaPhase: u32,
492            deltaPhaseIncrement: u32,
493            dwellCount: u32,
494            arbitraryWaveform: *mut i16,
495            arbitraryWaveformSize: i32,
496            sweepType: SWEEP_TYPE,
497            operationType: i16,
498            indexMode: INDEX_MODE,
499            shots: u32,
500            sweeps: u32,
501            triggerType: SIGGEN_TRIG_TYPE,
502            triggerSource: SIGGEN_TRIG_SOURCE,
503            extInThreshold: i16,
504        ) -> PICO_STATUS,
505        ::libloading::Error,
506    >,
507    pub ps4000SetSigGenBuiltIn: Result<
508        unsafe extern "C" fn(
509            handle: i16,
510            offsetVoltage: i32,
511            pkToPk: u32,
512            waveType: i16,
513            startFrequency: f32,
514            stopFrequency: f32,
515            increment: f32,
516            dwellTime: f32,
517            sweepType: SWEEP_TYPE,
518            operationType: i16,
519            shots: u32,
520            sweeps: u32,
521            triggerType: SIGGEN_TRIG_TYPE,
522            triggerSource: SIGGEN_TRIG_SOURCE,
523            extInThreshold: i16,
524        ) -> PICO_STATUS,
525        ::libloading::Error,
526    >,
527    pub ps4000SigGenFrequencyToPhase: Result<
528        unsafe extern "C" fn(
529            handle: i16,
530            frequency: f64,
531            indexMode: INDEX_MODE,
532            bufferLength: u32,
533            phase: *mut u32,
534        ) -> PICO_STATUS,
535        ::libloading::Error,
536    >,
537    pub ps4000SigGenArbitraryMinMaxValues: Result<
538        unsafe extern "C" fn(
539            handle: i16,
540            minArbitraryWaveformValue: *mut i16,
541            maxArbitraryWaveformValue: *mut i16,
542            minArbitraryWaveformSize: *mut u32,
543            maxArbitraryWaveformSize: *mut u32,
544        ) -> PICO_STATUS,
545        ::libloading::Error,
546    >,
547    pub ps4000SigGenSoftwareControl:
548        Result<unsafe extern "C" fn(handle: i16, state: i16) -> PICO_STATUS, ::libloading::Error>,
549    pub ps4000SetEts: Result<
550        unsafe extern "C" fn(
551            handle: i16,
552            mode: PS4000_ETS_MODE,
553            etsCycles: i16,
554            etsInterleave: i16,
555            sampleTimePicoseconds: *mut i32,
556        ) -> PICO_STATUS,
557        ::libloading::Error,
558    >,
559    pub ps4000SetSimpleTrigger: Result<
560        unsafe extern "C" fn(
561            handle: i16,
562            enable: i16,
563            source: PS4000_CHANNEL,
564            threshold: i16,
565            direction: THRESHOLD_DIRECTION,
566            delay: u32,
567            autoTrigger_ms: i16,
568        ) -> PICO_STATUS,
569        ::libloading::Error,
570    >,
571    pub ps4000SetTriggerChannelProperties: Result<
572        unsafe extern "C" fn(
573            handle: i16,
574            channelProperties: *mut TRIGGER_CHANNEL_PROPERTIES,
575            nChannelProperties: i16,
576            auxOutputEnable: i16,
577            autoTriggerMilliseconds: i32,
578        ) -> PICO_STATUS,
579        ::libloading::Error,
580    >,
581    pub ps4000SetExtTriggerRange: Result<
582        unsafe extern "C" fn(handle: i16, extRange: PS4000_RANGE) -> PICO_STATUS,
583        ::libloading::Error,
584    >,
585    pub ps4000SetTriggerChannelConditions: Result<
586        unsafe extern "C" fn(
587            handle: i16,
588            conditions: *mut TRIGGER_CONDITIONS,
589            nConditions: i16,
590        ) -> PICO_STATUS,
591        ::libloading::Error,
592    >,
593    pub ps4000SetTriggerChannelDirections: Result<
594        unsafe extern "C" fn(
595            handle: i16,
596            channelA: THRESHOLD_DIRECTION,
597            channelB: THRESHOLD_DIRECTION,
598            channelC: THRESHOLD_DIRECTION,
599            channelD: THRESHOLD_DIRECTION,
600            ext: THRESHOLD_DIRECTION,
601            aux: THRESHOLD_DIRECTION,
602        ) -> PICO_STATUS,
603        ::libloading::Error,
604    >,
605    pub ps4000SetTriggerDelay:
606        Result<unsafe extern "C" fn(handle: i16, delay: u32) -> PICO_STATUS, ::libloading::Error>,
607    pub ps4000SetPulseWidthQualifier: Result<
608        unsafe extern "C" fn(
609            handle: i16,
610            conditions: *mut PWQ_CONDITIONS,
611            nConditions: i16,
612            direction: THRESHOLD_DIRECTION,
613            lower: u32,
614            upper: u32,
615            type_: PULSE_WIDTH_TYPE,
616        ) -> PICO_STATUS,
617        ::libloading::Error,
618    >,
619    pub ps4000IsTriggerOrPulseWidthQualifierEnabled: Result<
620        unsafe extern "C" fn(
621            handle: i16,
622            triggerEnabled: *mut i16,
623            pulseWidthQualifierEnabled: *mut i16,
624        ) -> PICO_STATUS,
625        ::libloading::Error,
626    >,
627    pub ps4000GetTriggerTimeOffset: Result<
628        unsafe extern "C" fn(
629            handle: i16,
630            timeUpper: *mut u32,
631            timeLower: *mut u32,
632            timeUnits: *mut PS4000_TIME_UNITS,
633            segmentIndex: u16,
634        ) -> PICO_STATUS,
635        ::libloading::Error,
636    >,
637    pub ps4000GetTriggerChannelTimeOffset: Result<
638        unsafe extern "C" fn(
639            handle: i16,
640            timeUpper: *mut u32,
641            timeLower: *mut u32,
642            timeUnits: *mut PS4000_TIME_UNITS,
643            segmentIndex: u16,
644            channel: PS4000_CHANNEL,
645        ) -> PICO_STATUS,
646        ::libloading::Error,
647    >,
648    pub ps4000GetTriggerTimeOffset64: Result<
649        unsafe extern "C" fn(
650            handle: i16,
651            time: *mut i64,
652            timeUnits: *mut PS4000_TIME_UNITS,
653            segmentIndex: u16,
654        ) -> PICO_STATUS,
655        ::libloading::Error,
656    >,
657    pub ps4000GetTriggerChannelTimeOffset64: Result<
658        unsafe extern "C" fn(
659            handle: i16,
660            time: *mut i64,
661            timeUnits: *mut PS4000_TIME_UNITS,
662            segmentIndex: u16,
663            channel: PS4000_CHANNEL,
664        ) -> PICO_STATUS,
665        ::libloading::Error,
666    >,
667    pub ps4000GetValuesTriggerTimeOffsetBulk: Result<
668        unsafe extern "C" fn(
669            handle: i16,
670            timesUpper: *mut u32,
671            timesLower: *mut u32,
672            timeUnits: *mut PS4000_TIME_UNITS,
673            fromSegmentIndex: u16,
674            toSegmentIndex: u16,
675        ) -> PICO_STATUS,
676        ::libloading::Error,
677    >,
678    pub ps4000GetValuesTriggerChannelTimeOffsetBulk: Result<
679        unsafe extern "C" fn(
680            handle: i16,
681            timesUpper: *mut u32,
682            timesLower: *mut u32,
683            timeUnits: *mut PS4000_TIME_UNITS,
684            fromSegmentIndex: u16,
685            toSegmentIndex: u16,
686            channel: PS4000_CHANNEL,
687        ) -> PICO_STATUS,
688        ::libloading::Error,
689    >,
690    pub ps4000GetValuesTriggerTimeOffsetBulk64: Result<
691        unsafe extern "C" fn(
692            handle: i16,
693            times: *mut i64,
694            timeUnits: *mut PS4000_TIME_UNITS,
695            fromSegmentIndex: u16,
696            toSegmentIndex: u16,
697        ) -> PICO_STATUS,
698        ::libloading::Error,
699    >,
700    pub ps4000GetValuesTriggerChannelTimeOffsetBulk64: Result<
701        unsafe extern "C" fn(
702            handle: i16,
703            times: *mut i64,
704            timeUnits: *mut PS4000_TIME_UNITS,
705            fromSegmentIndex: u16,
706            toSegmentIndex: u16,
707            channel: PS4000_CHANNEL,
708        ) -> PICO_STATUS,
709        ::libloading::Error,
710    >,
711    pub ps4000SetDataBufferBulk: Result<
712        unsafe extern "C" fn(
713            handle: i16,
714            channel: PS4000_CHANNEL,
715            buffer: *mut i16,
716            bufferLth: i32,
717            waveform: u16,
718        ) -> PICO_STATUS,
719        ::libloading::Error,
720    >,
721    pub ps4000SetDataBuffers: Result<
722        unsafe extern "C" fn(
723            handle: i16,
724            channel: PS4000_CHANNEL,
725            bufferMax: *mut i16,
726            bufferMin: *mut i16,
727            bufferLth: i32,
728        ) -> PICO_STATUS,
729        ::libloading::Error,
730    >,
731    pub ps4000SetDataBufferWithMode: Result<
732        unsafe extern "C" fn(
733            handle: i16,
734            channel: PS4000_CHANNEL,
735            buffer: *mut i16,
736            bufferLth: i32,
737            mode: RATIO_MODE,
738        ) -> PICO_STATUS,
739        ::libloading::Error,
740    >,
741    pub ps4000SetDataBuffersWithMode: Result<
742        unsafe extern "C" fn(
743            handle: i16,
744            channel: PS4000_CHANNEL,
745            bufferMax: *mut i16,
746            bufferMin: *mut i16,
747            bufferLth: i32,
748            mode: RATIO_MODE,
749        ) -> PICO_STATUS,
750        ::libloading::Error,
751    >,
752    pub ps4000SetDataBuffer: Result<
753        unsafe extern "C" fn(
754            handle: i16,
755            channel: PS4000_CHANNEL,
756            buffer: *mut i16,
757            bufferLth: i32,
758        ) -> PICO_STATUS,
759        ::libloading::Error,
760    >,
761    pub ps4000SetEtsTimeBuffer: Result<
762        unsafe extern "C" fn(handle: i16, buffer: *mut i64, bufferLth: i32) -> PICO_STATUS,
763        ::libloading::Error,
764    >,
765    pub ps4000SetEtsTimeBuffers: Result<
766        unsafe extern "C" fn(
767            handle: i16,
768            timeUpper: *mut u32,
769            timeLower: *mut u32,
770            bufferLth: i32,
771        ) -> PICO_STATUS,
772        ::libloading::Error,
773    >,
774    pub ps4000RunBlock: Result<
775        unsafe extern "C" fn(
776            handle: i16,
777            noOfPreTriggerSamples: i32,
778            noOfPostTriggerSamples: i32,
779            timebase: u32,
780            oversample: i16,
781            timeIndisposedMs: *mut i32,
782            segmentIndex: u16,
783            lpReady: ps4000BlockReady,
784            pParameter: *mut ::std::os::raw::c_void,
785        ) -> PICO_STATUS,
786        ::libloading::Error,
787    >,
788    pub ps4000RunStreaming: Result<
789        unsafe extern "C" fn(
790            handle: i16,
791            sampleInterval: *mut u32,
792            sampleIntervalTimeUnits: PS4000_TIME_UNITS,
793            maxPreTriggerSamples: u32,
794            maxPostPreTriggerSamples: u32,
795            autoStop: i16,
796            downSampleRatio: u32,
797            overviewBufferSize: u32,
798        ) -> PICO_STATUS,
799        ::libloading::Error,
800    >,
801    pub ps4000RunStreamingEx: Result<
802        unsafe extern "C" fn(
803            handle: i16,
804            sampleInterval: *mut u32,
805            sampleIntervalTimeUnits: PS4000_TIME_UNITS,
806            maxPreTriggerSamples: u32,
807            maxPostPreTriggerSamples: u32,
808            autoStop: i16,
809            downSampleRatio: u32,
810            downSampleRatioMode: i16,
811            overviewBufferSize: u32,
812        ) -> PICO_STATUS,
813        ::libloading::Error,
814    >,
815    pub ps4000IsReady: Result<
816        unsafe extern "C" fn(handle: i16, ready: *mut i16) -> PICO_STATUS,
817        ::libloading::Error,
818    >,
819    pub ps4000GetStreamingLatestValues: Result<
820        unsafe extern "C" fn(
821            handle: i16,
822            lpPs4000Ready: ps4000StreamingReady,
823            pParameter: *mut ::std::os::raw::c_void,
824        ) -> PICO_STATUS,
825        ::libloading::Error,
826    >,
827    pub ps4000NoOfStreamingValues: Result<
828        unsafe extern "C" fn(handle: i16, noOfValues: *mut u32) -> PICO_STATUS,
829        ::libloading::Error,
830    >,
831    pub ps4000GetMaxDownSampleRatio: Result<
832        unsafe extern "C" fn(
833            handle: i16,
834            noOfUnaggreatedSamples: u32,
835            maxDownSampleRatio: *mut u32,
836            downSampleRatioMode: i16,
837            segmentIndex: u16,
838        ) -> PICO_STATUS,
839        ::libloading::Error,
840    >,
841    pub ps4000GetValues: Result<
842        unsafe extern "C" fn(
843            handle: i16,
844            startIndex: u32,
845            noOfSamples: *mut u32,
846            downSampleRatio: u32,
847            downSampleRatioMode: i16,
848            segmentIndex: u16,
849            overflow: *mut i16,
850        ) -> PICO_STATUS,
851        ::libloading::Error,
852    >,
853    pub ps4000GetValuesBulk: Result<
854        unsafe extern "C" fn(
855            handle: i16,
856            noOfSamples: *mut u32,
857            fromSegmentIndex: u16,
858            toSegmentIndex: u16,
859            overflow: *mut i16,
860        ) -> PICO_STATUS,
861        ::libloading::Error,
862    >,
863    pub ps4000GetValuesAsync: Result<
864        unsafe extern "C" fn(
865            handle: i16,
866            startIndex: u32,
867            noOfSamples: u32,
868            downSampleRatio: u32,
869            downSampleRatioMode: i16,
870            segmentIndex: u16,
871            lpDataReady: *mut ::std::os::raw::c_void,
872            pParameter: *mut ::std::os::raw::c_void,
873        ) -> PICO_STATUS,
874        ::libloading::Error,
875    >,
876    pub ps4000Stop: Result<unsafe extern "C" fn(handle: i16) -> PICO_STATUS, ::libloading::Error>,
877    pub ps4000SetProbe: Result<
878        unsafe extern "C" fn(handle: i16, probe: PS4000_PROBE, range: PS4000_RANGE) -> PICO_STATUS,
879        ::libloading::Error,
880    >,
881    pub ps4000HoldOff: Result<
882        unsafe extern "C" fn(handle: i16, holdoff: u64, type_: PS4000_HOLDOFF_TYPE) -> PICO_STATUS,
883        ::libloading::Error,
884    >,
885    pub ps4000GetProbe: Result<
886        unsafe extern "C" fn(handle: i16, probe: *mut PS4000_PROBE) -> PICO_STATUS,
887        ::libloading::Error,
888    >,
889    pub ps4000GetChannelInformation: Result<
890        unsafe extern "C" fn(
891            handle: i16,
892            info: PS4000_CHANNEL_INFO,
893            probe: i32,
894            ranges: *mut i32,
895            length: *mut i32,
896            channels: i32,
897        ) -> PICO_STATUS,
898        ::libloading::Error,
899    >,
900    pub ps4000SetFrequencyCounter: Result<
901        unsafe extern "C" fn(
902            handle: i16,
903            channel: PS4000_CHANNEL,
904            enabled: i16,
905            range: PS4000_FREQUENCY_COUNTER_RANGE,
906            thresholdMajor: i16,
907            thresholdMinor: i16,
908        ) -> PICO_STATUS,
909        ::libloading::Error,
910    >,
911    pub ps4000EnumerateUnits: Result<
912        unsafe extern "C" fn(count: *mut i16, serials: *mut i8, serialLth: *mut i16) -> PICO_STATUS,
913        ::libloading::Error,
914    >,
915    pub ps4000PingUnit:
916        Result<unsafe extern "C" fn(handle: i16) -> PICO_STATUS, ::libloading::Error>,
917    pub ps4000SetBwFilter: Result<
918        unsafe extern "C" fn(handle: i16, channel: PS4000_CHANNEL, enable: i16) -> PICO_STATUS,
919        ::libloading::Error,
920    >,
921    pub ps4000TriggerWithinPreTriggerSamples:
922        Result<unsafe extern "C" fn(handle: i16, state: i16) -> PICO_STATUS, ::libloading::Error>,
923    pub ps4000GetNoOfCaptures: Result<
924        unsafe extern "C" fn(handle: i16, nCaptures: *mut u16) -> PICO_STATUS,
925        ::libloading::Error,
926    >,
927}
928impl PS4000Loader {
929    pub unsafe fn new<P>(path: P) -> Result<Self, ::libloading::Error>
930    where
931        P: AsRef<::std::ffi::OsStr>,
932    {
933        let __library = ::libloading::Library::new(path)?;
934        let ps4000ApplyFix = __library.get(b"ps4000ApplyFix\0").map(|sym| *sym);
935        let ps4000OpenUnit = __library.get(b"ps4000OpenUnit\0").map(|sym| *sym);
936        let ps4000OpenUnitAsync = __library.get(b"ps4000OpenUnitAsync\0").map(|sym| *sym);
937        let ps4000OpenUnitEx = __library.get(b"ps4000OpenUnitEx\0").map(|sym| *sym);
938        let ps4000OpenUnitAsyncEx = __library.get(b"ps4000OpenUnitAsyncEx\0").map(|sym| *sym);
939        let ps4000OpenUnitProgress = __library.get(b"ps4000OpenUnitProgress\0").map(|sym| *sym);
940        let ps4000GetUnitInfo = __library.get(b"ps4000GetUnitInfo\0").map(|sym| *sym);
941        let ps4000FlashLed = __library.get(b"ps4000FlashLed\0").map(|sym| *sym);
942        let ps4000IsLedFlashing = __library.get(b"ps4000IsLedFlashing\0").map(|sym| *sym);
943        let ps4000CloseUnit = __library.get(b"ps4000CloseUnit\0").map(|sym| *sym);
944        let ps4000MemorySegments = __library.get(b"ps4000MemorySegments\0").map(|sym| *sym);
945        let ps4000SetChannel = __library.get(b"ps4000SetChannel\0").map(|sym| *sym);
946        let ps4000SetNoOfCaptures = __library.get(b"ps4000SetNoOfCaptures\0").map(|sym| *sym);
947        let ps4000GetTimebase = __library.get(b"ps4000GetTimebase\0").map(|sym| *sym);
948        let ps4000GetTimebase2 = __library.get(b"ps4000GetTimebase2\0").map(|sym| *sym);
949        let ps4000SigGenOff = __library.get(b"ps4000SigGenOff\0").map(|sym| *sym);
950        let ps4000SetSigGenArbitrary = __library.get(b"ps4000SetSigGenArbitrary\0").map(|sym| *sym);
951        let ps4000SetSigGenBuiltIn = __library.get(b"ps4000SetSigGenBuiltIn\0").map(|sym| *sym);
952        let ps4000SigGenFrequencyToPhase = __library
953            .get(b"ps4000SigGenFrequencyToPhase\0")
954            .map(|sym| *sym);
955        let ps4000SigGenArbitraryMinMaxValues = __library
956            .get(b"ps4000SigGenArbitraryMinMaxValues\0")
957            .map(|sym| *sym);
958        let ps4000SigGenSoftwareControl = __library
959            .get(b"ps4000SigGenSoftwareControl\0")
960            .map(|sym| *sym);
961        let ps4000SetEts = __library.get(b"ps4000SetEts\0").map(|sym| *sym);
962        let ps4000SetSimpleTrigger = __library.get(b"ps4000SetSimpleTrigger\0").map(|sym| *sym);
963        let ps4000SetTriggerChannelProperties = __library
964            .get(b"ps4000SetTriggerChannelProperties\0")
965            .map(|sym| *sym);
966        let ps4000SetExtTriggerRange = __library.get(b"ps4000SetExtTriggerRange\0").map(|sym| *sym);
967        let ps4000SetTriggerChannelConditions = __library
968            .get(b"ps4000SetTriggerChannelConditions\0")
969            .map(|sym| *sym);
970        let ps4000SetTriggerChannelDirections = __library
971            .get(b"ps4000SetTriggerChannelDirections\0")
972            .map(|sym| *sym);
973        let ps4000SetTriggerDelay = __library.get(b"ps4000SetTriggerDelay\0").map(|sym| *sym);
974        let ps4000SetPulseWidthQualifier = __library
975            .get(b"ps4000SetPulseWidthQualifier\0")
976            .map(|sym| *sym);
977        let ps4000IsTriggerOrPulseWidthQualifierEnabled = __library
978            .get(b"ps4000IsTriggerOrPulseWidthQualifierEnabled\0")
979            .map(|sym| *sym);
980        let ps4000GetTriggerTimeOffset = __library
981            .get(b"ps4000GetTriggerTimeOffset\0")
982            .map(|sym| *sym);
983        let ps4000GetTriggerChannelTimeOffset = __library
984            .get(b"ps4000GetTriggerChannelTimeOffset\0")
985            .map(|sym| *sym);
986        let ps4000GetTriggerTimeOffset64 = __library
987            .get(b"ps4000GetTriggerTimeOffset64\0")
988            .map(|sym| *sym);
989        let ps4000GetTriggerChannelTimeOffset64 = __library
990            .get(b"ps4000GetTriggerChannelTimeOffset64\0")
991            .map(|sym| *sym);
992        let ps4000GetValuesTriggerTimeOffsetBulk = __library
993            .get(b"ps4000GetValuesTriggerTimeOffsetBulk\0")
994            .map(|sym| *sym);
995        let ps4000GetValuesTriggerChannelTimeOffsetBulk = __library
996            .get(b"ps4000GetValuesTriggerChannelTimeOffsetBulk\0")
997            .map(|sym| *sym);
998        let ps4000GetValuesTriggerTimeOffsetBulk64 = __library
999            .get(b"ps4000GetValuesTriggerTimeOffsetBulk64\0")
1000            .map(|sym| *sym);
1001        let ps4000GetValuesTriggerChannelTimeOffsetBulk64 = __library
1002            .get(b"ps4000GetValuesTriggerChannelTimeOffsetBulk64\0")
1003            .map(|sym| *sym);
1004        let ps4000SetDataBufferBulk = __library.get(b"ps4000SetDataBufferBulk\0").map(|sym| *sym);
1005        let ps4000SetDataBuffers = __library.get(b"ps4000SetDataBuffers\0").map(|sym| *sym);
1006        let ps4000SetDataBufferWithMode = __library
1007            .get(b"ps4000SetDataBufferWithMode\0")
1008            .map(|sym| *sym);
1009        let ps4000SetDataBuffersWithMode = __library
1010            .get(b"ps4000SetDataBuffersWithMode\0")
1011            .map(|sym| *sym);
1012        let ps4000SetDataBuffer = __library.get(b"ps4000SetDataBuffer\0").map(|sym| *sym);
1013        let ps4000SetEtsTimeBuffer = __library.get(b"ps4000SetEtsTimeBuffer\0").map(|sym| *sym);
1014        let ps4000SetEtsTimeBuffers = __library.get(b"ps4000SetEtsTimeBuffers\0").map(|sym| *sym);
1015        let ps4000RunBlock = __library.get(b"ps4000RunBlock\0").map(|sym| *sym);
1016        let ps4000RunStreaming = __library.get(b"ps4000RunStreaming\0").map(|sym| *sym);
1017        let ps4000RunStreamingEx = __library.get(b"ps4000RunStreamingEx\0").map(|sym| *sym);
1018        let ps4000IsReady = __library.get(b"ps4000IsReady\0").map(|sym| *sym);
1019        let ps4000GetStreamingLatestValues = __library
1020            .get(b"ps4000GetStreamingLatestValues\0")
1021            .map(|sym| *sym);
1022        let ps4000NoOfStreamingValues = __library
1023            .get(b"ps4000NoOfStreamingValues\0")
1024            .map(|sym| *sym);
1025        let ps4000GetMaxDownSampleRatio = __library
1026            .get(b"ps4000GetMaxDownSampleRatio\0")
1027            .map(|sym| *sym);
1028        let ps4000GetValues = __library.get(b"ps4000GetValues\0").map(|sym| *sym);
1029        let ps4000GetValuesBulk = __library.get(b"ps4000GetValuesBulk\0").map(|sym| *sym);
1030        let ps4000GetValuesAsync = __library.get(b"ps4000GetValuesAsync\0").map(|sym| *sym);
1031        let ps4000Stop = __library.get(b"ps4000Stop\0").map(|sym| *sym);
1032        let ps4000SetProbe = __library.get(b"ps4000SetProbe\0").map(|sym| *sym);
1033        let ps4000HoldOff = __library.get(b"ps4000HoldOff\0").map(|sym| *sym);
1034        let ps4000GetProbe = __library.get(b"ps4000GetProbe\0").map(|sym| *sym);
1035        let ps4000GetChannelInformation = __library
1036            .get(b"ps4000GetChannelInformation\0")
1037            .map(|sym| *sym);
1038        let ps4000SetFrequencyCounter = __library
1039            .get(b"ps4000SetFrequencyCounter\0")
1040            .map(|sym| *sym);
1041        let ps4000EnumerateUnits = __library.get(b"ps4000EnumerateUnits\0").map(|sym| *sym);
1042        let ps4000PingUnit = __library.get(b"ps4000PingUnit\0").map(|sym| *sym);
1043        let ps4000SetBwFilter = __library.get(b"ps4000SetBwFilter\0").map(|sym| *sym);
1044        let ps4000TriggerWithinPreTriggerSamples = __library
1045            .get(b"ps4000TriggerWithinPreTriggerSamples\0")
1046            .map(|sym| *sym);
1047        let ps4000GetNoOfCaptures = __library.get(b"ps4000GetNoOfCaptures\0").map(|sym| *sym);
1048        Ok(PS4000Loader {
1049            __library,
1050            ps4000ApplyFix,
1051            ps4000OpenUnit,
1052            ps4000OpenUnitAsync,
1053            ps4000OpenUnitEx,
1054            ps4000OpenUnitAsyncEx,
1055            ps4000OpenUnitProgress,
1056            ps4000GetUnitInfo,
1057            ps4000FlashLed,
1058            ps4000IsLedFlashing,
1059            ps4000CloseUnit,
1060            ps4000MemorySegments,
1061            ps4000SetChannel,
1062            ps4000SetNoOfCaptures,
1063            ps4000GetTimebase,
1064            ps4000GetTimebase2,
1065            ps4000SigGenOff,
1066            ps4000SetSigGenArbitrary,
1067            ps4000SetSigGenBuiltIn,
1068            ps4000SigGenFrequencyToPhase,
1069            ps4000SigGenArbitraryMinMaxValues,
1070            ps4000SigGenSoftwareControl,
1071            ps4000SetEts,
1072            ps4000SetSimpleTrigger,
1073            ps4000SetTriggerChannelProperties,
1074            ps4000SetExtTriggerRange,
1075            ps4000SetTriggerChannelConditions,
1076            ps4000SetTriggerChannelDirections,
1077            ps4000SetTriggerDelay,
1078            ps4000SetPulseWidthQualifier,
1079            ps4000IsTriggerOrPulseWidthQualifierEnabled,
1080            ps4000GetTriggerTimeOffset,
1081            ps4000GetTriggerChannelTimeOffset,
1082            ps4000GetTriggerTimeOffset64,
1083            ps4000GetTriggerChannelTimeOffset64,
1084            ps4000GetValuesTriggerTimeOffsetBulk,
1085            ps4000GetValuesTriggerChannelTimeOffsetBulk,
1086            ps4000GetValuesTriggerTimeOffsetBulk64,
1087            ps4000GetValuesTriggerChannelTimeOffsetBulk64,
1088            ps4000SetDataBufferBulk,
1089            ps4000SetDataBuffers,
1090            ps4000SetDataBufferWithMode,
1091            ps4000SetDataBuffersWithMode,
1092            ps4000SetDataBuffer,
1093            ps4000SetEtsTimeBuffer,
1094            ps4000SetEtsTimeBuffers,
1095            ps4000RunBlock,
1096            ps4000RunStreaming,
1097            ps4000RunStreamingEx,
1098            ps4000IsReady,
1099            ps4000GetStreamingLatestValues,
1100            ps4000NoOfStreamingValues,
1101            ps4000GetMaxDownSampleRatio,
1102            ps4000GetValues,
1103            ps4000GetValuesBulk,
1104            ps4000GetValuesAsync,
1105            ps4000Stop,
1106            ps4000SetProbe,
1107            ps4000HoldOff,
1108            ps4000GetProbe,
1109            ps4000GetChannelInformation,
1110            ps4000SetFrequencyCounter,
1111            ps4000EnumerateUnits,
1112            ps4000PingUnit,
1113            ps4000SetBwFilter,
1114            ps4000TriggerWithinPreTriggerSamples,
1115            ps4000GetNoOfCaptures,
1116        })
1117    }
1118    pub unsafe fn ps4000ApplyFix(&self, a: u32, b: u16) {
1119        let sym = self
1120            .ps4000ApplyFix
1121            .as_ref()
1122            .expect("Expected function, got error.");
1123        (sym)(a, b)
1124    }
1125    pub unsafe fn ps4000OpenUnit(&self, handle: *mut i16) -> PICO_STATUS {
1126        let sym = self
1127            .ps4000OpenUnit
1128            .as_ref()
1129            .expect("Expected function, got error.");
1130        (sym)(handle)
1131    }
1132    pub unsafe fn ps4000OpenUnitAsync(&self, status: *mut i16) -> PICO_STATUS {
1133        let sym = self
1134            .ps4000OpenUnitAsync
1135            .as_ref()
1136            .expect("Expected function, got error.");
1137        (sym)(status)
1138    }
1139    pub unsafe fn ps4000OpenUnitEx(&self, handle: *mut i16, serial: *mut i8) -> PICO_STATUS {
1140        let sym = self
1141            .ps4000OpenUnitEx
1142            .as_ref()
1143            .expect("Expected function, got error.");
1144        (sym)(handle, serial)
1145    }
1146    pub unsafe fn ps4000OpenUnitAsyncEx(&self, status: *mut i16, serial: *mut i8) -> PICO_STATUS {
1147        let sym = self
1148            .ps4000OpenUnitAsyncEx
1149            .as_ref()
1150            .expect("Expected function, got error.");
1151        (sym)(status, serial)
1152    }
1153    pub unsafe fn ps4000OpenUnitProgress(
1154        &self,
1155        handle: *mut i16,
1156        progressPercent: *mut i16,
1157        complete: *mut i16,
1158    ) -> PICO_STATUS {
1159        let sym = self
1160            .ps4000OpenUnitProgress
1161            .as_ref()
1162            .expect("Expected function, got error.");
1163        (sym)(handle, progressPercent, complete)
1164    }
1165    pub unsafe fn ps4000GetUnitInfo(
1166        &self,
1167        handle: i16,
1168        string: *mut i8,
1169        stringLength: i16,
1170        requiredSize: *mut i16,
1171        info: PICO_INFO,
1172    ) -> PICO_STATUS {
1173        let sym = self
1174            .ps4000GetUnitInfo
1175            .as_ref()
1176            .expect("Expected function, got error.");
1177        (sym)(handle, string, stringLength, requiredSize, info)
1178    }
1179    pub unsafe fn ps4000FlashLed(&self, handle: i16, start: i16) -> PICO_STATUS {
1180        let sym = self
1181            .ps4000FlashLed
1182            .as_ref()
1183            .expect("Expected function, got error.");
1184        (sym)(handle, start)
1185    }
1186    pub unsafe fn ps4000IsLedFlashing(&self, handle: i16, status: *mut i16) -> PICO_STATUS {
1187        let sym = self
1188            .ps4000IsLedFlashing
1189            .as_ref()
1190            .expect("Expected function, got error.");
1191        (sym)(handle, status)
1192    }
1193    pub unsafe fn ps4000CloseUnit(&self, handle: i16) -> PICO_STATUS {
1194        let sym = self
1195            .ps4000CloseUnit
1196            .as_ref()
1197            .expect("Expected function, got error.");
1198        (sym)(handle)
1199    }
1200    pub unsafe fn ps4000MemorySegments(
1201        &self,
1202        handle: i16,
1203        nSegments: u16,
1204        nMaxSamples: *mut i32,
1205    ) -> PICO_STATUS {
1206        let sym = self
1207            .ps4000MemorySegments
1208            .as_ref()
1209            .expect("Expected function, got error.");
1210        (sym)(handle, nSegments, nMaxSamples)
1211    }
1212    pub unsafe fn ps4000SetChannel(
1213        &self,
1214        handle: i16,
1215        channel: PS4000_CHANNEL,
1216        enabled: i16,
1217        dc: i16,
1218        range: PS4000_RANGE,
1219    ) -> PICO_STATUS {
1220        let sym = self
1221            .ps4000SetChannel
1222            .as_ref()
1223            .expect("Expected function, got error.");
1224        (sym)(handle, channel, enabled, dc, range)
1225    }
1226    pub unsafe fn ps4000SetNoOfCaptures(&self, handle: i16, nCaptures: u16) -> PICO_STATUS {
1227        let sym = self
1228            .ps4000SetNoOfCaptures
1229            .as_ref()
1230            .expect("Expected function, got error.");
1231        (sym)(handle, nCaptures)
1232    }
1233    pub unsafe fn ps4000GetTimebase(
1234        &self,
1235        handle: i16,
1236        timebase: u32,
1237        noSamples: i32,
1238        timeIntervalNanoseconds: *mut i32,
1239        oversample: i16,
1240        maxSamples: *mut i32,
1241        segmentIndex: u16,
1242    ) -> PICO_STATUS {
1243        let sym = self
1244            .ps4000GetTimebase
1245            .as_ref()
1246            .expect("Expected function, got error.");
1247        (sym)(
1248            handle,
1249            timebase,
1250            noSamples,
1251            timeIntervalNanoseconds,
1252            oversample,
1253            maxSamples,
1254            segmentIndex,
1255        )
1256    }
1257    pub unsafe fn ps4000GetTimebase2(
1258        &self,
1259        handle: i16,
1260        timebase: u32,
1261        noSamples: i32,
1262        timeIntervalNanoseconds: *mut f32,
1263        oversample: i16,
1264        maxSamples: *mut i32,
1265        segmentIndex: u16,
1266    ) -> PICO_STATUS {
1267        let sym = self
1268            .ps4000GetTimebase2
1269            .as_ref()
1270            .expect("Expected function, got error.");
1271        (sym)(
1272            handle,
1273            timebase,
1274            noSamples,
1275            timeIntervalNanoseconds,
1276            oversample,
1277            maxSamples,
1278            segmentIndex,
1279        )
1280    }
1281    pub unsafe fn ps4000SigGenOff(&self, handle: i16) -> PICO_STATUS {
1282        let sym = self
1283            .ps4000SigGenOff
1284            .as_ref()
1285            .expect("Expected function, got error.");
1286        (sym)(handle)
1287    }
1288    pub unsafe fn ps4000SetSigGenArbitrary(
1289        &self,
1290        handle: i16,
1291        offsetVoltage: i32,
1292        pkToPk: u32,
1293        startDeltaPhase: u32,
1294        stopDeltaPhase: u32,
1295        deltaPhaseIncrement: u32,
1296        dwellCount: u32,
1297        arbitraryWaveform: *mut i16,
1298        arbitraryWaveformSize: i32,
1299        sweepType: SWEEP_TYPE,
1300        operationType: i16,
1301        indexMode: INDEX_MODE,
1302        shots: u32,
1303        sweeps: u32,
1304        triggerType: SIGGEN_TRIG_TYPE,
1305        triggerSource: SIGGEN_TRIG_SOURCE,
1306        extInThreshold: i16,
1307    ) -> PICO_STATUS {
1308        let sym = self
1309            .ps4000SetSigGenArbitrary
1310            .as_ref()
1311            .expect("Expected function, got error.");
1312        (sym)(
1313            handle,
1314            offsetVoltage,
1315            pkToPk,
1316            startDeltaPhase,
1317            stopDeltaPhase,
1318            deltaPhaseIncrement,
1319            dwellCount,
1320            arbitraryWaveform,
1321            arbitraryWaveformSize,
1322            sweepType,
1323            operationType,
1324            indexMode,
1325            shots,
1326            sweeps,
1327            triggerType,
1328            triggerSource,
1329            extInThreshold,
1330        )
1331    }
1332    pub unsafe fn ps4000SetSigGenBuiltIn(
1333        &self,
1334        handle: i16,
1335        offsetVoltage: i32,
1336        pkToPk: u32,
1337        waveType: i16,
1338        startFrequency: f32,
1339        stopFrequency: f32,
1340        increment: f32,
1341        dwellTime: f32,
1342        sweepType: SWEEP_TYPE,
1343        operationType: i16,
1344        shots: u32,
1345        sweeps: u32,
1346        triggerType: SIGGEN_TRIG_TYPE,
1347        triggerSource: SIGGEN_TRIG_SOURCE,
1348        extInThreshold: i16,
1349    ) -> PICO_STATUS {
1350        let sym = self
1351            .ps4000SetSigGenBuiltIn
1352            .as_ref()
1353            .expect("Expected function, got error.");
1354        (sym)(
1355            handle,
1356            offsetVoltage,
1357            pkToPk,
1358            waveType,
1359            startFrequency,
1360            stopFrequency,
1361            increment,
1362            dwellTime,
1363            sweepType,
1364            operationType,
1365            shots,
1366            sweeps,
1367            triggerType,
1368            triggerSource,
1369            extInThreshold,
1370        )
1371    }
1372    pub unsafe fn ps4000SigGenFrequencyToPhase(
1373        &self,
1374        handle: i16,
1375        frequency: f64,
1376        indexMode: INDEX_MODE,
1377        bufferLength: u32,
1378        phase: *mut u32,
1379    ) -> PICO_STATUS {
1380        let sym = self
1381            .ps4000SigGenFrequencyToPhase
1382            .as_ref()
1383            .expect("Expected function, got error.");
1384        (sym)(handle, frequency, indexMode, bufferLength, phase)
1385    }
1386    pub unsafe fn ps4000SigGenArbitraryMinMaxValues(
1387        &self,
1388        handle: i16,
1389        minArbitraryWaveformValue: *mut i16,
1390        maxArbitraryWaveformValue: *mut i16,
1391        minArbitraryWaveformSize: *mut u32,
1392        maxArbitraryWaveformSize: *mut u32,
1393    ) -> PICO_STATUS {
1394        let sym = self
1395            .ps4000SigGenArbitraryMinMaxValues
1396            .as_ref()
1397            .expect("Expected function, got error.");
1398        (sym)(
1399            handle,
1400            minArbitraryWaveformValue,
1401            maxArbitraryWaveformValue,
1402            minArbitraryWaveformSize,
1403            maxArbitraryWaveformSize,
1404        )
1405    }
1406    pub unsafe fn ps4000SigGenSoftwareControl(&self, handle: i16, state: i16) -> PICO_STATUS {
1407        let sym = self
1408            .ps4000SigGenSoftwareControl
1409            .as_ref()
1410            .expect("Expected function, got error.");
1411        (sym)(handle, state)
1412    }
1413    pub unsafe fn ps4000SetEts(
1414        &self,
1415        handle: i16,
1416        mode: PS4000_ETS_MODE,
1417        etsCycles: i16,
1418        etsInterleave: i16,
1419        sampleTimePicoseconds: *mut i32,
1420    ) -> PICO_STATUS {
1421        let sym = self
1422            .ps4000SetEts
1423            .as_ref()
1424            .expect("Expected function, got error.");
1425        (sym)(
1426            handle,
1427            mode,
1428            etsCycles,
1429            etsInterleave,
1430            sampleTimePicoseconds,
1431        )
1432    }
1433    pub unsafe fn ps4000SetSimpleTrigger(
1434        &self,
1435        handle: i16,
1436        enable: i16,
1437        source: PS4000_CHANNEL,
1438        threshold: i16,
1439        direction: THRESHOLD_DIRECTION,
1440        delay: u32,
1441        autoTrigger_ms: i16,
1442    ) -> PICO_STATUS {
1443        let sym = self
1444            .ps4000SetSimpleTrigger
1445            .as_ref()
1446            .expect("Expected function, got error.");
1447        (sym)(
1448            handle,
1449            enable,
1450            source,
1451            threshold,
1452            direction,
1453            delay,
1454            autoTrigger_ms,
1455        )
1456    }
1457    pub unsafe fn ps4000SetTriggerChannelProperties(
1458        &self,
1459        handle: i16,
1460        channelProperties: *mut TRIGGER_CHANNEL_PROPERTIES,
1461        nChannelProperties: i16,
1462        auxOutputEnable: i16,
1463        autoTriggerMilliseconds: i32,
1464    ) -> PICO_STATUS {
1465        let sym = self
1466            .ps4000SetTriggerChannelProperties
1467            .as_ref()
1468            .expect("Expected function, got error.");
1469        (sym)(
1470            handle,
1471            channelProperties,
1472            nChannelProperties,
1473            auxOutputEnable,
1474            autoTriggerMilliseconds,
1475        )
1476    }
1477    pub unsafe fn ps4000SetExtTriggerRange(
1478        &self,
1479        handle: i16,
1480        extRange: PS4000_RANGE,
1481    ) -> PICO_STATUS {
1482        let sym = self
1483            .ps4000SetExtTriggerRange
1484            .as_ref()
1485            .expect("Expected function, got error.");
1486        (sym)(handle, extRange)
1487    }
1488    pub unsafe fn ps4000SetTriggerChannelConditions(
1489        &self,
1490        handle: i16,
1491        conditions: *mut TRIGGER_CONDITIONS,
1492        nConditions: i16,
1493    ) -> PICO_STATUS {
1494        let sym = self
1495            .ps4000SetTriggerChannelConditions
1496            .as_ref()
1497            .expect("Expected function, got error.");
1498        (sym)(handle, conditions, nConditions)
1499    }
1500    pub unsafe fn ps4000SetTriggerChannelDirections(
1501        &self,
1502        handle: i16,
1503        channelA: THRESHOLD_DIRECTION,
1504        channelB: THRESHOLD_DIRECTION,
1505        channelC: THRESHOLD_DIRECTION,
1506        channelD: THRESHOLD_DIRECTION,
1507        ext: THRESHOLD_DIRECTION,
1508        aux: THRESHOLD_DIRECTION,
1509    ) -> PICO_STATUS {
1510        let sym = self
1511            .ps4000SetTriggerChannelDirections
1512            .as_ref()
1513            .expect("Expected function, got error.");
1514        (sym)(handle, channelA, channelB, channelC, channelD, ext, aux)
1515    }
1516    pub unsafe fn ps4000SetTriggerDelay(&self, handle: i16, delay: u32) -> PICO_STATUS {
1517        let sym = self
1518            .ps4000SetTriggerDelay
1519            .as_ref()
1520            .expect("Expected function, got error.");
1521        (sym)(handle, delay)
1522    }
1523    pub unsafe fn ps4000SetPulseWidthQualifier(
1524        &self,
1525        handle: i16,
1526        conditions: *mut PWQ_CONDITIONS,
1527        nConditions: i16,
1528        direction: THRESHOLD_DIRECTION,
1529        lower: u32,
1530        upper: u32,
1531        type_: PULSE_WIDTH_TYPE,
1532    ) -> PICO_STATUS {
1533        let sym = self
1534            .ps4000SetPulseWidthQualifier
1535            .as_ref()
1536            .expect("Expected function, got error.");
1537        (sym)(
1538            handle,
1539            conditions,
1540            nConditions,
1541            direction,
1542            lower,
1543            upper,
1544            type_,
1545        )
1546    }
1547    pub unsafe fn ps4000IsTriggerOrPulseWidthQualifierEnabled(
1548        &self,
1549        handle: i16,
1550        triggerEnabled: *mut i16,
1551        pulseWidthQualifierEnabled: *mut i16,
1552    ) -> PICO_STATUS {
1553        let sym = self
1554            .ps4000IsTriggerOrPulseWidthQualifierEnabled
1555            .as_ref()
1556            .expect("Expected function, got error.");
1557        (sym)(handle, triggerEnabled, pulseWidthQualifierEnabled)
1558    }
1559    pub unsafe fn ps4000GetTriggerTimeOffset(
1560        &self,
1561        handle: i16,
1562        timeUpper: *mut u32,
1563        timeLower: *mut u32,
1564        timeUnits: *mut PS4000_TIME_UNITS,
1565        segmentIndex: u16,
1566    ) -> PICO_STATUS {
1567        let sym = self
1568            .ps4000GetTriggerTimeOffset
1569            .as_ref()
1570            .expect("Expected function, got error.");
1571        (sym)(handle, timeUpper, timeLower, timeUnits, segmentIndex)
1572    }
1573    pub unsafe fn ps4000GetTriggerChannelTimeOffset(
1574        &self,
1575        handle: i16,
1576        timeUpper: *mut u32,
1577        timeLower: *mut u32,
1578        timeUnits: *mut PS4000_TIME_UNITS,
1579        segmentIndex: u16,
1580        channel: PS4000_CHANNEL,
1581    ) -> PICO_STATUS {
1582        let sym = self
1583            .ps4000GetTriggerChannelTimeOffset
1584            .as_ref()
1585            .expect("Expected function, got error.");
1586        (sym)(
1587            handle,
1588            timeUpper,
1589            timeLower,
1590            timeUnits,
1591            segmentIndex,
1592            channel,
1593        )
1594    }
1595    pub unsafe fn ps4000GetTriggerTimeOffset64(
1596        &self,
1597        handle: i16,
1598        time: *mut i64,
1599        timeUnits: *mut PS4000_TIME_UNITS,
1600        segmentIndex: u16,
1601    ) -> PICO_STATUS {
1602        let sym = self
1603            .ps4000GetTriggerTimeOffset64
1604            .as_ref()
1605            .expect("Expected function, got error.");
1606        (sym)(handle, time, timeUnits, segmentIndex)
1607    }
1608    pub unsafe fn ps4000GetTriggerChannelTimeOffset64(
1609        &self,
1610        handle: i16,
1611        time: *mut i64,
1612        timeUnits: *mut PS4000_TIME_UNITS,
1613        segmentIndex: u16,
1614        channel: PS4000_CHANNEL,
1615    ) -> PICO_STATUS {
1616        let sym = self
1617            .ps4000GetTriggerChannelTimeOffset64
1618            .as_ref()
1619            .expect("Expected function, got error.");
1620        (sym)(handle, time, timeUnits, segmentIndex, channel)
1621    }
1622    pub unsafe fn ps4000GetValuesTriggerTimeOffsetBulk(
1623        &self,
1624        handle: i16,
1625        timesUpper: *mut u32,
1626        timesLower: *mut u32,
1627        timeUnits: *mut PS4000_TIME_UNITS,
1628        fromSegmentIndex: u16,
1629        toSegmentIndex: u16,
1630    ) -> PICO_STATUS {
1631        let sym = self
1632            .ps4000GetValuesTriggerTimeOffsetBulk
1633            .as_ref()
1634            .expect("Expected function, got error.");
1635        (sym)(
1636            handle,
1637            timesUpper,
1638            timesLower,
1639            timeUnits,
1640            fromSegmentIndex,
1641            toSegmentIndex,
1642        )
1643    }
1644    pub unsafe fn ps4000GetValuesTriggerChannelTimeOffsetBulk(
1645        &self,
1646        handle: i16,
1647        timesUpper: *mut u32,
1648        timesLower: *mut u32,
1649        timeUnits: *mut PS4000_TIME_UNITS,
1650        fromSegmentIndex: u16,
1651        toSegmentIndex: u16,
1652        channel: PS4000_CHANNEL,
1653    ) -> PICO_STATUS {
1654        let sym = self
1655            .ps4000GetValuesTriggerChannelTimeOffsetBulk
1656            .as_ref()
1657            .expect("Expected function, got error.");
1658        (sym)(
1659            handle,
1660            timesUpper,
1661            timesLower,
1662            timeUnits,
1663            fromSegmentIndex,
1664            toSegmentIndex,
1665            channel,
1666        )
1667    }
1668    pub unsafe fn ps4000GetValuesTriggerTimeOffsetBulk64(
1669        &self,
1670        handle: i16,
1671        times: *mut i64,
1672        timeUnits: *mut PS4000_TIME_UNITS,
1673        fromSegmentIndex: u16,
1674        toSegmentIndex: u16,
1675    ) -> PICO_STATUS {
1676        let sym = self
1677            .ps4000GetValuesTriggerTimeOffsetBulk64
1678            .as_ref()
1679            .expect("Expected function, got error.");
1680        (sym)(handle, times, timeUnits, fromSegmentIndex, toSegmentIndex)
1681    }
1682    pub unsafe fn ps4000GetValuesTriggerChannelTimeOffsetBulk64(
1683        &self,
1684        handle: i16,
1685        times: *mut i64,
1686        timeUnits: *mut PS4000_TIME_UNITS,
1687        fromSegmentIndex: u16,
1688        toSegmentIndex: u16,
1689        channel: PS4000_CHANNEL,
1690    ) -> PICO_STATUS {
1691        let sym = self
1692            .ps4000GetValuesTriggerChannelTimeOffsetBulk64
1693            .as_ref()
1694            .expect("Expected function, got error.");
1695        (sym)(
1696            handle,
1697            times,
1698            timeUnits,
1699            fromSegmentIndex,
1700            toSegmentIndex,
1701            channel,
1702        )
1703    }
1704    pub unsafe fn ps4000SetDataBufferBulk(
1705        &self,
1706        handle: i16,
1707        channel: PS4000_CHANNEL,
1708        buffer: *mut i16,
1709        bufferLth: i32,
1710        waveform: u16,
1711    ) -> PICO_STATUS {
1712        let sym = self
1713            .ps4000SetDataBufferBulk
1714            .as_ref()
1715            .expect("Expected function, got error.");
1716        (sym)(handle, channel, buffer, bufferLth, waveform)
1717    }
1718    pub unsafe fn ps4000SetDataBuffers(
1719        &self,
1720        handle: i16,
1721        channel: PS4000_CHANNEL,
1722        bufferMax: *mut i16,
1723        bufferMin: *mut i16,
1724        bufferLth: i32,
1725    ) -> PICO_STATUS {
1726        let sym = self
1727            .ps4000SetDataBuffers
1728            .as_ref()
1729            .expect("Expected function, got error.");
1730        (sym)(handle, channel, bufferMax, bufferMin, bufferLth)
1731    }
1732    pub unsafe fn ps4000SetDataBufferWithMode(
1733        &self,
1734        handle: i16,
1735        channel: PS4000_CHANNEL,
1736        buffer: *mut i16,
1737        bufferLth: i32,
1738        mode: RATIO_MODE,
1739    ) -> PICO_STATUS {
1740        let sym = self
1741            .ps4000SetDataBufferWithMode
1742            .as_ref()
1743            .expect("Expected function, got error.");
1744        (sym)(handle, channel, buffer, bufferLth, mode)
1745    }
1746    pub unsafe fn ps4000SetDataBuffersWithMode(
1747        &self,
1748        handle: i16,
1749        channel: PS4000_CHANNEL,
1750        bufferMax: *mut i16,
1751        bufferMin: *mut i16,
1752        bufferLth: i32,
1753        mode: RATIO_MODE,
1754    ) -> PICO_STATUS {
1755        let sym = self
1756            .ps4000SetDataBuffersWithMode
1757            .as_ref()
1758            .expect("Expected function, got error.");
1759        (sym)(handle, channel, bufferMax, bufferMin, bufferLth, mode)
1760    }
1761    pub unsafe fn ps4000SetDataBuffer(
1762        &self,
1763        handle: i16,
1764        channel: PS4000_CHANNEL,
1765        buffer: *mut i16,
1766        bufferLth: i32,
1767    ) -> PICO_STATUS {
1768        let sym = self
1769            .ps4000SetDataBuffer
1770            .as_ref()
1771            .expect("Expected function, got error.");
1772        (sym)(handle, channel, buffer, bufferLth)
1773    }
1774    pub unsafe fn ps4000SetEtsTimeBuffer(
1775        &self,
1776        handle: i16,
1777        buffer: *mut i64,
1778        bufferLth: i32,
1779    ) -> PICO_STATUS {
1780        let sym = self
1781            .ps4000SetEtsTimeBuffer
1782            .as_ref()
1783            .expect("Expected function, got error.");
1784        (sym)(handle, buffer, bufferLth)
1785    }
1786    pub unsafe fn ps4000SetEtsTimeBuffers(
1787        &self,
1788        handle: i16,
1789        timeUpper: *mut u32,
1790        timeLower: *mut u32,
1791        bufferLth: i32,
1792    ) -> PICO_STATUS {
1793        let sym = self
1794            .ps4000SetEtsTimeBuffers
1795            .as_ref()
1796            .expect("Expected function, got error.");
1797        (sym)(handle, timeUpper, timeLower, bufferLth)
1798    }
1799    pub unsafe fn ps4000RunBlock(
1800        &self,
1801        handle: i16,
1802        noOfPreTriggerSamples: i32,
1803        noOfPostTriggerSamples: i32,
1804        timebase: u32,
1805        oversample: i16,
1806        timeIndisposedMs: *mut i32,
1807        segmentIndex: u16,
1808        lpReady: ps4000BlockReady,
1809        pParameter: *mut ::std::os::raw::c_void,
1810    ) -> PICO_STATUS {
1811        let sym = self
1812            .ps4000RunBlock
1813            .as_ref()
1814            .expect("Expected function, got error.");
1815        (sym)(
1816            handle,
1817            noOfPreTriggerSamples,
1818            noOfPostTriggerSamples,
1819            timebase,
1820            oversample,
1821            timeIndisposedMs,
1822            segmentIndex,
1823            lpReady,
1824            pParameter,
1825        )
1826    }
1827    pub unsafe fn ps4000RunStreaming(
1828        &self,
1829        handle: i16,
1830        sampleInterval: *mut u32,
1831        sampleIntervalTimeUnits: PS4000_TIME_UNITS,
1832        maxPreTriggerSamples: u32,
1833        maxPostPreTriggerSamples: u32,
1834        autoStop: i16,
1835        downSampleRatio: u32,
1836        overviewBufferSize: u32,
1837    ) -> PICO_STATUS {
1838        let sym = self
1839            .ps4000RunStreaming
1840            .as_ref()
1841            .expect("Expected function, got error.");
1842        (sym)(
1843            handle,
1844            sampleInterval,
1845            sampleIntervalTimeUnits,
1846            maxPreTriggerSamples,
1847            maxPostPreTriggerSamples,
1848            autoStop,
1849            downSampleRatio,
1850            overviewBufferSize,
1851        )
1852    }
1853    pub unsafe fn ps4000RunStreamingEx(
1854        &self,
1855        handle: i16,
1856        sampleInterval: *mut u32,
1857        sampleIntervalTimeUnits: PS4000_TIME_UNITS,
1858        maxPreTriggerSamples: u32,
1859        maxPostPreTriggerSamples: u32,
1860        autoStop: i16,
1861        downSampleRatio: u32,
1862        downSampleRatioMode: i16,
1863        overviewBufferSize: u32,
1864    ) -> PICO_STATUS {
1865        let sym = self
1866            .ps4000RunStreamingEx
1867            .as_ref()
1868            .expect("Expected function, got error.");
1869        (sym)(
1870            handle,
1871            sampleInterval,
1872            sampleIntervalTimeUnits,
1873            maxPreTriggerSamples,
1874            maxPostPreTriggerSamples,
1875            autoStop,
1876            downSampleRatio,
1877            downSampleRatioMode,
1878            overviewBufferSize,
1879        )
1880    }
1881    pub unsafe fn ps4000IsReady(&self, handle: i16, ready: *mut i16) -> PICO_STATUS {
1882        let sym = self
1883            .ps4000IsReady
1884            .as_ref()
1885            .expect("Expected function, got error.");
1886        (sym)(handle, ready)
1887    }
1888    pub unsafe fn ps4000GetStreamingLatestValues(
1889        &self,
1890        handle: i16,
1891        lpPs4000Ready: ps4000StreamingReady,
1892        pParameter: *mut ::std::os::raw::c_void,
1893    ) -> PICO_STATUS {
1894        let sym = self
1895            .ps4000GetStreamingLatestValues
1896            .as_ref()
1897            .expect("Expected function, got error.");
1898        (sym)(handle, lpPs4000Ready, pParameter)
1899    }
1900    pub unsafe fn ps4000NoOfStreamingValues(
1901        &self,
1902        handle: i16,
1903        noOfValues: *mut u32,
1904    ) -> PICO_STATUS {
1905        let sym = self
1906            .ps4000NoOfStreamingValues
1907            .as_ref()
1908            .expect("Expected function, got error.");
1909        (sym)(handle, noOfValues)
1910    }
1911    pub unsafe fn ps4000GetMaxDownSampleRatio(
1912        &self,
1913        handle: i16,
1914        noOfUnaggreatedSamples: u32,
1915        maxDownSampleRatio: *mut u32,
1916        downSampleRatioMode: i16,
1917        segmentIndex: u16,
1918    ) -> PICO_STATUS {
1919        let sym = self
1920            .ps4000GetMaxDownSampleRatio
1921            .as_ref()
1922            .expect("Expected function, got error.");
1923        (sym)(
1924            handle,
1925            noOfUnaggreatedSamples,
1926            maxDownSampleRatio,
1927            downSampleRatioMode,
1928            segmentIndex,
1929        )
1930    }
1931    pub unsafe fn ps4000GetValues(
1932        &self,
1933        handle: i16,
1934        startIndex: u32,
1935        noOfSamples: *mut u32,
1936        downSampleRatio: u32,
1937        downSampleRatioMode: i16,
1938        segmentIndex: u16,
1939        overflow: *mut i16,
1940    ) -> PICO_STATUS {
1941        let sym = self
1942            .ps4000GetValues
1943            .as_ref()
1944            .expect("Expected function, got error.");
1945        (sym)(
1946            handle,
1947            startIndex,
1948            noOfSamples,
1949            downSampleRatio,
1950            downSampleRatioMode,
1951            segmentIndex,
1952            overflow,
1953        )
1954    }
1955    pub unsafe fn ps4000GetValuesBulk(
1956        &self,
1957        handle: i16,
1958        noOfSamples: *mut u32,
1959        fromSegmentIndex: u16,
1960        toSegmentIndex: u16,
1961        overflow: *mut i16,
1962    ) -> PICO_STATUS {
1963        let sym = self
1964            .ps4000GetValuesBulk
1965            .as_ref()
1966            .expect("Expected function, got error.");
1967        (sym)(
1968            handle,
1969            noOfSamples,
1970            fromSegmentIndex,
1971            toSegmentIndex,
1972            overflow,
1973        )
1974    }
1975    pub unsafe fn ps4000GetValuesAsync(
1976        &self,
1977        handle: i16,
1978        startIndex: u32,
1979        noOfSamples: u32,
1980        downSampleRatio: u32,
1981        downSampleRatioMode: i16,
1982        segmentIndex: u16,
1983        lpDataReady: *mut ::std::os::raw::c_void,
1984        pParameter: *mut ::std::os::raw::c_void,
1985    ) -> PICO_STATUS {
1986        let sym = self
1987            .ps4000GetValuesAsync
1988            .as_ref()
1989            .expect("Expected function, got error.");
1990        (sym)(
1991            handle,
1992            startIndex,
1993            noOfSamples,
1994            downSampleRatio,
1995            downSampleRatioMode,
1996            segmentIndex,
1997            lpDataReady,
1998            pParameter,
1999        )
2000    }
2001    pub unsafe fn ps4000Stop(&self, handle: i16) -> PICO_STATUS {
2002        let sym = self
2003            .ps4000Stop
2004            .as_ref()
2005            .expect("Expected function, got error.");
2006        (sym)(handle)
2007    }
2008    pub unsafe fn ps4000SetProbe(
2009        &self,
2010        handle: i16,
2011        probe: PS4000_PROBE,
2012        range: PS4000_RANGE,
2013    ) -> PICO_STATUS {
2014        let sym = self
2015            .ps4000SetProbe
2016            .as_ref()
2017            .expect("Expected function, got error.");
2018        (sym)(handle, probe, range)
2019    }
2020    pub unsafe fn ps4000HoldOff(
2021        &self,
2022        handle: i16,
2023        holdoff: u64,
2024        type_: PS4000_HOLDOFF_TYPE,
2025    ) -> PICO_STATUS {
2026        let sym = self
2027            .ps4000HoldOff
2028            .as_ref()
2029            .expect("Expected function, got error.");
2030        (sym)(handle, holdoff, type_)
2031    }
2032    pub unsafe fn ps4000GetProbe(&self, handle: i16, probe: *mut PS4000_PROBE) -> PICO_STATUS {
2033        let sym = self
2034            .ps4000GetProbe
2035            .as_ref()
2036            .expect("Expected function, got error.");
2037        (sym)(handle, probe)
2038    }
2039    pub unsafe fn ps4000GetChannelInformation(
2040        &self,
2041        handle: i16,
2042        info: PS4000_CHANNEL_INFO,
2043        probe: i32,
2044        ranges: *mut i32,
2045        length: *mut i32,
2046        channels: i32,
2047    ) -> PICO_STATUS {
2048        let sym = self
2049            .ps4000GetChannelInformation
2050            .as_ref()
2051            .expect("Expected function, got error.");
2052        (sym)(handle, info, probe, ranges, length, channels)
2053    }
2054    pub unsafe fn ps4000SetFrequencyCounter(
2055        &self,
2056        handle: i16,
2057        channel: PS4000_CHANNEL,
2058        enabled: i16,
2059        range: PS4000_FREQUENCY_COUNTER_RANGE,
2060        thresholdMajor: i16,
2061        thresholdMinor: i16,
2062    ) -> PICO_STATUS {
2063        let sym = self
2064            .ps4000SetFrequencyCounter
2065            .as_ref()
2066            .expect("Expected function, got error.");
2067        (sym)(
2068            handle,
2069            channel,
2070            enabled,
2071            range,
2072            thresholdMajor,
2073            thresholdMinor,
2074        )
2075    }
2076    pub unsafe fn ps4000EnumerateUnits(
2077        &self,
2078        count: *mut i16,
2079        serials: *mut i8,
2080        serialLth: *mut i16,
2081    ) -> PICO_STATUS {
2082        let sym = self
2083            .ps4000EnumerateUnits
2084            .as_ref()
2085            .expect("Expected function, got error.");
2086        (sym)(count, serials, serialLth)
2087    }
2088    pub unsafe fn ps4000PingUnit(&self, handle: i16) -> PICO_STATUS {
2089        let sym = self
2090            .ps4000PingUnit
2091            .as_ref()
2092            .expect("Expected function, got error.");
2093        (sym)(handle)
2094    }
2095    pub unsafe fn ps4000SetBwFilter(
2096        &self,
2097        handle: i16,
2098        channel: PS4000_CHANNEL,
2099        enable: i16,
2100    ) -> PICO_STATUS {
2101        let sym = self
2102            .ps4000SetBwFilter
2103            .as_ref()
2104            .expect("Expected function, got error.");
2105        (sym)(handle, channel, enable)
2106    }
2107    pub unsafe fn ps4000TriggerWithinPreTriggerSamples(
2108        &self,
2109        handle: i16,
2110        state: i16,
2111    ) -> PICO_STATUS {
2112        let sym = self
2113            .ps4000TriggerWithinPreTriggerSamples
2114            .as_ref()
2115            .expect("Expected function, got error.");
2116        (sym)(handle, state)
2117    }
2118    pub unsafe fn ps4000GetNoOfCaptures(&self, handle: i16, nCaptures: *mut u16) -> PICO_STATUS {
2119        let sym = self
2120            .ps4000GetNoOfCaptures
2121            .as_ref()
2122            .expect("Expected function, got error.");
2123        (sym)(handle, nCaptures)
2124    }
2125}