1#[repr(C)]
4#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
5pub struct __BindgenBitfieldUnit<Storage> {
6 storage: Storage,
7}
8impl<Storage> __BindgenBitfieldUnit<Storage> {
9 #[inline]
10 pub const fn new(storage: Storage) -> Self {
11 Self { storage }
12 }
13}
14impl<Storage> __BindgenBitfieldUnit<Storage>
15where
16 Storage: AsRef<[u8]> + AsMut<[u8]>,
17{
18 #[inline]
19 pub fn get_bit(&self, index: usize) -> bool {
20 debug_assert!(index / 8 < self.storage.as_ref().len());
21 let byte_index = index / 8;
22 let byte = self.storage.as_ref()[byte_index];
23 let bit_index = if cfg!(target_endian = "big") {
24 7 - (index % 8)
25 } else {
26 index % 8
27 };
28 let mask = 1 << bit_index;
29 byte & mask == mask
30 }
31 #[inline]
32 pub fn set_bit(&mut self, index: usize, val: bool) {
33 debug_assert!(index / 8 < self.storage.as_ref().len());
34 let byte_index = index / 8;
35 let byte = &mut self.storage.as_mut()[byte_index];
36 let bit_index = if cfg!(target_endian = "big") {
37 7 - (index % 8)
38 } else {
39 index % 8
40 };
41 let mask = 1 << bit_index;
42 if val {
43 *byte |= mask;
44 } else {
45 *byte &= !mask;
46 }
47 }
48 #[inline]
49 pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
50 debug_assert!(bit_width <= 64);
51 debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
52 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
53 let mut val = 0;
54 for i in 0..(bit_width as usize) {
55 if self.get_bit(i + bit_offset) {
56 let index = if cfg!(target_endian = "big") {
57 bit_width as usize - 1 - i
58 } else {
59 i
60 };
61 val |= 1 << index;
62 }
63 }
64 val
65 }
66 #[inline]
67 pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
68 debug_assert!(bit_width <= 64);
69 debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
70 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
71 for i in 0..(bit_width as usize) {
72 let mask = 1 << i;
73 let val_bit_is_set = val & mask == mask;
74 let index = if cfg!(target_endian = "big") {
75 bit_width as usize - 1 - i
76 } else {
77 i
78 };
79 self.set_bit(index + bit_offset, val_bit_is_set);
80 }
81 }
82}
83pub const FT_OPEN_BY_SERIAL_NUMBER: u32 = 1;
84pub const FT_OPEN_BY_DESCRIPTION: u32 = 2;
85pub const FT_OPEN_BY_LOCATION: u32 = 4;
86pub const FT_OPEN_MASK: u32 = 7;
87pub const FT_LIST_NUMBER_ONLY: u32 = 2147483648;
88pub const FT_LIST_BY_INDEX: u32 = 1073741824;
89pub const FT_LIST_ALL: u32 = 536870912;
90pub const FT_LIST_MASK: u32 = 3758096384;
91pub const FT_BAUD_300: u32 = 300;
92pub const FT_BAUD_600: u32 = 600;
93pub const FT_BAUD_1200: u32 = 1200;
94pub const FT_BAUD_2400: u32 = 2400;
95pub const FT_BAUD_4800: u32 = 4800;
96pub const FT_BAUD_9600: u32 = 9600;
97pub const FT_BAUD_14400: u32 = 14400;
98pub const FT_BAUD_19200: u32 = 19200;
99pub const FT_BAUD_38400: u32 = 38400;
100pub const FT_BAUD_57600: u32 = 57600;
101pub const FT_BAUD_115200: u32 = 115200;
102pub const FT_BAUD_230400: u32 = 230400;
103pub const FT_BAUD_460800: u32 = 460800;
104pub const FT_BAUD_921600: u32 = 921600;
105pub const FT_FLOW_NONE: u32 = 0;
106pub const FT_FLOW_RTS_CTS: u32 = 256;
107pub const FT_FLOW_DTR_DSR: u32 = 512;
108pub const FT_FLOW_XON_XOFF: u32 = 1024;
109pub const FT_PURGE_RX: u32 = 1;
110pub const FT_PURGE_TX: u32 = 2;
111pub const FT_EVENT_RXCHAR: u32 = 1;
112pub const FT_EVENT_MODEM_STATUS: u32 = 2;
113pub const FT_EVENT_LINE_STATUS: u32 = 4;
114pub const FT_DEFAULT_RX_TIMEOUT: u32 = 300;
115pub const FT_DEFAULT_TX_TIMEOUT: u32 = 300;
116pub const FT_BITMODE_RESET: u32 = 0;
117pub const FT_BITMODE_ASYNC_BITBANG: u32 = 1;
118pub const FT_BITMODE_MPSSE: u32 = 2;
119pub const FT_BITMODE_SYNC_BITBANG: u32 = 4;
120pub const FT_BITMODE_MCU_HOST: u32 = 8;
121pub const FT_BITMODE_FAST_SERIAL: u32 = 16;
122pub const FT_BITMODE_CBUS_BITBANG: u32 = 32;
123pub const FT_BITMODE_SYNC_FIFO: u32 = 64;
124pub const FT_232R_CBUS_TXDEN: u32 = 0;
125pub const FT_232R_CBUS_PWRON: u32 = 1;
126pub const FT_232R_CBUS_RXLED: u32 = 2;
127pub const FT_232R_CBUS_TXLED: u32 = 3;
128pub const FT_232R_CBUS_TXRXLED: u32 = 4;
129pub const FT_232R_CBUS_SLEEP: u32 = 5;
130pub const FT_232R_CBUS_CLK48: u32 = 6;
131pub const FT_232R_CBUS_CLK24: u32 = 7;
132pub const FT_232R_CBUS_CLK12: u32 = 8;
133pub const FT_232R_CBUS_CLK6: u32 = 9;
134pub const FT_232R_CBUS_IOMODE: u32 = 10;
135pub const FT_232R_CBUS_BITBANG_WR: u32 = 11;
136pub const FT_232R_CBUS_BITBANG_RD: u32 = 12;
137pub const FT_232H_CBUS_TRISTATE: u32 = 0;
138pub const FT_232H_CBUS_TXLED: u32 = 1;
139pub const FT_232H_CBUS_RXLED: u32 = 2;
140pub const FT_232H_CBUS_TXRXLED: u32 = 3;
141pub const FT_232H_CBUS_PWREN: u32 = 4;
142pub const FT_232H_CBUS_SLEEP: u32 = 5;
143pub const FT_232H_CBUS_DRIVE_0: u32 = 6;
144pub const FT_232H_CBUS_DRIVE_1: u32 = 7;
145pub const FT_232H_CBUS_IOMODE: u32 = 8;
146pub const FT_232H_CBUS_TXDEN: u32 = 9;
147pub const FT_232H_CBUS_CLK30: u32 = 10;
148pub const FT_232H_CBUS_CLK15: u32 = 11;
149pub const FT_232H_CBUS_CLK7_5: u32 = 12;
150pub const FT_X_SERIES_CBUS_TRISTATE: u32 = 0;
151pub const FT_X_SERIES_CBUS_TXLED: u32 = 1;
152pub const FT_X_SERIES_CBUS_RXLED: u32 = 2;
153pub const FT_X_SERIES_CBUS_TXRXLED: u32 = 3;
154pub const FT_X_SERIES_CBUS_PWREN: u32 = 4;
155pub const FT_X_SERIES_CBUS_SLEEP: u32 = 5;
156pub const FT_X_SERIES_CBUS_DRIVE_0: u32 = 6;
157pub const FT_X_SERIES_CBUS_DRIVE_1: u32 = 7;
158pub const FT_X_SERIES_CBUS_IOMODE: u32 = 8;
159pub const FT_X_SERIES_CBUS_TXDEN: u32 = 9;
160pub const FT_X_SERIES_CBUS_CLK24: u32 = 10;
161pub const FT_X_SERIES_CBUS_CLK12: u32 = 11;
162pub const FT_X_SERIES_CBUS_CLK6: u32 = 12;
163pub const FT_X_SERIES_CBUS_BCD_CHARGER: u32 = 13;
164pub const FT_X_SERIES_CBUS_BCD_CHARGER_N: u32 = 14;
165pub const FT_X_SERIES_CBUS_I2C_TXE: u32 = 15;
166pub const FT_X_SERIES_CBUS_I2C_RXF: u32 = 16;
167pub const FT_X_SERIES_CBUS_VBUS_SENSE: u32 = 17;
168pub const FT_X_SERIES_CBUS_BITBANG_WR: u32 = 18;
169pub const FT_X_SERIES_CBUS_BITBANG_RD: u32 = 19;
170pub const FT_X_SERIES_CBUS_TIMESTAMP: u32 = 20;
171pub const FT_X_SERIES_CBUS_KEEP_AWAKE: u32 = 21;
172pub const FT_DRIVER_TYPE_D2XX: u32 = 0;
173pub const FT_DRIVER_TYPE_VCP: u32 = 1;
174pub type DWORD = ::std::os::raw::c_uint;
175pub type ULONG = ::std::os::raw::c_uint;
176pub type USHORT = ::std::os::raw::c_ushort;
177pub type UCHAR = ::std::os::raw::c_uchar;
178pub type WORD = ::std::os::raw::c_ushort;
179pub type BYTE = ::std::os::raw::c_uchar;
180pub type BOOL = ::std::os::raw::c_uint;
181pub type CHAR = ::std::os::raw::c_uchar;
182pub type PUCHAR = *mut UCHAR;
183pub type PCHAR = *mut ::std::os::raw::c_char;
184pub type PVOID = *mut ::std::os::raw::c_void;
185pub type HANDLE = *mut ::std::os::raw::c_void;
186pub type LONG = ::std::os::raw::c_uint;
187pub type UINT = ::std::os::raw::c_uint;
188pub type LPCTSTR = *const ::std::os::raw::c_char;
189pub type LPDWORD = *mut DWORD;
190pub type LPWORD = *mut WORD;
191pub type PULONG = *mut ULONG;
192pub type LPLONG = *mut LONG;
193pub type LPVOID = PVOID;
194#[repr(C)]
195#[derive(Copy, Clone)]
196pub struct _OVERLAPPED {
197 pub Internal: DWORD,
198 pub InternalHigh: DWORD,
199 pub __bindgen_anon_1: _OVERLAPPED__bindgen_ty_1,
200 pub hEvent: HANDLE,
201}
202#[repr(C)]
203#[derive(Copy, Clone)]
204pub union _OVERLAPPED__bindgen_ty_1 {
205 pub __bindgen_anon_1: _OVERLAPPED__bindgen_ty_1__bindgen_ty_1,
206 pub Pointer: PVOID,
207}
208#[repr(C)]
209#[derive(Debug, Copy, Clone)]
210pub struct _OVERLAPPED__bindgen_ty_1__bindgen_ty_1 {
211 pub Offset: DWORD,
212 pub OffsetHigh: DWORD,
213}
214#[test]
215fn bindgen_test_layout__OVERLAPPED__bindgen_ty_1__bindgen_ty_1() {
216 assert_eq!(
217 ::std::mem::size_of::<_OVERLAPPED__bindgen_ty_1__bindgen_ty_1>(),
218 8usize,
219 concat!(
220 "Size of: ",
221 stringify!(_OVERLAPPED__bindgen_ty_1__bindgen_ty_1)
222 )
223 );
224 assert_eq!(
225 ::std::mem::align_of::<_OVERLAPPED__bindgen_ty_1__bindgen_ty_1>(),
226 4usize,
227 concat!(
228 "Alignment of ",
229 stringify!(_OVERLAPPED__bindgen_ty_1__bindgen_ty_1)
230 )
231 );
232 assert_eq!(
233 unsafe {
234 &(*(::std::ptr::null::<_OVERLAPPED__bindgen_ty_1__bindgen_ty_1>())).Offset as *const _
235 as usize
236 },
237 0usize,
238 concat!(
239 "Offset of field: ",
240 stringify!(_OVERLAPPED__bindgen_ty_1__bindgen_ty_1),
241 "::",
242 stringify!(Offset)
243 )
244 );
245 assert_eq!(
246 unsafe {
247 &(*(::std::ptr::null::<_OVERLAPPED__bindgen_ty_1__bindgen_ty_1>())).OffsetHigh
248 as *const _ as usize
249 },
250 4usize,
251 concat!(
252 "Offset of field: ",
253 stringify!(_OVERLAPPED__bindgen_ty_1__bindgen_ty_1),
254 "::",
255 stringify!(OffsetHigh)
256 )
257 );
258}
259#[test]
260fn bindgen_test_layout__OVERLAPPED__bindgen_ty_1() {
261 assert_eq!(
262 ::std::mem::size_of::<_OVERLAPPED__bindgen_ty_1>(),
263 8usize,
264 concat!("Size of: ", stringify!(_OVERLAPPED__bindgen_ty_1))
265 );
266 assert_eq!(
267 ::std::mem::align_of::<_OVERLAPPED__bindgen_ty_1>(),
268 8usize,
269 concat!("Alignment of ", stringify!(_OVERLAPPED__bindgen_ty_1))
270 );
271 assert_eq!(
272 unsafe {
273 &(*(::std::ptr::null::<_OVERLAPPED__bindgen_ty_1>())).Pointer as *const _ as usize
274 },
275 0usize,
276 concat!(
277 "Offset of field: ",
278 stringify!(_OVERLAPPED__bindgen_ty_1),
279 "::",
280 stringify!(Pointer)
281 )
282 );
283}
284#[test]
285fn bindgen_test_layout__OVERLAPPED() {
286 assert_eq!(
287 ::std::mem::size_of::<_OVERLAPPED>(),
288 24usize,
289 concat!("Size of: ", stringify!(_OVERLAPPED))
290 );
291 assert_eq!(
292 ::std::mem::align_of::<_OVERLAPPED>(),
293 8usize,
294 concat!("Alignment of ", stringify!(_OVERLAPPED))
295 );
296 assert_eq!(
297 unsafe { &(*(::std::ptr::null::<_OVERLAPPED>())).Internal as *const _ as usize },
298 0usize,
299 concat!(
300 "Offset of field: ",
301 stringify!(_OVERLAPPED),
302 "::",
303 stringify!(Internal)
304 )
305 );
306 assert_eq!(
307 unsafe { &(*(::std::ptr::null::<_OVERLAPPED>())).InternalHigh as *const _ as usize },
308 4usize,
309 concat!(
310 "Offset of field: ",
311 stringify!(_OVERLAPPED),
312 "::",
313 stringify!(InternalHigh)
314 )
315 );
316 assert_eq!(
317 unsafe { &(*(::std::ptr::null::<_OVERLAPPED>())).hEvent as *const _ as usize },
318 16usize,
319 concat!(
320 "Offset of field: ",
321 stringify!(_OVERLAPPED),
322 "::",
323 stringify!(hEvent)
324 )
325 );
326}
327pub type LPOVERLAPPED = *mut _OVERLAPPED;
328#[repr(C)]
329#[derive(Debug, Copy, Clone)]
330pub struct _SECURITY_ATTRIBUTES {
331 pub nLength: DWORD,
332 pub lpSecurityDescriptor: LPVOID,
333 pub bInheritHandle: BOOL,
334}
335#[test]
336fn bindgen_test_layout__SECURITY_ATTRIBUTES() {
337 assert_eq!(
338 ::std::mem::size_of::<_SECURITY_ATTRIBUTES>(),
339 24usize,
340 concat!("Size of: ", stringify!(_SECURITY_ATTRIBUTES))
341 );
342 assert_eq!(
343 ::std::mem::align_of::<_SECURITY_ATTRIBUTES>(),
344 8usize,
345 concat!("Alignment of ", stringify!(_SECURITY_ATTRIBUTES))
346 );
347 assert_eq!(
348 unsafe { &(*(::std::ptr::null::<_SECURITY_ATTRIBUTES>())).nLength as *const _ as usize },
349 0usize,
350 concat!(
351 "Offset of field: ",
352 stringify!(_SECURITY_ATTRIBUTES),
353 "::",
354 stringify!(nLength)
355 )
356 );
357 assert_eq!(
358 unsafe {
359 &(*(::std::ptr::null::<_SECURITY_ATTRIBUTES>())).lpSecurityDescriptor as *const _
360 as usize
361 },
362 8usize,
363 concat!(
364 "Offset of field: ",
365 stringify!(_SECURITY_ATTRIBUTES),
366 "::",
367 stringify!(lpSecurityDescriptor)
368 )
369 );
370 assert_eq!(
371 unsafe {
372 &(*(::std::ptr::null::<_SECURITY_ATTRIBUTES>())).bInheritHandle as *const _ as usize
373 },
374 16usize,
375 concat!(
376 "Offset of field: ",
377 stringify!(_SECURITY_ATTRIBUTES),
378 "::",
379 stringify!(bInheritHandle)
380 )
381 );
382}
383pub type LPSECURITY_ATTRIBUTES = *mut _SECURITY_ATTRIBUTES;
384#[doc = " @name FT_HANDLE"]
385#[doc = " An opaque value used as a handle to an opened FT device."]
386pub type FT_HANDLE = PVOID;
387#[doc = " @{"]
388#[doc = " @name FT_STATUS"]
389#[doc = " @details Return status values for API calls."]
390pub type FT_STATUS = ULONG;
391pub const FT_OK: ::std::os::raw::c_uint = 0;
392pub const FT_INVALID_HANDLE: ::std::os::raw::c_uint = 1;
393pub const FT_DEVICE_NOT_FOUND: ::std::os::raw::c_uint = 2;
394pub const FT_DEVICE_NOT_OPENED: ::std::os::raw::c_uint = 3;
395pub const FT_IO_ERROR: ::std::os::raw::c_uint = 4;
396pub const FT_INSUFFICIENT_RESOURCES: ::std::os::raw::c_uint = 5;
397pub const FT_INVALID_PARAMETER: ::std::os::raw::c_uint = 6;
398pub const FT_INVALID_BAUD_RATE: ::std::os::raw::c_uint = 7;
399pub const FT_DEVICE_NOT_OPENED_FOR_ERASE: ::std::os::raw::c_uint = 8;
400pub const FT_DEVICE_NOT_OPENED_FOR_WRITE: ::std::os::raw::c_uint = 9;
401pub const FT_FAILED_TO_WRITE_DEVICE: ::std::os::raw::c_uint = 10;
402pub const FT_EEPROM_READ_FAILED: ::std::os::raw::c_uint = 11;
403pub const FT_EEPROM_WRITE_FAILED: ::std::os::raw::c_uint = 12;
404pub const FT_EEPROM_ERASE_FAILED: ::std::os::raw::c_uint = 13;
405pub const FT_EEPROM_NOT_PRESENT: ::std::os::raw::c_uint = 14;
406pub const FT_EEPROM_NOT_PROGRAMMED: ::std::os::raw::c_uint = 15;
407pub const FT_INVALID_ARGS: ::std::os::raw::c_uint = 16;
408pub const FT_NOT_SUPPORTED: ::std::os::raw::c_uint = 17;
409pub const FT_OTHER_ERROR: ::std::os::raw::c_uint = 18;
410pub const FT_DEVICE_LIST_NOT_READY: ::std::os::raw::c_uint = 19;
411pub type _bindgen_ty_11 = ::std::os::raw::c_uint;
412#[doc = " @{"]
413#[doc = " @name Device Types"]
414#[doc = " @details Known supported FTDI device types supported by this library."]
415pub type FT_DEVICE = ULONG;
416pub const FT_DEVICE_BM: ::std::os::raw::c_uint = 0;
417pub const FT_DEVICE_AM: ::std::os::raw::c_uint = 1;
418pub const FT_DEVICE_100AX: ::std::os::raw::c_uint = 2;
419pub const FT_DEVICE_UNKNOWN: ::std::os::raw::c_uint = 3;
420pub const FT_DEVICE_2232C: ::std::os::raw::c_uint = 4;
421pub const FT_DEVICE_232R: ::std::os::raw::c_uint = 5;
422pub const FT_DEVICE_2232H: ::std::os::raw::c_uint = 6;
423pub const FT_DEVICE_4232H: ::std::os::raw::c_uint = 7;
424pub const FT_DEVICE_232H: ::std::os::raw::c_uint = 8;
425pub const FT_DEVICE_X_SERIES: ::std::os::raw::c_uint = 9;
426pub const FT_DEVICE_4222H_0: ::std::os::raw::c_uint = 10;
427pub const FT_DEVICE_4222H_1_2: ::std::os::raw::c_uint = 11;
428pub const FT_DEVICE_4222H_3: ::std::os::raw::c_uint = 12;
429pub const FT_DEVICE_4222_PROG: ::std::os::raw::c_uint = 13;
430pub const FT_DEVICE_900: ::std::os::raw::c_uint = 14;
431pub const FT_DEVICE_930: ::std::os::raw::c_uint = 15;
432pub const FT_DEVICE_UMFTPD3A: ::std::os::raw::c_uint = 16;
433pub const FT_DEVICE_2233HP: ::std::os::raw::c_uint = 17;
434pub const FT_DEVICE_4233HP: ::std::os::raw::c_uint = 18;
435pub const FT_DEVICE_2232HP: ::std::os::raw::c_uint = 19;
436pub const FT_DEVICE_4232HP: ::std::os::raw::c_uint = 20;
437pub const FT_DEVICE_233HP: ::std::os::raw::c_uint = 21;
438pub const FT_DEVICE_232HP: ::std::os::raw::c_uint = 22;
439pub const FT_DEVICE_2232HA: ::std::os::raw::c_uint = 23;
440pub const FT_DEVICE_4232HA: ::std::os::raw::c_uint = 24;
441pub type _bindgen_ty_12 = ::std::os::raw::c_uint;
442pub const FT_FLAGS_OPENED: ::std::os::raw::c_uint = 1;
443pub const FT_FLAGS_HISPEED: ::std::os::raw::c_uint = 2;
444#[doc = " @{"]
445#[doc = " @name FT_DEVICE_LIST_INFO_NODE Device Information Flags"]
446#[doc = " @par Summary"]
447#[doc = " These flags are used in the Flags member of FT_DEVICE_LIST_INFO_NODE to indicated the state of"]
448#[doc = " the device and speed of the device."]
449pub type _bindgen_ty_13 = ::std::os::raw::c_uint;
450extern "C" {
451 #[doc = " @noop FT_SetVIDPID"]
452 #[doc = " @par Supported Operating Systems"]
453 #[doc = " Linux"]
454 #[doc = " Mac OS X (10.4 and later)"]
455 #[doc = " @par Summary"]
456 #[doc = " A command to include a custom VID and PID combination within the internal device list table."]
457 #[doc = " This will allow the driver to load for the specified VID and PID combination."]
458 #[doc = " @param dwVID Device Vendor ID (VID)"]
459 #[doc = " @param dwPID Device Product ID (PID)"]
460 #[doc = " @returns"]
461 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
462 #[doc = " @remarks"]
463 #[doc = " By default, the driver will support a limited set of VID and PID matched devices (VID 0x0403"]
464 #[doc = " with PIDs for standard FTDI devices only)."]
465 #[doc = " @n In order to use the driver with other VID and PID combinations the FT_SetVIDPID function"]
466 #[doc = " must be used prior to calling FT_ListDevices, FT_Open, FT_OpenEx or FT_CreateDeviceInfoList."]
467 #[doc = " @note Extra function for non-Windows platforms to compensate for lack of .INF file to specify"]
468 #[doc = " Vendor and Product IDs."]
469 pub fn FT_SetVIDPID(dwVID: DWORD, dwPID: DWORD) -> FT_STATUS;
470}
471extern "C" {
472 #[doc = " @noop FT_GetVIDPID"]
473 #[doc = " @par Supported Operating Systems"]
474 #[doc = " Linux"]
475 #[doc = " Mac OS X (10.4 and later)"]
476 #[doc = " @par Summary"]
477 #[doc = " A command to retrieve the current VID and PID combination from within the internal device list table."]
478 #[doc = " @param pdwVID Pointer to DWORD that will contain the internal VID"]
479 #[doc = " @param pdwPID Pointer to DWORD that will contain the internal PID"]
480 #[doc = " @returns"]
481 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
482 #[doc = " @remarks"]
483 #[doc = " @note Extra function for non-Windows platforms to compensate for lack of .INF file to specify Vendor and Product IDs."]
484 #[doc = " @see FT_SetVIDPID."]
485 pub fn FT_GetVIDPID(pdwVID: *mut DWORD, pdwPID: *mut DWORD) -> FT_STATUS;
486}
487extern "C" {
488 #[doc = " @noop FT_CreateDeviceInfoList"]
489 #[doc = " @par Supported Operating Systems"]
490 #[doc = " Linux"]
491 #[doc = " Mac OS X (10.4 and later)"]
492 #[doc = " Windows (2000 and later)"]
493 #[doc = " Windows CE (4.2 and later)"]
494 #[doc = " @par Summary"]
495 #[doc = " This function builds a device information list and returns the number of D2XX devices connected to the"]
496 #[doc = " system. The list contains information about both unopen and open devices."]
497 #[doc = " @param lpdwNumDevs Pointer to unsigned long to store the number of devices connected."]
498 #[doc = " @returns"]
499 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
500 #[doc = " @remarks"]
501 #[doc = " An application can use this function to get the number of devices attached to the system. It can then"]
502 #[doc = " allocate space for the device information list and retrieve the list using FT_GetDeviceInfoList or"]
503 #[doc = " FT_GetDeviceInfoDetail."]
504 #[doc = " @n If the devices connected to the system change, the device info list will not be updated until"]
505 #[doc = " FT_CreateDeviceInfoList is called again."]
506 #[doc = " @see FT_GetDeviceInfoList"]
507 #[doc = " @see FT_GetDeviceInfoDetail"]
508 pub fn FT_CreateDeviceInfoList(lpdwNumDevs: LPDWORD) -> FT_STATUS;
509}
510#[doc = " @noop FT_DEVICE_LIST_INFO_NODE"]
511#[doc = " @par Summary"]
512#[doc = " This structure is used for passing information about a device back from the FT_GetDeviceInfoList function."]
513#[doc = " @see FT_GetDeviceInfoList"]
514#[repr(C)]
515#[derive(Copy, Clone)]
516pub struct _ft_device_list_info_node {
517 pub Flags: ULONG,
518 pub Type: ULONG,
519 pub ID: ULONG,
520 pub LocId: DWORD,
521 pub SerialNumber: [::std::os::raw::c_char; 16usize],
522 pub Description: [::std::os::raw::c_char; 64usize],
523 pub ftHandle: FT_HANDLE,
524}
525#[test]
526fn bindgen_test_layout__ft_device_list_info_node() {
527 assert_eq!(
528 ::std::mem::size_of::<_ft_device_list_info_node>(),
529 104usize,
530 concat!("Size of: ", stringify!(_ft_device_list_info_node))
531 );
532 assert_eq!(
533 ::std::mem::align_of::<_ft_device_list_info_node>(),
534 8usize,
535 concat!("Alignment of ", stringify!(_ft_device_list_info_node))
536 );
537 assert_eq!(
538 unsafe { &(*(::std::ptr::null::<_ft_device_list_info_node>())).Flags as *const _ as usize },
539 0usize,
540 concat!(
541 "Offset of field: ",
542 stringify!(_ft_device_list_info_node),
543 "::",
544 stringify!(Flags)
545 )
546 );
547 assert_eq!(
548 unsafe { &(*(::std::ptr::null::<_ft_device_list_info_node>())).Type as *const _ as usize },
549 4usize,
550 concat!(
551 "Offset of field: ",
552 stringify!(_ft_device_list_info_node),
553 "::",
554 stringify!(Type)
555 )
556 );
557 assert_eq!(
558 unsafe { &(*(::std::ptr::null::<_ft_device_list_info_node>())).ID as *const _ as usize },
559 8usize,
560 concat!(
561 "Offset of field: ",
562 stringify!(_ft_device_list_info_node),
563 "::",
564 stringify!(ID)
565 )
566 );
567 assert_eq!(
568 unsafe { &(*(::std::ptr::null::<_ft_device_list_info_node>())).LocId as *const _ as usize },
569 12usize,
570 concat!(
571 "Offset of field: ",
572 stringify!(_ft_device_list_info_node),
573 "::",
574 stringify!(LocId)
575 )
576 );
577 assert_eq!(
578 unsafe {
579 &(*(::std::ptr::null::<_ft_device_list_info_node>())).SerialNumber as *const _ as usize
580 },
581 16usize,
582 concat!(
583 "Offset of field: ",
584 stringify!(_ft_device_list_info_node),
585 "::",
586 stringify!(SerialNumber)
587 )
588 );
589 assert_eq!(
590 unsafe {
591 &(*(::std::ptr::null::<_ft_device_list_info_node>())).Description as *const _ as usize
592 },
593 32usize,
594 concat!(
595 "Offset of field: ",
596 stringify!(_ft_device_list_info_node),
597 "::",
598 stringify!(Description)
599 )
600 );
601 assert_eq!(
602 unsafe {
603 &(*(::std::ptr::null::<_ft_device_list_info_node>())).ftHandle as *const _ as usize
604 },
605 96usize,
606 concat!(
607 "Offset of field: ",
608 stringify!(_ft_device_list_info_node),
609 "::",
610 stringify!(ftHandle)
611 )
612 );
613}
614#[doc = " @noop FT_DEVICE_LIST_INFO_NODE"]
615#[doc = " @par Summary"]
616#[doc = " This structure is used for passing information about a device back from the FT_GetDeviceInfoList function."]
617#[doc = " @see FT_GetDeviceInfoList"]
618pub type FT_DEVICE_LIST_INFO_NODE = _ft_device_list_info_node;
619extern "C" {
620 #[doc = " @noop FT_GetDeviceInfoList"]
621 #[doc = " @par Supported Operating Systems"]
622 #[doc = " Linux"]
623 #[doc = " Mac OS X (10.4 and later)"]
624 #[doc = " Windows (2000 and later)"]
625 #[doc = " Windows CE (4.2 and later)"]
626 #[doc = " @par Summary"]
627 #[doc = " This function returns a device information list and the number of D2XX devices in the list."]
628 #[doc = " @param *pDest Pointer to an array of FT_DEVICE_LIST_INFO_NODE structures."]
629 #[doc = " @param lpdwNumDevs Pointer to the number of elements in the array."]
630 #[doc = " @returns"]
631 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
632 #[doc = " @remarks"]
633 #[doc = " This function should only be called after calling FT_CreateDeviceInfoList. If the devices connected to the"]
634 #[doc = " system change, the device info list will not be updated until FT_CreateDeviceInfoList is called again."]
635 #[doc = " Location ID information is not returned for devices that are open when FT_CreateDeviceInfoList is called."]
636 #[doc = " Information is not available for devices which are open in other processes. In this case, the Flags"]
637 #[doc = " parameter of the FT_DEVICE_LIST_INFO_NODE will indicate that the device is open, but other fields will"]
638 #[doc = " be unpopulated."]
639 #[doc = " @n The flag value is a 4-byte bit map containing miscellaneous data as defined Appendix A - Type"]
640 #[doc = " Definitions. Bit 0 (least significant bit) of this number indicates if the port is open (1) or closed (0). Bit 1"]
641 #[doc = " indicates if the device is enumerated as a high-speed USB device (2) or a full-speed USB device (0). The"]
642 #[doc = " remaining bits (2 - 31) are reserved."]
643 #[doc = " @n The array of FT_DEVICE_LIST_INFO_NODES contains all available data on each device. The structure of"]
644 #[doc = " FT_DEVICE_LIST_INFO_NODES is given in the Appendix. The storage for the list must be allocated by"]
645 #[doc = " the application. The number of devices returned by FT_CreateDeviceInfoList can be used to do this."]
646 #[doc = " When programming in Visual Basic, LabVIEW or similar languages, FT_GetDeviceInfoDetail may be"]
647 #[doc = " required instead of this function."]
648 #[doc = " @note Please note that Windows CE does not support location IDs. As such, the Location ID parameter in the"]
649 #[doc = " structure will be empty."]
650 #[doc = " @see FT_CreateDeviceInfoList"]
651 pub fn FT_GetDeviceInfoList(
652 pDest: *mut FT_DEVICE_LIST_INFO_NODE,
653 lpdwNumDevs: LPDWORD,
654 ) -> FT_STATUS;
655}
656extern "C" {
657 #[doc = " @noop FT_GetDeviceInfoDetail"]
658 #[doc = " @par Supported Operating Systems"]
659 #[doc = " Linux"]
660 #[doc = " Mac OS X (10.4 and later)"]
661 #[doc = " Windows (2000 and later)"]
662 #[doc = " Windows CE (4.2 and later)"]
663 #[doc = " @par Summary"]
664 #[doc = " This function returns an entry from the device information list."]
665 #[doc = " @param dwIndex Index of the entry in the device info list."]
666 #[doc = " @param lpdwFlags Pointer to unsigned long to store the flag value."]
667 #[doc = " @param lpdwType Pointer to unsigned long to store device type."]
668 #[doc = " @param lpdwID Pointer to unsigned long to store device ID."]
669 #[doc = " @param lpdwLocId Pointer to unsigned long to store the device location ID."]
670 #[doc = " @param lpSerialNumber Pointer to buffer to store device serial number as a nullterminated string."]
671 #[doc = " @param lpDescription Pointer to buffer to store device description as a null-terminated string."]
672 #[doc = " @param *pftHandle Pointer to a variable of type FT_HANDLE where the handle will be stored."]
673 #[doc = " @returns"]
674 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
675 #[doc = " @remarks"]
676 #[doc = " This function should only be called after calling FT_CreateDeviceInfoList. If the devices connected to the"]
677 #[doc = " system change, the device info list will not be updated until FT_CreateDeviceInfoList is called again."]
678 #[doc = " @n The index value is zero-based."]
679 #[doc = " @n The flag value is a 4-byte bit map containing miscellaneous data as defined Appendix A - Type"]
680 #[doc = " Definitions. Bit 0 (least significant bit) of this number indicates if the port is open (1) or closed (0). Bit 1"]
681 #[doc = " indicates if the device is enumerated as a high-speed USB device (2) or a full-speed USB device (0). The"]
682 #[doc = " remaining bits (2 - 31) are reserved."]
683 #[doc = " @n Location ID information is not returned for devices that are open when FT_CreateDeviceInfoList is called."]
684 #[doc = " Information is not available for devices which are open in other processes. In this case, the lpdwFlags"]
685 #[doc = " parameter will indicate that the device is open, but other fields will be unpopulated."]
686 #[doc = " To return the whole device info list as an array of FT_DEVICE_LIST_INFO_NODE structures, use"]
687 #[doc = " FT_CreateDeviceInfoList."]
688 #[doc = " @note Please note that Windows CE does not support location IDs. As such, the Location ID parameter in the"]
689 #[doc = " structure will be empty."]
690 #[doc = " @see FT_CreateDeviceInfoList"]
691 pub fn FT_GetDeviceInfoDetail(
692 dwIndex: DWORD,
693 lpdwFlags: LPDWORD,
694 lpdwType: LPDWORD,
695 lpdwID: LPDWORD,
696 lpdwLocId: LPDWORD,
697 lpSerialNumber: LPVOID,
698 lpDescription: LPVOID,
699 pftHandle: *mut FT_HANDLE,
700 ) -> FT_STATUS;
701}
702extern "C" {
703 #[doc = " @noop FT_ListDevices"]
704 #[doc = " @par Summary"]
705 #[doc = " Gets information concerning the devices currently connected. This function can return information such"]
706 #[doc = " as the number of devices connected, the device serial number and device description strings, and the"]
707 #[doc = " location IDs of connected devices."]
708 #[doc = " @param pvArg1 Meaning depends on dwFlags."]
709 #[doc = " @param pvArg2 Meaning depends on dwFlags."]
710 #[doc = " @param dwFlags Determines format of returned information."]
711 #[doc = " @returns"]
712 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
713 #[doc = " @remarks"]
714 #[doc = " This function can be used in a number of ways to return different types of information. A more powerful"]
715 #[doc = " way to get device information is to use the FT_CreateDeviceInfoList, FT_GetDeviceInfoList and"]
716 #[doc = " FT_GetDeviceInfoDetail functions as they return all the available information on devices."]
717 #[doc = " In its simplest form, it can be used to return the number of devices currently connected. If"]
718 #[doc = " FT_LIST_NUMBER_ONLY bit is set in dwFlags, the parameter pvArg1 is interpreted as a pointer to a"]
719 #[doc = " DWORD location to store the number of devices currently connected."]
720 #[doc = " @n It can be used to return device information: if FT_OPEN_BY_SERIAL_NUMBER bit is set in dwFlags, the"]
721 #[doc = " serial number string will be returned; if FT_OPEN_BY_DESCRIPTION bit is set in dwFlags, the product"]
722 #[doc = " description string will be returned; if FT_OPEN_BY_LOCATION bit is set in dwFlags, the Location ID will"]
723 #[doc = " be returned; if none of these bits is set, the serial number string will be returned by default."]
724 #[doc = " @n It can be used to return device string information for a single device. If FT_LIST_BY_INDEX and"]
725 #[doc = " FT_OPEN_BY_SERIAL_NUMBER or FT_OPEN_BY_DESCRIPTION bits are set in dwFlags, the parameter"]
726 #[doc = " pvArg1 is interpreted as the index of the device, and the parameter pvArg2 is interpreted as a pointer to"]
727 #[doc = " a buffer to contain the appropriate string. Indexes are zero-based, and the error code"]
728 #[doc = " FT_DEVICE_NOT_FOUND is returned for an invalid index."]
729 #[doc = " @n It can be used to return device string information for all connected devices. If FT_LIST_ALL and"]
730 #[doc = " FT_OPEN_BY_SERIAL_NUMBER or FT_OPEN_BY_DESCRIPTION bits are set in dwFlags, the parameter"]
731 #[doc = " pvArg1 is interpreted as a pointer to an array of pointers to buffers to contain the appropriate strings and"]
732 #[doc = " the parameter pvArg2 is interpreted as a pointer to a DWORD location to store the number of devices"]
733 #[doc = " currently connected. Note that, for pvArg1, the last entry in the array of pointers to buffers should be a"]
734 #[doc = " NULL pointer so the array will contain one more location than the number of devices connected."]
735 #[doc = " @n The location ID of a device is returned if FT_LIST_BY_INDEX and FT_OPEN_BY_LOCATION bits are set in"]
736 #[doc = " dwFlags. In this case the parameter pvArg1 is interpreted as the index of the device, and the parameter"]
737 #[doc = " pvArg2 is interpreted as a pointer to a variable of type long to contain the location ID. Indexes are"]
738 #[doc = " zerobased, and the error code FT_DEVICE_NOT_FOUND is returned for an invalid index. Please note that"]
739 #[doc = " Windows CE and Linux do not support location IDs."]
740 #[doc = " @n The location IDs of all connected devices are returned if FT_LIST_ALL and FT_OPEN_BY_LOCATION bits"]
741 #[doc = " are set in dwFlags. In this case, the parameter pvArg1 is interpreted as a pointer to an array of variables"]
742 #[doc = " of type long to contain the location IDs, and the parameter pvArg2 is interpreted as a pointer to a"]
743 #[doc = " DWORD location to store the number of devices currently connected."]
744 #[doc = " @see FT_CreateDeviceInfoList"]
745 #[doc = " @see FT_GetDeviceInfoList"]
746 #[doc = " @see FT_GetDeviceInfoDetail"]
747 pub fn FT_ListDevices(pvArg1: PVOID, pvArg2: PVOID, dwFlags: DWORD) -> FT_STATUS;
748}
749extern "C" {
750 #[doc = " @noop FT_Open"]
751 #[doc = " @par Supported Operating Systems"]
752 #[doc = " Linux"]
753 #[doc = " Mac OS X (10.4 and later)"]
754 #[doc = " Windows (2000 and later)"]
755 #[doc = " Windows CE (4.2 and later)"]
756 #[doc = " @par Summary"]
757 #[doc = " Open the device and return a handle which will be used for subsequent accesses."]
758 #[doc = " @param deviceNumber Index of the device to open. Indices are 0 based."]
759 #[doc = " @param pHandle Pointer to a variable of type FT_HANDLE where the handle will be stored. This handle must"]
760 #[doc = " be used to access the device."]
761 #[doc = " @return"]
762 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
763 #[doc = " @remarks"]
764 #[doc = " Although this function can be used to open multiple devices by setting iDevice to 0, 1, 2 etc. there is no"]
765 #[doc = " ability to open a specific device. To open named devices, use the function FT_OpenEx."]
766 #[doc = " @see FT_OpenEx."]
767 pub fn FT_Open(deviceNumber: ::std::os::raw::c_int, pHandle: *mut FT_HANDLE) -> FT_STATUS;
768}
769extern "C" {
770 #[doc = " @noop FT_OpenEx"]
771 #[doc = " @par Supported Operating Systems"]
772 #[doc = " Linux"]
773 #[doc = " Mac OS X (10.4 and later)"]
774 #[doc = " Windows (2000 and later)"]
775 #[doc = " Windows CE (4.2 and later)"]
776 #[doc = " @par Summary"]
777 #[doc = " Open the specified device and return a handle that will be used for subsequent accesses. The device can"]
778 #[doc = " be specified by its serial number, device description or location."]
779 #[doc = " @n This function can also be used to open multiple devices simultaneously. Multiple devices can be specified"]
780 #[doc = " by serial number, device description or location ID (location information derived from the physical"]
781 #[doc = " location of a device on USB). Location IDs for specific USB ports can be obtained using the utility"]
782 #[doc = " USBView and are given in hexadecimal format. Location IDs for devices connected to a system can be"]
783 #[doc = " obtained by calling FT_GetDeviceInfoList or FT_ListDevices with the appropriate flags."]
784 #[doc = " @param pvArg1 Pointer to an argument whose type depends on the value of dwFlags."]
785 #[doc = " It is normally be interpreted as a pointer to a null terminated string."]
786 #[doc = " @param dwFlags FT_OPEN_BY_SERIAL_NUMBER, FT_OPEN_BY_DESCRIPTION or FT_OPEN_BY_LOCATION."]
787 #[doc = " @param pHandle Pointer to a variable of type FT_HANDLE where the handle will be"]
788 #[doc = " stored. This handle must be used to access the device."]
789 #[doc = " @returns"]
790 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
791 #[doc = " @remarks"]
792 #[doc = " The parameter specified in pvArg1 depends on dwFlags: if dwFlags is FT_OPEN_BY_SERIAL_NUMBER,"]
793 #[doc = " pvArg1 is interpreted as a pointer to a null-terminated string that represents the serial number of the"]
794 #[doc = " device; if dwFlags is FT_OPEN_BY_DESCRIPTION, pvArg1 is interpreted as a pointer to a nullterminated"]
795 #[doc = " string that represents the device description; if dwFlags is FT_OPEN_BY_LOCATION, pvArg1"]
796 #[doc = " is interpreted as a long value that contains the location ID of the device. Please note that Windows CE"]
797 #[doc = " and Linux do not support location IDs."]
798 #[doc = " @n ftHandle is a pointer to a variable of type FT_HANDLE where the handle is to be stored. This handle must"]
799 #[doc = " be used to access the device."]
800 pub fn FT_OpenEx(pvArg1: PVOID, dwFlags: DWORD, pHandle: *mut FT_HANDLE) -> FT_STATUS;
801}
802extern "C" {
803 #[doc = " @noop FT_Close"]
804 #[doc = " @par Supported Operating Systems"]
805 #[doc = " Linux"]
806 #[doc = " Mac OS X (10.4 and later)"]
807 #[doc = " Windows (2000 and later)"]
808 #[doc = " Windows CE (4.2 and later)"]
809 #[doc = " @par Summary"]
810 #[doc = " Close an open device."]
811 #[doc = " @param ftHandle Handle of the device."]
812 #[doc = " @returns"]
813 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
814 pub fn FT_Close(ftHandle: FT_HANDLE) -> FT_STATUS;
815}
816extern "C" {
817 #[doc = " @noop FT_Read"]
818 #[doc = " @par Supported Operating Systems"]
819 #[doc = " Linux"]
820 #[doc = " Mac OS X (10.4 and later)"]
821 #[doc = " Windows (2000 and later)"]
822 #[doc = " Windows CE (4.2 and later)"]
823 #[doc = " @par Summary"]
824 #[doc = " Read data from the device."]
825 #[doc = " @param ftHandle Handle of the device."]
826 #[doc = " @param lpBuffer Pointer to the buffer that receives the data from the device."]
827 #[doc = " @param dwBytesToRead Number of bytes to be read from the device."]
828 #[doc = " @param lpdwBytesReturned Pointer to a variable of type DWORD which receives the number of"]
829 #[doc = " bytes read from the device."]
830 #[doc = " @returns"]
831 #[doc = " FT_OK if successful, FT_IO_ERROR otherwise. $see FT_STATUS"]
832 #[doc = " @remarks"]
833 #[doc = " FT_Read always returns the number of bytes read in lpdwBytesReturned."]
834 #[doc = " @n This function does not return until dwBytesToRead bytes have been read into the buffer. The number of"]
835 #[doc = " bytes in the receive queue can be determined by calling FT_GetStatus or FT_GetQueueStatus, and"]
836 #[doc = " passed to FT_Read as dwBytesToRead so that the function reads the device and returns immediately."]
837 #[doc = " When a read timeout value has been specified in a previous call to FT_SetTimeouts, FT_Read returns"]
838 #[doc = " when the timer expires or dwBytesToRead have been read, whichever occurs first. If the timeout"]
839 #[doc = " occurred, FT_Read reads available data into the buffer and returns FT_OK."]
840 #[doc = " @n An application should use the function return value and lpdwBytesReturned when processing the buffer."]
841 #[doc = " If the return value is FT_OK, and lpdwBytesReturned is equal to dwBytesToRead then FT_Read has"]
842 #[doc = " completed normally. If the return value is FT_OK, and lpdwBytesReturned is less then dwBytesToRead"]
843 #[doc = " then a timeout has occurred and the read has been partially completed. Note that if a timeout occurred"]
844 #[doc = " and no data was read, the return value is still FT_OK."]
845 #[doc = " @n A return value of FT_IO_ERROR suggests an error in the parameters of the function, or a fatal error like a"]
846 #[doc = " USB disconnect has occurred."]
847 pub fn FT_Read(
848 ftHandle: FT_HANDLE,
849 lpBuffer: LPVOID,
850 dwBytesToRead: DWORD,
851 lpdwBytesReturned: LPDWORD,
852 ) -> FT_STATUS;
853}
854extern "C" {
855 #[doc = " @noop FT_Write"]
856 #[doc = " @par Supported Operating Systems"]
857 #[doc = " Linux"]
858 #[doc = " Mac OS X (10.4 and later)"]
859 #[doc = " Windows (2000 and later)"]
860 #[doc = " Windows CE (4.2 and later)"]
861 #[doc = " @par Summary"]
862 #[doc = " Write data to the device."]
863 #[doc = " @param ftHandle Handle of the device."]
864 #[doc = " @param lpBuffer Pointer to the buffer that contains the data to be written to the device."]
865 #[doc = " @param dwBytesToWrite Number of bytes to write to the device."]
866 #[doc = " @param lpdwBytesWritten Pointer to a variable of type DWORD which receives the number of"]
867 #[doc = " bytes written to the device."]
868 #[doc = " @returns"]
869 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
870 pub fn FT_Write(
871 ftHandle: FT_HANDLE,
872 lpBuffer: LPVOID,
873 dwBytesToWrite: DWORD,
874 lpdwBytesWritten: LPDWORD,
875 ) -> FT_STATUS;
876}
877extern "C" {
878 #[doc = " @noop FT_SetBaudRate"]
879 #[doc = " @par Supported Operating Systems"]
880 #[doc = " Linux"]
881 #[doc = " Mac OS X (10.4 and later)"]
882 #[doc = " Windows (2000 and later)"]
883 #[doc = " Windows CE (4.2 and later)"]
884 #[doc = " @par Summary"]
885 #[doc = " This function sets the baud rate for the device."]
886 #[doc = " @param ftHandle Handle of the device."]
887 #[doc = " @param dwBaudRate Baud rate."]
888 #[doc = " @returns"]
889 #[doc = " FT_OK if successful, otherwise the return value is an FT error code"]
890 pub fn FT_SetBaudRate(ftHandle: FT_HANDLE, dwBaudRate: ULONG) -> FT_STATUS;
891}
892extern "C" {
893 #[doc = " @noop FT_SetDivisor"]
894 #[doc = " @par Supported Operating Systems"]
895 #[doc = " Linux"]
896 #[doc = " Mac OS X (10.4 and later)"]
897 #[doc = " Windows (2000 and later)"]
898 #[doc = " Windows CE (4.2 and later)"]
899 #[doc = " @par Summary"]
900 #[doc = " This function sets the baud rate for the device. It is used to set non-standard baud rates."]
901 #[doc = " @param ftHandle Handle of the device."]
902 #[doc = " @param usDivisor Divisor."]
903 #[doc = " @returns"]
904 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
905 #[doc = " @remarks"]
906 #[doc = " This function is no longer required as FT_SetBaudRate will now automatically calculate the required"]
907 #[doc = " divisor for a requested baud rate. The application note \"Setting baud rates for the FT8U232AM\" is"]
908 #[doc = " available from the Application Notes section of the FTDI website describes how to calculate the divisor for"]
909 #[doc = " a non-standard baud rate."]
910 pub fn FT_SetDivisor(ftHandle: FT_HANDLE, usDivisor: USHORT) -> FT_STATUS;
911}
912extern "C" {
913 #[doc = " @noop FT_SetDataCharacteristics"]
914 #[doc = " @par Supported Operating Systems"]
915 #[doc = " Linux"]
916 #[doc = " Mac OS X (10.4 and later)"]
917 #[doc = " Windows (2000 and later)"]
918 #[doc = " Windows CE (4.2 and later)"]
919 #[doc = " @par Summary"]
920 #[doc = " This function sets the data characteristics for the device."]
921 #[doc = " @param ftHandle Handle of the device."]
922 #[doc = " @param uWordLength Number of bits per word - must be FT_BITS_8 or FT_BITS_7."]
923 #[doc = " @param uStopBits Number of stop bits - must be FT_STOP_BITS_1 or FT_STOP_BITS_2."]
924 #[doc = " @param uParity Parity - must be FT_PARITY_NONE, FT_PARITY_ODD, FT_PARITY_EVEN,"]
925 #[doc = " FT_PARITY_MARK or FT_PARITY SPACE."]
926 #[doc = " @returns"]
927 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
928 pub fn FT_SetDataCharacteristics(
929 ftHandle: FT_HANDLE,
930 uWordLength: UCHAR,
931 uStopBits: UCHAR,
932 uParity: UCHAR,
933 ) -> FT_STATUS;
934}
935extern "C" {
936 #[doc = " @noop FT_SetTimeouts"]
937 #[doc = " @par Supported Operating Systems"]
938 #[doc = " Linux"]
939 #[doc = " Mac OS X (10.4 and later)"]
940 #[doc = " Windows (2000 and later)"]
941 #[doc = " Windows CE (4.2 and later)"]
942 #[doc = " @par Summary"]
943 #[doc = " This function sets the read and write timeouts for the device."]
944 #[doc = " @param ftHandle Handle of the device."]
945 #[doc = " @param dwReadTimeout Read timeout in milliseconds."]
946 #[doc = " @param dwWriteTimeout Write timeout in milliseconds."]
947 #[doc = " @returns"]
948 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
949 pub fn FT_SetTimeouts(
950 ftHandle: FT_HANDLE,
951 dwReadTimeout: ULONG,
952 dwWriteTimeout: ULONG,
953 ) -> FT_STATUS;
954}
955extern "C" {
956 #[doc = " @noop FT_SetFlowControl"]
957 #[doc = " @par Supported Operating Systems"]
958 #[doc = " Linux"]
959 #[doc = " Mac OS X (10.4 and later)"]
960 #[doc = " Windows (2000 and later)"]
961 #[doc = " Windows CE (4.2 and later)"]
962 #[doc = " @par Summary"]
963 #[doc = " This function sets the flow control for the device."]
964 #[doc = " @param ftHandle Handle of the device."]
965 #[doc = " @param usFlowControl Must be one of FT_FLOW_NONE, FT_FLOW_RTS_CTS, FT_FLOW_DTR_DSR or"]
966 #[doc = " FT_FLOW_XON_XOFF."]
967 #[doc = " @param uXonChar Character used to signal Xon. Only used if flow control is FT_FLOW_XON_XOFF."]
968 #[doc = " @param uXoffChar Character used to signal Xoff. Only used if flow control is\tFT_FLOW_XON_XOFF."]
969 #[doc = " @returns"]
970 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
971 pub fn FT_SetFlowControl(
972 ftHandle: FT_HANDLE,
973 usFlowControl: USHORT,
974 uXonChar: UCHAR,
975 uXoffChar: UCHAR,
976 ) -> FT_STATUS;
977}
978extern "C" {
979 #[doc = " @noop FT_SetDtr"]
980 #[doc = " @par Supported Operating Systems"]
981 #[doc = " Linux"]
982 #[doc = " Mac OS X (10.4 and later)"]
983 #[doc = " Windows (2000 and later)"]
984 #[doc = " Windows CE (4.2 and later)"]
985 #[doc = " @par Summary"]
986 #[doc = " This function sets the Data Terminal Ready (DTR) control signal."]
987 #[doc = " @param ftHandle Handle of the device."]
988 #[doc = " @returns"]
989 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
990 #[doc = " @remarks"]
991 #[doc = " This function asserts the Data Terminal Ready (DTR) line of the device."]
992 pub fn FT_SetDtr(ftHandle: FT_HANDLE) -> FT_STATUS;
993}
994extern "C" {
995 #[doc = " @noop FT_ClrDtr"]
996 #[doc = " @par Supported Operating Systems"]
997 #[doc = " Linux"]
998 #[doc = " Mac OS X (10.4 and later)"]
999 #[doc = " Windows (2000 and later)"]
1000 #[doc = " Windows CE (4.2 and later)"]
1001 #[doc = " @par Summary"]
1002 #[doc = " This function clears the Data Terminal Ready (DTR) control signal."]
1003 #[doc = " @param ftHandle Handle of the device."]
1004 #[doc = " @returns"]
1005 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1006 #[doc = " @remarks"]
1007 #[doc = " This function de-asserts the Data Terminal Ready (DTR) line of the device."]
1008 pub fn FT_ClrDtr(ftHandle: FT_HANDLE) -> FT_STATUS;
1009}
1010extern "C" {
1011 #[doc = " @noop FT_SetRts"]
1012 #[doc = " @par Supported Operating Systems"]
1013 #[doc = " Linux"]
1014 #[doc = " Mac OS X (10.4 and later)"]
1015 #[doc = " Windows (2000 and later)"]
1016 #[doc = " Windows CE (4.2 and later)"]
1017 #[doc = " @par Summary"]
1018 #[doc = " This function sets the Request To Send (RTS) control signal."]
1019 #[doc = " @param ftHandle Handle of the device."]
1020 #[doc = " @returns"]
1021 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1022 #[doc = " @remarks"]
1023 #[doc = " This function asserts the Request To Send (RTS) line of the device."]
1024 pub fn FT_SetRts(ftHandle: FT_HANDLE) -> FT_STATUS;
1025}
1026extern "C" {
1027 #[doc = " @noop FT_ClrRts"]
1028 #[doc = " @par Supported Operating Systems"]
1029 #[doc = " Linux"]
1030 #[doc = " Mac OS X (10.4 and later)"]
1031 #[doc = " Windows (2000 and later)"]
1032 #[doc = " Windows CE (4.2 and later)"]
1033 #[doc = " @par Summary"]
1034 #[doc = " This function clears the Request To Send (RTS) control signal."]
1035 #[doc = " @param ftHandle Handle of the device."]
1036 #[doc = " @returns"]
1037 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1038 #[doc = " @remarks"]
1039 #[doc = " This function de-asserts the Request To Send (RTS) line of the device."]
1040 pub fn FT_ClrRts(ftHandle: FT_HANDLE) -> FT_STATUS;
1041}
1042extern "C" {
1043 #[doc = " @noop FT_GetModemStatus"]
1044 #[doc = " @par Supported Operating Systems"]
1045 #[doc = " Linux"]
1046 #[doc = " Mac OS X (10.4 and later)"]
1047 #[doc = " Windows (2000 and later)"]
1048 #[doc = " Windows CE (4.2 and later)"]
1049 #[doc = " @par Summary"]
1050 #[doc = " Gets the modem status and line status from the device."]
1051 #[doc = " @param ftHandle Handle of the device."]
1052 #[doc = " @param lpdwModemStatus Pointer to a variable of type DWORD which receives the modem"]
1053 #[doc = " status and line status from the device."]
1054 #[doc = " @returns"]
1055 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1056 #[doc = " @remarks"]
1057 #[doc = " The least significant byte of the lpdwModemStatus value holds the modem status. On Windows and"]
1058 #[doc = " Windows CE, the line status is held in the second least significant byte of the lpdwModemStatus value."]
1059 #[doc = " @n The modem status is bit-mapped as follows: Clear To Send (CTS) = 0x10, Data Set Ready (DSR) = 0x20,"]
1060 #[doc = " Ring Indicator (RI) = 0x40, Data Carrier Detect (DCD) = 0x80."]
1061 #[doc = " @n The line status is bit-mapped as follows: Overrun Error (OE) = 0x02, Parity Error (PE) = 0x04, Framing"]
1062 #[doc = " Error (FE) = 0x08, Break Interrupt (BI) = 0x10."]
1063 pub fn FT_GetModemStatus(ftHandle: FT_HANDLE, lpdwModemStatus: *mut ULONG) -> FT_STATUS;
1064}
1065extern "C" {
1066 #[doc = " @noop FT_GetQueueStatus"]
1067 #[doc = " @par Supported Operating Systems"]
1068 #[doc = " Linux"]
1069 #[doc = " Mac OS X (10.4 and later)"]
1070 #[doc = " Windows (2000 and later)"]
1071 #[doc = " Windows CE (4.2 and later)"]
1072 #[doc = " @par Summary"]
1073 #[doc = " Gets the number of bytes in the receive queue."]
1074 #[doc = " @param ftHandle Handle of the device."]
1075 #[doc = " @param lpdwAmountInRxQueue Pointer to a variable of type DWORD which receives the number of"]
1076 #[doc = " bytes in the receive queue."]
1077 #[doc = " @returns"]
1078 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1079 pub fn FT_GetQueueStatus(ftHandle: FT_HANDLE, lpdwAmountInRxQueue: *mut DWORD) -> FT_STATUS;
1080}
1081extern "C" {
1082 #[doc = " @noop FT_GetDeviceInfo"]
1083 #[doc = " @par Supported Operating Systems"]
1084 #[doc = " Linux"]
1085 #[doc = " Mac OS X (10.4 and later)"]
1086 #[doc = " Windows (2000 and later)"]
1087 #[doc = " Windows CE (4.2 and later)"]
1088 #[doc = " @par Summary"]
1089 #[doc = " Get device information for an open device."]
1090 #[doc = " @param ftHandle Handle of the device."]
1091 #[doc = " @param lpftDevice Pointer to unsigned long to store device type."]
1092 #[doc = " @param lpdwID Pointer to unsigned long to store device ID."]
1093 #[doc = " @param pcSerialNumber Pointer to buffer to store device serial number as a nullterminated string."]
1094 #[doc = " @param pcDescription Pointer to buffer to store device description as a null-terminated string."]
1095 #[doc = " @param pvDummy Reserved for future use - should be set to NULL."]
1096 #[doc = " @returns"]
1097 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1098 #[doc = " @remarks"]
1099 #[doc = " This function is used to return the device type, device ID, device description and serial number."]
1100 #[doc = " The device ID is encoded in a DWORD - the most significant word contains the vendor ID, and the least"]
1101 #[doc = " significant word contains the product ID. So the returned ID 0x04036001 corresponds to the device ID"]
1102 #[doc = " VID_0403&PID_6001."]
1103 pub fn FT_GetDeviceInfo(
1104 ftHandle: FT_HANDLE,
1105 lpftDevice: *mut FT_DEVICE,
1106 lpdwID: LPDWORD,
1107 pcSerialNumber: PCHAR,
1108 pcDescription: PCHAR,
1109 pvDummy: LPVOID,
1110 ) -> FT_STATUS;
1111}
1112extern "C" {
1113 #[doc = " @note Extra function for non-Windows platforms to compensate for lack of .INF file to specify Vendor and Product IDs."]
1114 pub fn FT_GetDeviceLocId(ftHandle: FT_HANDLE, lpdwLocId: LPDWORD) -> FT_STATUS;
1115}
1116extern "C" {
1117 #[doc = " @noop FT_GetDriverVersion"]
1118 #[doc = " @par Supported Operating Systems"]
1119 #[doc = " Windows (2000 and later)"]
1120 #[doc = " Windows CE (4.2 and later)"]
1121 #[doc = " @par Summary"]
1122 #[doc = " This function returns the D2XX driver version number."]
1123 #[doc = " @param ftHandle Handle of the device."]
1124 #[doc = " @param lpdwDriverVersion Pointer to the driver version number."]
1125 #[doc = " @returns"]
1126 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1127 #[doc = " @remarks"]
1128 #[doc = " A version number consists of major, minor and build version numbers contained in a 4-byte field"]
1129 #[doc = " (unsigned long). Byte0 (least significant) holds the build version, Byte1 holds the minor version, and"]
1130 #[doc = " Byte2 holds the major version. Byte3 is currently set to zero."]
1131 #[doc = " @n For example, driver version \"2.04.06\" is represented as 0x00020406. Note that a device has to be"]
1132 #[doc = " opened before this function can be called."]
1133 pub fn FT_GetDriverVersion(ftHandle: FT_HANDLE, lpdwDriverVersion: LPDWORD) -> FT_STATUS;
1134}
1135extern "C" {
1136 #[doc = " @noop FT_GetLibraryVersion"]
1137 #[doc = " @par Supported Operating Systems"]
1138 #[doc = " Linux"]
1139 #[doc = " Mac OS X (10.4 and later)"]
1140 #[doc = " Windows (2000 and later)"]
1141 #[doc = " Windows CE (4.2 and later)"]
1142 #[doc = " @n"]
1143 #[doc = " This function returns D2XX DLL or library version number."]
1144 #[doc = " @param lpdwDLLVersion Pointer to the DLL or library version number."]
1145 #[doc = " @returns"]
1146 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1147 #[doc = " @remarks"]
1148 #[doc = " A version number consists of major, minor and build version numbers contained in a 4-byte field"]
1149 #[doc = " (unsigned long). Byte0 (least significant) holds the build version, Byte1 holds the minor version, and"]
1150 #[doc = " Byte2 holds the major version. Byte3 is currently set to zero."]
1151 #[doc = " @n For example, D2XX DLL version \"3.01.15\" is represented as 0x00030115. Note that this function does"]
1152 #[doc = " not take a handle, and so it can be called without opening a device."]
1153 pub fn FT_GetLibraryVersion(lpdwDLLVersion: LPDWORD) -> FT_STATUS;
1154}
1155extern "C" {
1156 #[doc = " @noop FT_GetComPortNumber"]
1157 #[doc = " @par Supported Operating Systems"]
1158 #[doc = " Windows (2000 and later)"]
1159 #[doc = " @par Summary"]
1160 #[doc = " Retrieves the COM port associated with a device."]
1161 #[doc = " @param ftHandle Handle of the device."]
1162 #[doc = " @param lplComPortNumber Pointer to a variable of type LONG which receives the COM port number"]
1163 #[doc = " associated with the device."]
1164 #[doc = " @returns"]
1165 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1166 #[doc = " @remarks"]
1167 #[doc = " This function is only available when using the Windows CDM driver as both the D2XX and VCP drivers can"]
1168 #[doc = " be installed at the same time."]
1169 #[doc = " @n If no COM port is associated with the device, lplComPortNumber will have a value of -1"]
1170 pub fn FT_GetComPortNumber(ftHandle: FT_HANDLE, lplComPortNumber: LPLONG) -> FT_STATUS;
1171}
1172extern "C" {
1173 #[doc = " @noop FT_GetStatus"]
1174 #[doc = " @par Supported Operating Systems"]
1175 #[doc = " Linux"]
1176 #[doc = " Mac OS X (10.4 and later)"]
1177 #[doc = " Windows (2000 and later)"]
1178 #[doc = " Windows CE (4.2 and later)"]
1179 #[doc = " @par Summary"]
1180 #[doc = " Gets the device status including number of characters in the receive queue, number of characters in the"]
1181 #[doc = " transmit queue, and the current event status."]
1182 #[doc = " @param ftHandle Handle of the device."]
1183 #[doc = " @param lpdwAmountInRxQueue Pointer to a variable of type DWORD which receives the number of characters in"]
1184 #[doc = " the receive queue."]
1185 #[doc = " @param lpdwAmountInTxQueue Pointer to a variable of type DWORD which receives the number of characters in"]
1186 #[doc = " the transmit queue."]
1187 #[doc = " @param lpdwEventStatus Pointer to a variable of type DWORD which receives the current state of"]
1188 #[doc = " the event status."]
1189 #[doc = " @returns"]
1190 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1191 #[doc = " @remarks"]
1192 #[doc = " For an example of how to use this function, see the sample code in FT_SetEventNotification."]
1193 pub fn FT_GetStatus(
1194 ftHandle: FT_HANDLE,
1195 lpdwAmountInRxQueue: *mut DWORD,
1196 lpdwAmountInTxQueue: *mut DWORD,
1197 lpdwEventStatus: *mut DWORD,
1198 ) -> FT_STATUS;
1199}
1200extern "C" {
1201 #[doc = " @noop FT_SetEventNotification"]
1202 #[doc = " @par Supported Operating Systems"]
1203 #[doc = " Linux"]
1204 #[doc = " Mac OS X (10.4 and later)"]
1205 #[doc = " Windows (2000 and later)"]
1206 #[doc = " Windows CE (4.2 and later)"]
1207 #[doc = " @par Summary"]
1208 #[doc = " Sets conditions for event notification."]
1209 #[doc = " @param ftHandle Handle of the device."]
1210 #[doc = " @param dwEventMask Conditions that cause the event to be set."]
1211 #[doc = " @param pvArg Interpreted as the handle of an event."]
1212 #[doc = " @returns"]
1213 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1214 #[doc = " @remarks"]
1215 #[doc = " An application can use this function to setup conditions which allow a thread to block until one of the"]
1216 #[doc = " conditions is met. Typically, an application will create an event, call this function, then block on the"]
1217 #[doc = " event. When the conditions are met, the event is set, and the application thread unblocked."]
1218 #[doc = " dwEventMask is a bit-map that describes the events the application is interested in. pvArg is interpreted"]
1219 #[doc = " as the handle of an event which has been created by the application. If one of the event conditions is"]
1220 #[doc = " met, the event is set."]
1221 #[doc = " @n If FT_EVENT_RXCHAR is set in dwEventMask, the event will be set when a character has been received"]
1222 #[doc = " by the device."]
1223 #[doc = " @n If FT_EVENT_MODEM_STATUS is set in dwEventMask, the event will be set when a change in the modem"]
1224 #[doc = " signals has been detected by the device."]
1225 #[doc = " @n If FT_EVENT_LINE_STATUS is set in dwEventMask, the event will be set when a change in the line status"]
1226 #[doc = " has been detected by the device."]
1227 pub fn FT_SetEventNotification(
1228 ftHandle: FT_HANDLE,
1229 dwEventMask: DWORD,
1230 pvArg: PVOID,
1231 ) -> FT_STATUS;
1232}
1233extern "C" {
1234 #[doc = " @noop FT_SetChars"]
1235 #[doc = " @par Supported Operating Systems"]
1236 #[doc = " Linux"]
1237 #[doc = " Mac OS X (10.4 and later)"]
1238 #[doc = " Windows (2000 and later)"]
1239 #[doc = " Windows CE (4.2 and later)"]
1240 #[doc = " @par Summary"]
1241 #[doc = " This function sets the special characters for the device."]
1242 #[doc = " @param ftHandle Handle of the device."]
1243 #[doc = " @param uEventChar Event character."]
1244 #[doc = " @param uEventCharEnabled 0 if event character disabled, non-zero otherwise."]
1245 #[doc = " @param uErrorChar Error character."]
1246 #[doc = " @param uErrorCharEnabled 0 if error character disabled, non-zero otherwise."]
1247 #[doc = " @returns"]
1248 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1249 #[doc = " @remarks"]
1250 #[doc = " This function allows for inserting specified characters in the data stream to represent events firing or"]
1251 #[doc = " errors occurring."]
1252 pub fn FT_SetChars(
1253 ftHandle: FT_HANDLE,
1254 uEventChar: UCHAR,
1255 uEventCharEnabled: UCHAR,
1256 uErrorChar: UCHAR,
1257 uErrorCharEnabled: UCHAR,
1258 ) -> FT_STATUS;
1259}
1260extern "C" {
1261 #[doc = " @noop FT_SetBreakOn"]
1262 #[doc = " @par Supported Operating Systems"]
1263 #[doc = " Linux"]
1264 #[doc = " Mac OS X (10.4 and later)"]
1265 #[doc = " Windows (2000 and later)"]
1266 #[doc = " Windows CE (4.2 and later)"]
1267 #[doc = " @par Summary"]
1268 #[doc = " Sets the BREAK condition for the device."]
1269 #[doc = " @param ftHandle Handle of the device."]
1270 #[doc = " @returns"]
1271 #[doc = " FT_OK if successful, otherwise the return value is an FT error code"]
1272 pub fn FT_SetBreakOn(ftHandle: FT_HANDLE) -> FT_STATUS;
1273}
1274extern "C" {
1275 #[doc = " @noop FT_SetBreakOff"]
1276 #[doc = " @par Supported Operating Systems"]
1277 #[doc = " Linux"]
1278 #[doc = " Mac OS X (10.4 and later)"]
1279 #[doc = " Windows (2000 and later)"]
1280 #[doc = " Windows CE (4.2 and later)"]
1281 #[doc = " @par Summary"]
1282 #[doc = " Resets the BREAK condition for the device."]
1283 #[doc = " @param ftHandle Handle of the device."]
1284 #[doc = " @returns"]
1285 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1286 pub fn FT_SetBreakOff(ftHandle: FT_HANDLE) -> FT_STATUS;
1287}
1288extern "C" {
1289 #[doc = " @noop FT_Purge"]
1290 #[doc = " @par Supported Operating Systems"]
1291 #[doc = " Linux"]
1292 #[doc = " Mac OS X (10.4 and later)"]
1293 #[doc = " Windows (2000 and later)"]
1294 #[doc = " Windows CE (4.2 and later)"]
1295 #[doc = " @par Summary"]
1296 #[doc = " This function purges receive and transmit buffers in the device."]
1297 #[doc = " @param ftHandle Handle of the device."]
1298 #[doc = " @param ulMask Combination of FT_PURGE_RX and FT_PURGE_TX."]
1299 #[doc = " @returns"]
1300 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1301 pub fn FT_Purge(ftHandle: FT_HANDLE, ulMask: ULONG) -> FT_STATUS;
1302}
1303extern "C" {
1304 #[doc = " @noop FT_ResetDevice"]
1305 #[doc = " @par Supported Operating Systems"]
1306 #[doc = " Linux"]
1307 #[doc = " Mac OS X (10.4 and later)"]
1308 #[doc = " Windows (2000 and later)"]
1309 #[doc = " Windows CE (4.2 and later)"]
1310 #[doc = " @par Summary"]
1311 #[doc = " This function sends a reset command to the device."]
1312 #[doc = " @param ftHandle Handle of the device."]
1313 #[doc = " @returns"]
1314 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1315 pub fn FT_ResetDevice(ftHandle: FT_HANDLE) -> FT_STATUS;
1316}
1317extern "C" {
1318 #[doc = " @noop FT_ResetPort"]
1319 #[doc = " @par Supported Operating Systems"]
1320 #[doc = " Windows (2000 and later)"]
1321 #[doc = " @par Summary"]
1322 #[doc = " Send a reset command to the port."]
1323 #[doc = " @param ftHandle Handle of the device."]
1324 #[doc = " @returns"]
1325 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1326 #[doc = " @remarks"]
1327 #[doc = " This function is used to attempt to recover the port after a failure. It is not equivalent"]
1328 #[doc = " to an unplug-replug event. For the equivalent of an unplug-replug event, use FT_CyclePort."]
1329 #[doc = " @see FT_CyclePort"]
1330 pub fn FT_ResetPort(ftHandle: FT_HANDLE) -> FT_STATUS;
1331}
1332extern "C" {
1333 #[doc = " @noop FT_CyclePort"]
1334 #[doc = " @par Supported Operating Systems"]
1335 #[doc = " Windows (2000 and later)"]
1336 #[doc = " @par Summary"]
1337 #[doc = " Send a cycle command to the USB port."]
1338 #[doc = " @param ftHandle Handle of the device."]
1339 #[doc = " @returns"]
1340 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1341 #[doc = " @remarks"]
1342 #[doc = " The effect of this function is the same as disconnecting then reconnecting the device from"]
1343 #[doc = " USB. Possible use of this function is situations where a fatal error has occurred and it is"]
1344 #[doc = " difficult, or not possible, to recover without unplugging and replugging the USB cable."]
1345 #[doc = " This function can also be used after reprogramming the EEPROM to force the FTDI device to"]
1346 #[doc = " read the new EEPROM contents which would\totherwise require a physical disconnect-reconnect."]
1347 #[doc = " @n As the current session is not restored when the driver is reloaded, the application must"]
1348 #[doc = " be able to recover after calling this function. It is ithe responisbility of the application"]
1349 #[doc = " to close the handle after successfully calling FT_CyclePort."]
1350 #[doc = " @n For FT4232H, FT2232H and FT2232 devices, FT_CyclePort will only work under Windows XP and later."]
1351 pub fn FT_CyclePort(ftHandle: FT_HANDLE) -> FT_STATUS;
1352}
1353extern "C" {
1354 #[doc = " @noop FT_Rescan"]
1355 #[doc = " @par Supported Operating Systems"]
1356 #[doc = " Windows (2000 and later)"]
1357 #[doc = " @par Summary"]
1358 #[doc = " This function can be of use when trying to recover devices programatically."]
1359 #[doc = " @returns"]
1360 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1361 #[doc = " @remarks"]
1362 #[doc = " Calling FT_Rescan is equivalent to clicking the \"Scan for hardware changes\" button in the Device"]
1363 #[doc = " Manager. Only USB hardware is checked for new devices. All USB devices are scanned, not just FTDI"]
1364 #[doc = " devices."]
1365 pub fn FT_Rescan() -> FT_STATUS;
1366}
1367extern "C" {
1368 #[doc = " @noop FT_Reload"]
1369 #[doc = " @par Supported Operating Systems"]
1370 #[doc = " Windows (2000 and later)"]
1371 #[doc = " @par Summary"]
1372 #[doc = " This function forces a reload of the driver for devices with a specific VID and PID combination."]
1373 #[doc = " @param wVID Vendor ID of the devices to reload the driver for."]
1374 #[doc = " @param wPID Product ID of the devices to reload the driver for."]
1375 #[doc = " @returns"]
1376 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1377 #[doc = " @remarks"]
1378 #[doc = " Calling FT_Reload forces the operating system to unload and reload the driver for the specified device"]
1379 #[doc = " IDs. If the VID and PID parameters are null, the drivers for USB root hubs will be reloaded, causing all"]
1380 #[doc = " USB devices connected to reload their drivers. Please note that this function will not work correctly on"]
1381 #[doc = " 64-bit Windows when called from a 32-bit application."]
1382 pub fn FT_Reload(wVID: WORD, wPID: WORD) -> FT_STATUS;
1383}
1384extern "C" {
1385 #[doc = " @noop FT_SetResetPipeRetryCount"]
1386 #[doc = " @par Supported Operating Systems"]
1387 #[doc = " Windows (2000 and later)"]
1388 #[doc = " Windows CE (4.2 and later)"]
1389 #[doc = " @par Summary"]
1390 #[doc = " Set the ResetPipeRetryCount value."]
1391 #[doc = " @param ftHandle Handle of the device."]
1392 #[doc = " @param dwCount Unsigned long containing required ResetPipeRetryCount."]
1393 #[doc = " @returns"]
1394 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1395 #[doc = " @remarks"]
1396 #[doc = " This function is used to set the ResetPipeRetryCount. ResetPipeRetryCount controls the maximum"]
1397 #[doc = " number of times that the driver tries to reset a pipe on which an error has occurred."]
1398 #[doc = " ResetPipeRequestRetryCount defaults to 50. It may be necessary to increase this value in noisy"]
1399 #[doc = " environments where a lot of USB errors occur."]
1400 pub fn FT_SetResetPipeRetryCount(ftHandle: FT_HANDLE, dwCount: DWORD) -> FT_STATUS;
1401}
1402extern "C" {
1403 #[doc = " @noop FT_StopInTask"]
1404 #[doc = " @par Supported Operating Systems"]
1405 #[doc = " Linux"]
1406 #[doc = " Mac OS X (10.4 and later)"]
1407 #[doc = " Windows (2000 and later)"]
1408 #[doc = " Windows CE (4.2 and later)"]
1409 #[doc = " @par Summary"]
1410 #[doc = " Stops the driver's IN task."]
1411 #[doc = " @param ftHandle Handle of the device."]
1412 #[doc = " @returns"]
1413 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1414 #[doc = " @remarks"]
1415 #[doc = " This function is used to put the driver's IN task (read) into a wait state. It can be used in situations"]
1416 #[doc = " where data is being received continuously, so that the device can be purged without more data being"]
1417 #[doc = " received. It is used together with FT_RestartInTask which sets the IN task running again."]
1418 #[doc = " @see FT_RestartInTask"]
1419 pub fn FT_StopInTask(ftHandle: FT_HANDLE) -> FT_STATUS;
1420}
1421extern "C" {
1422 #[doc = " @noop FT_RestartInTask"]
1423 #[doc = " @par Supported Operating Systems"]
1424 #[doc = " Linux"]
1425 #[doc = " Mac OS X (10.4 and later)"]
1426 #[doc = " Windows (2000 and later)"]
1427 #[doc = " Windows CE (4.2 and later)"]
1428 #[doc = " @par Summary"]
1429 #[doc = " Restart the driver's IN task."]
1430 #[doc = " @param ftHandle Handle of the device."]
1431 #[doc = " @returns"]
1432 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1433 #[doc = " @remarks"]
1434 #[doc = " This function is used to restart the driver's IN task (read) after it has been stopped by a call to"]
1435 #[doc = " FT_StopInTask."]
1436 #[doc = " @see FT_StopInTask"]
1437 pub fn FT_RestartInTask(ftHandle: FT_HANDLE) -> FT_STATUS;
1438}
1439extern "C" {
1440 #[doc = " @noop FT_SetDeadmanTimeout"]
1441 #[doc = " @par Supported Operating Systems"]
1442 #[doc = " Linux"]
1443 #[doc = " Mac OS X (10.4 and later)"]
1444 #[doc = " Windows (2000 and later)"]
1445 #[doc = " Windows CE (4.2 and later)"]
1446 #[doc = " @par Summary"]
1447 #[doc = " This function allows the maximum time in milliseconds that a USB request can remain outstanding to"]
1448 #[doc = " be set."]
1449 #[doc = " @param ftHandle Handle of the device."]
1450 #[doc = " @param ulDeadmanTimeout Deadman timeout value in milliseconds. Default value is 5000."]
1451 #[doc = " @returns"]
1452 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1453 #[doc = " @remarks"]
1454 #[doc = " The deadman timeout is referred to in application note AN232B-10 Advanced Driver Options from the"]
1455 #[doc = " FTDI web site as the USB timeout. It is unlikely that this function will be required by most users."]
1456 pub fn FT_SetDeadmanTimeout(ftHandle: FT_HANDLE, ulDeadmanTimeout: ULONG) -> FT_STATUS;
1457}
1458extern "C" {
1459 #[doc = " @noop FT_IoCtl"]
1460 #[doc = " Undocumented function."]
1461 pub fn FT_IoCtl(
1462 ftHandle: FT_HANDLE,
1463 dwIoControlCode: DWORD,
1464 lpInBuf: LPVOID,
1465 nInBufSize: DWORD,
1466 lpOutBuf: LPVOID,
1467 nOutBufSize: DWORD,
1468 lpBytesReturned: LPDWORD,
1469 lpOverlapped: LPOVERLAPPED,
1470 ) -> FT_STATUS;
1471}
1472extern "C" {
1473 #[doc = " @noop FT_SetWaitMask"]
1474 #[doc = " Undocumented function."]
1475 pub fn FT_SetWaitMask(ftHandle: FT_HANDLE, Mask: DWORD) -> FT_STATUS;
1476}
1477extern "C" {
1478 #[doc = " @noop FT_WaitOnMask"]
1479 #[doc = " Undocumented function."]
1480 pub fn FT_WaitOnMask(ftHandle: FT_HANDLE, Mask: *mut DWORD) -> FT_STATUS;
1481}
1482extern "C" {
1483 #[doc = " @noop FT_GetEventStatus"]
1484 #[doc = " Undocumented function."]
1485 pub fn FT_GetEventStatus(ftHandle: FT_HANDLE, dwEventDWord: *mut DWORD) -> FT_STATUS;
1486}
1487extern "C" {
1488 #[doc = " @noop FT_ReadEE"]
1489 #[doc = " @par Supported Operating Systems"]
1490 #[doc = " Linux"]
1491 #[doc = " Mac OS X (10.4 and later)"]
1492 #[doc = " Windows (2000 and later)"]
1493 #[doc = " Windows CE (4.2 and later)"]
1494 #[doc = " @par Summary"]
1495 #[doc = " Read a value from an EEPROM location."]
1496 #[doc = " @param ftHandle Handle of the device."]
1497 #[doc = " @param dwWordOffset EEPROM location to read from."]
1498 #[doc = " @param lpwValue Pointer to the WORD value read from the EEPROM."]
1499 #[doc = " @returns"]
1500 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1501 #[doc = " @remarks"]
1502 #[doc = " EEPROMs for FTDI devices are organised by WORD, so each value returned is 16-bits wide."]
1503 pub fn FT_ReadEE(ftHandle: FT_HANDLE, dwWordOffset: DWORD, lpwValue: LPWORD) -> FT_STATUS;
1504}
1505extern "C" {
1506 #[doc = " @noop FT_WriteEE"]
1507 #[doc = " @par Supported Operating Systems"]
1508 #[doc = " Linux"]
1509 #[doc = " Mac OS X (10.4 and later)"]
1510 #[doc = " Windows (2000 and later)"]
1511 #[doc = " Windows CE (4.2 and later)"]
1512 #[doc = " @par Summary"]
1513 #[doc = " Write a value to an EEPROM location."]
1514 #[doc = " @param ftHandle Handle of the device."]
1515 #[doc = " @param dwWordOffset EEPROM location to read from."]
1516 #[doc = " @param wValue The WORD value write to the EEPROM."]
1517 #[doc = " @returns"]
1518 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1519 #[doc = " @remarks"]
1520 #[doc = " EEPROMs for FTDI devices are organised by WORD, so each value written to the EEPROM is"]
1521 #[doc = " 16-bits wide."]
1522 pub fn FT_WriteEE(ftHandle: FT_HANDLE, dwWordOffset: DWORD, wValue: WORD) -> FT_STATUS;
1523}
1524extern "C" {
1525 #[doc = " @noop FT_EraseEE"]
1526 #[doc = " @par Supported Operating Systems"]
1527 #[doc = " Linux"]
1528 #[doc = " Mac OS X (10.4 and later)"]
1529 #[doc = " Windows (2000 and later)"]
1530 #[doc = " Windows CE (4.2 and later)"]
1531 #[doc = " @par Summary"]
1532 #[doc = " Erases the device EEPROM."]
1533 #[doc = " @param ftHandle Handle of the device."]
1534 #[doc = " @returns"]
1535 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
1536 #[doc = " @remarks"]
1537 #[doc = " This function will erase the entire contents of an EEPROM, including the user area."]
1538 #[doc = " Note that the FT232R\tand FT245R devices have an internal EEPROM that cannot be erased."]
1539 pub fn FT_EraseEE(ftHandle: FT_HANDLE) -> FT_STATUS;
1540}
1541#[doc = " Structure to hold program data for FT_EE_Program, FT_EE_ProgramEx, FT_EE_Read"]
1542#[doc = " and FT_EE_ReadEx functions."]
1543#[doc = " @see FT_EE_Read"]
1544#[doc = " @see FT_EE_ReadEx"]
1545#[doc = " @see FT_EE_Program"]
1546#[doc = " @see FT_EE_ProgramEx"]
1547#[repr(C)]
1548#[derive(Debug, Copy, Clone)]
1549pub struct ft_program_data {
1550 pub Signature1: DWORD,
1551 #[doc = " Header - must be 0x00000000"]
1552 pub Signature2: DWORD,
1553 #[doc = " Header - must be 0xffffffff"]
1554 pub Version: DWORD,
1555 #[doc = " Header - FT_PROGRAM_DATA version"]
1556 pub VendorId: WORD,
1557 #[doc = " 0x0403"]
1558 pub ProductId: WORD,
1559 #[doc = " 0x6001"]
1560 pub Manufacturer: *mut ::std::os::raw::c_char,
1561 #[doc = " \"FTDI\""]
1562 pub ManufacturerId: *mut ::std::os::raw::c_char,
1563 #[doc = " \"FT\""]
1564 pub Description: *mut ::std::os::raw::c_char,
1565 #[doc = " \"USB HS Serial Converter\""]
1566 pub SerialNumber: *mut ::std::os::raw::c_char,
1567 #[doc = " \"FT000001\" if fixed, or NULL"]
1568 pub MaxPower: WORD,
1569 #[doc = " 0 < MaxPower <= 500"]
1570 pub PnP: WORD,
1571 #[doc = " 0 = disabled, 1 = enabled"]
1572 pub SelfPowered: WORD,
1573 #[doc = " 0 = bus powered, 1 = self powered"]
1574 pub RemoteWakeup: WORD,
1575 #[doc = " 0 = not capable, 1 = capable"]
1576 #[doc = " Rev4 (FT232B) extensions"]
1577 pub Rev4: UCHAR,
1578 #[doc = " non-zero if Rev4 chip, zero otherwise"]
1579 pub IsoIn: UCHAR,
1580 #[doc = " non-zero if in endpoint is isochronous"]
1581 pub IsoOut: UCHAR,
1582 #[doc = " non-zero if out endpoint is isochronous"]
1583 pub PullDownEnable: UCHAR,
1584 #[doc = " non-zero if pull down enabled"]
1585 pub SerNumEnable: UCHAR,
1586 #[doc = " non-zero if serial number to be used"]
1587 pub USBVersionEnable: UCHAR,
1588 #[doc = " non-zero if chip uses USBVersion"]
1589 pub USBVersion: WORD,
1590 #[doc = " BCD (0x0200 => USB2)"]
1591 #[doc = " Rev 5 (FT2232) extensions"]
1592 pub Rev5: UCHAR,
1593 #[doc = " non-zero if Rev5 chip, zero otherwise"]
1594 pub IsoInA: UCHAR,
1595 #[doc = " non-zero if in endpoint is isochronous"]
1596 pub IsoInB: UCHAR,
1597 #[doc = " non-zero if in endpoint is isochronous"]
1598 pub IsoOutA: UCHAR,
1599 #[doc = " non-zero if out endpoint is isochronous"]
1600 pub IsoOutB: UCHAR,
1601 #[doc = " non-zero if out endpoint is isochronous"]
1602 pub PullDownEnable5: UCHAR,
1603 #[doc = " non-zero if pull down enabled"]
1604 pub SerNumEnable5: UCHAR,
1605 #[doc = " non-zero if serial number to be used"]
1606 pub USBVersionEnable5: UCHAR,
1607 #[doc = " non-zero if chip uses USBVersion"]
1608 pub USBVersion5: WORD,
1609 #[doc = " BCD (0x0200 => USB2)"]
1610 pub AIsHighCurrent: UCHAR,
1611 #[doc = " non-zero if interface is high current"]
1612 pub BIsHighCurrent: UCHAR,
1613 #[doc = " non-zero if interface is high current"]
1614 pub IFAIsFifo: UCHAR,
1615 #[doc = " non-zero if interface is 245 FIFO"]
1616 pub IFAIsFifoTar: UCHAR,
1617 #[doc = " non-zero if interface is 245 FIFO CPU target"]
1618 pub IFAIsFastSer: UCHAR,
1619 #[doc = " non-zero if interface is Fast serial"]
1620 pub AIsVCP: UCHAR,
1621 #[doc = " non-zero if interface is to use VCP drivers"]
1622 pub IFBIsFifo: UCHAR,
1623 #[doc = " non-zero if interface is 245 FIFO"]
1624 pub IFBIsFifoTar: UCHAR,
1625 #[doc = " non-zero if interface is 245 FIFO CPU target"]
1626 pub IFBIsFastSer: UCHAR,
1627 #[doc = " non-zero if interface is Fast serial"]
1628 pub BIsVCP: UCHAR,
1629 #[doc = " non-zero if interface is to use VCP drivers"]
1630 #[doc = " Rev 6 (FT232R) extensions"]
1631 pub UseExtOsc: UCHAR,
1632 #[doc = " Use External Oscillator"]
1633 pub HighDriveIOs: UCHAR,
1634 #[doc = " High Drive I/Os"]
1635 pub EndpointSize: UCHAR,
1636 #[doc = " Endpoint size"]
1637 pub PullDownEnableR: UCHAR,
1638 #[doc = " non-zero if pull down enabled"]
1639 pub SerNumEnableR: UCHAR,
1640 #[doc = " non-zero if serial number to be used"]
1641 pub InvertTXD: UCHAR,
1642 #[doc = " non-zero if invert TXD"]
1643 pub InvertRXD: UCHAR,
1644 #[doc = " non-zero if invert RXD"]
1645 pub InvertRTS: UCHAR,
1646 #[doc = " non-zero if invert RTS"]
1647 pub InvertCTS: UCHAR,
1648 #[doc = " non-zero if invert CTS"]
1649 pub InvertDTR: UCHAR,
1650 #[doc = " non-zero if invert DTR"]
1651 pub InvertDSR: UCHAR,
1652 #[doc = " non-zero if invert DSR"]
1653 pub InvertDCD: UCHAR,
1654 #[doc = " non-zero if invert DCD"]
1655 pub InvertRI: UCHAR,
1656 #[doc = " non-zero if invert RI"]
1657 pub Cbus0: UCHAR,
1658 #[doc = " Cbus Mux control"]
1659 pub Cbus1: UCHAR,
1660 #[doc = " Cbus Mux control"]
1661 pub Cbus2: UCHAR,
1662 #[doc = " Cbus Mux control"]
1663 pub Cbus3: UCHAR,
1664 #[doc = " Cbus Mux control"]
1665 pub Cbus4: UCHAR,
1666 #[doc = " Cbus Mux control"]
1667 pub RIsD2XX: UCHAR,
1668 #[doc = " non-zero if using D2XX driver"]
1669 #[doc = " Rev 7 (FT2232H) Extensions"]
1670 pub PullDownEnable7: UCHAR,
1671 #[doc = " non-zero if pull down enabled"]
1672 pub SerNumEnable7: UCHAR,
1673 #[doc = " non-zero if serial number to be used"]
1674 pub ALSlowSlew: UCHAR,
1675 #[doc = " non-zero if AL pins have slow slew"]
1676 pub ALSchmittInput: UCHAR,
1677 #[doc = " non-zero if AL pins are Schmitt input"]
1678 pub ALDriveCurrent: UCHAR,
1679 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
1680 pub AHSlowSlew: UCHAR,
1681 #[doc = " non-zero if AH pins have slow slew"]
1682 pub AHSchmittInput: UCHAR,
1683 #[doc = " non-zero if AH pins are Schmitt input"]
1684 pub AHDriveCurrent: UCHAR,
1685 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
1686 pub BLSlowSlew: UCHAR,
1687 #[doc = " non-zero if BL pins have slow slew"]
1688 pub BLSchmittInput: UCHAR,
1689 #[doc = " non-zero if BL pins are Schmitt input"]
1690 pub BLDriveCurrent: UCHAR,
1691 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
1692 pub BHSlowSlew: UCHAR,
1693 #[doc = " non-zero if BH pins have slow slew"]
1694 pub BHSchmittInput: UCHAR,
1695 #[doc = " non-zero if BH pins are Schmitt input"]
1696 pub BHDriveCurrent: UCHAR,
1697 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
1698 pub IFAIsFifo7: UCHAR,
1699 #[doc = " non-zero if interface is 245 FIFO"]
1700 pub IFAIsFifoTar7: UCHAR,
1701 #[doc = " non-zero if interface is 245 FIFO CPU target"]
1702 pub IFAIsFastSer7: UCHAR,
1703 #[doc = " non-zero if interface is Fast serial"]
1704 pub AIsVCP7: UCHAR,
1705 #[doc = " non-zero if interface is to use VCP drivers"]
1706 pub IFBIsFifo7: UCHAR,
1707 #[doc = " non-zero if interface is 245 FIFO"]
1708 pub IFBIsFifoTar7: UCHAR,
1709 #[doc = " non-zero if interface is 245 FIFO CPU target"]
1710 pub IFBIsFastSer7: UCHAR,
1711 #[doc = " non-zero if interface is Fast serial"]
1712 pub BIsVCP7: UCHAR,
1713 #[doc = " non-zero if interface is to use VCP drivers"]
1714 pub PowerSaveEnable: UCHAR,
1715 #[doc = " non-zero if using BCBUS7 to save power for self-powered designs"]
1716 #[doc = " Rev 8 (FT4232H) Extensions"]
1717 pub PullDownEnable8: UCHAR,
1718 #[doc = " non-zero if pull down enabled"]
1719 pub SerNumEnable8: UCHAR,
1720 #[doc = " non-zero if serial number to be used"]
1721 pub ASlowSlew: UCHAR,
1722 #[doc = " non-zero if A pins have slow slew"]
1723 pub ASchmittInput: UCHAR,
1724 #[doc = " non-zero if A pins are Schmitt input"]
1725 pub ADriveCurrent: UCHAR,
1726 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
1727 pub BSlowSlew: UCHAR,
1728 #[doc = " non-zero if B pins have slow slew"]
1729 pub BSchmittInput: UCHAR,
1730 #[doc = " non-zero if B pins are Schmitt input"]
1731 pub BDriveCurrent: UCHAR,
1732 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
1733 pub CSlowSlew: UCHAR,
1734 #[doc = " non-zero if C pins have slow slew"]
1735 pub CSchmittInput: UCHAR,
1736 #[doc = " non-zero if C pins are Schmitt input"]
1737 pub CDriveCurrent: UCHAR,
1738 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
1739 pub DSlowSlew: UCHAR,
1740 #[doc = " non-zero if D pins have slow slew"]
1741 pub DSchmittInput: UCHAR,
1742 #[doc = " non-zero if D pins are Schmitt input"]
1743 pub DDriveCurrent: UCHAR,
1744 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
1745 pub ARIIsTXDEN: UCHAR,
1746 #[doc = " non-zero if port A uses RI as RS485 TXDEN"]
1747 pub BRIIsTXDEN: UCHAR,
1748 #[doc = " non-zero if port B uses RI as RS485 TXDEN"]
1749 pub CRIIsTXDEN: UCHAR,
1750 #[doc = " non-zero if port C uses RI as RS485 TXDEN"]
1751 pub DRIIsTXDEN: UCHAR,
1752 #[doc = " non-zero if port D uses RI as RS485 TXDEN"]
1753 pub AIsVCP8: UCHAR,
1754 #[doc = " non-zero if interface is to use VCP drivers"]
1755 pub BIsVCP8: UCHAR,
1756 #[doc = " non-zero if interface is to use VCP drivers"]
1757 pub CIsVCP8: UCHAR,
1758 #[doc = " non-zero if interface is to use VCP drivers"]
1759 pub DIsVCP8: UCHAR,
1760 #[doc = " non-zero if interface is to use VCP drivers"]
1761 #[doc = " Rev 9 (FT232H) Extensions"]
1762 pub PullDownEnableH: UCHAR,
1763 #[doc = " non-zero if pull down enabled"]
1764 pub SerNumEnableH: UCHAR,
1765 #[doc = " non-zero if serial number to be used"]
1766 pub ACSlowSlewH: UCHAR,
1767 #[doc = " non-zero if AC pins have slow slew"]
1768 pub ACSchmittInputH: UCHAR,
1769 #[doc = " non-zero if AC pins are Schmitt input"]
1770 pub ACDriveCurrentH: UCHAR,
1771 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
1772 pub ADSlowSlewH: UCHAR,
1773 #[doc = " non-zero if AD pins have slow slew"]
1774 pub ADSchmittInputH: UCHAR,
1775 #[doc = " non-zero if AD pins are Schmitt input"]
1776 pub ADDriveCurrentH: UCHAR,
1777 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
1778 pub Cbus0H: UCHAR,
1779 #[doc = " Cbus Mux control"]
1780 pub Cbus1H: UCHAR,
1781 #[doc = " Cbus Mux control"]
1782 pub Cbus2H: UCHAR,
1783 #[doc = " Cbus Mux control"]
1784 pub Cbus3H: UCHAR,
1785 #[doc = " Cbus Mux control"]
1786 pub Cbus4H: UCHAR,
1787 #[doc = " Cbus Mux control"]
1788 pub Cbus5H: UCHAR,
1789 #[doc = " Cbus Mux control"]
1790 pub Cbus6H: UCHAR,
1791 #[doc = " Cbus Mux control"]
1792 pub Cbus7H: UCHAR,
1793 #[doc = " Cbus Mux control"]
1794 pub Cbus8H: UCHAR,
1795 #[doc = " Cbus Mux control"]
1796 pub Cbus9H: UCHAR,
1797 #[doc = " Cbus Mux control"]
1798 pub IsFifoH: UCHAR,
1799 #[doc = " non-zero if interface is 245 FIFO"]
1800 pub IsFifoTarH: UCHAR,
1801 #[doc = " non-zero if interface is 245 FIFO CPU target"]
1802 pub IsFastSerH: UCHAR,
1803 #[doc = " non-zero if interface is Fast serial"]
1804 pub IsFT1248H: UCHAR,
1805 #[doc = " non-zero if interface is FT1248"]
1806 pub FT1248CpolH: UCHAR,
1807 #[doc = " FT1248 clock polarity - clock idle high (1) or clock idle low (0)"]
1808 pub FT1248LsbH: UCHAR,
1809 #[doc = " FT1248 data is LSB (1) or MSB (0)"]
1810 pub FT1248FlowControlH: UCHAR,
1811 #[doc = " FT1248 flow control enable"]
1812 pub IsVCPH: UCHAR,
1813 #[doc = " non-zero if interface is to use VCP drivers"]
1814 pub PowerSaveEnableH: UCHAR,
1815}
1816#[test]
1817fn bindgen_test_layout_ft_program_data() {
1818 assert_eq!(
1819 ::std::mem::size_of::<ft_program_data>(),
1820 176usize,
1821 concat!("Size of: ", stringify!(ft_program_data))
1822 );
1823 assert_eq!(
1824 ::std::mem::align_of::<ft_program_data>(),
1825 8usize,
1826 concat!("Alignment of ", stringify!(ft_program_data))
1827 );
1828 assert_eq!(
1829 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Signature1 as *const _ as usize },
1830 0usize,
1831 concat!(
1832 "Offset of field: ",
1833 stringify!(ft_program_data),
1834 "::",
1835 stringify!(Signature1)
1836 )
1837 );
1838 assert_eq!(
1839 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Signature2 as *const _ as usize },
1840 4usize,
1841 concat!(
1842 "Offset of field: ",
1843 stringify!(ft_program_data),
1844 "::",
1845 stringify!(Signature2)
1846 )
1847 );
1848 assert_eq!(
1849 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Version as *const _ as usize },
1850 8usize,
1851 concat!(
1852 "Offset of field: ",
1853 stringify!(ft_program_data),
1854 "::",
1855 stringify!(Version)
1856 )
1857 );
1858 assert_eq!(
1859 unsafe { &(*(::std::ptr::null::<ft_program_data>())).VendorId as *const _ as usize },
1860 12usize,
1861 concat!(
1862 "Offset of field: ",
1863 stringify!(ft_program_data),
1864 "::",
1865 stringify!(VendorId)
1866 )
1867 );
1868 assert_eq!(
1869 unsafe { &(*(::std::ptr::null::<ft_program_data>())).ProductId as *const _ as usize },
1870 14usize,
1871 concat!(
1872 "Offset of field: ",
1873 stringify!(ft_program_data),
1874 "::",
1875 stringify!(ProductId)
1876 )
1877 );
1878 assert_eq!(
1879 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Manufacturer as *const _ as usize },
1880 16usize,
1881 concat!(
1882 "Offset of field: ",
1883 stringify!(ft_program_data),
1884 "::",
1885 stringify!(Manufacturer)
1886 )
1887 );
1888 assert_eq!(
1889 unsafe { &(*(::std::ptr::null::<ft_program_data>())).ManufacturerId as *const _ as usize },
1890 24usize,
1891 concat!(
1892 "Offset of field: ",
1893 stringify!(ft_program_data),
1894 "::",
1895 stringify!(ManufacturerId)
1896 )
1897 );
1898 assert_eq!(
1899 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Description as *const _ as usize },
1900 32usize,
1901 concat!(
1902 "Offset of field: ",
1903 stringify!(ft_program_data),
1904 "::",
1905 stringify!(Description)
1906 )
1907 );
1908 assert_eq!(
1909 unsafe { &(*(::std::ptr::null::<ft_program_data>())).SerialNumber as *const _ as usize },
1910 40usize,
1911 concat!(
1912 "Offset of field: ",
1913 stringify!(ft_program_data),
1914 "::",
1915 stringify!(SerialNumber)
1916 )
1917 );
1918 assert_eq!(
1919 unsafe { &(*(::std::ptr::null::<ft_program_data>())).MaxPower as *const _ as usize },
1920 48usize,
1921 concat!(
1922 "Offset of field: ",
1923 stringify!(ft_program_data),
1924 "::",
1925 stringify!(MaxPower)
1926 )
1927 );
1928 assert_eq!(
1929 unsafe { &(*(::std::ptr::null::<ft_program_data>())).PnP as *const _ as usize },
1930 50usize,
1931 concat!(
1932 "Offset of field: ",
1933 stringify!(ft_program_data),
1934 "::",
1935 stringify!(PnP)
1936 )
1937 );
1938 assert_eq!(
1939 unsafe { &(*(::std::ptr::null::<ft_program_data>())).SelfPowered as *const _ as usize },
1940 52usize,
1941 concat!(
1942 "Offset of field: ",
1943 stringify!(ft_program_data),
1944 "::",
1945 stringify!(SelfPowered)
1946 )
1947 );
1948 assert_eq!(
1949 unsafe { &(*(::std::ptr::null::<ft_program_data>())).RemoteWakeup as *const _ as usize },
1950 54usize,
1951 concat!(
1952 "Offset of field: ",
1953 stringify!(ft_program_data),
1954 "::",
1955 stringify!(RemoteWakeup)
1956 )
1957 );
1958 assert_eq!(
1959 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Rev4 as *const _ as usize },
1960 56usize,
1961 concat!(
1962 "Offset of field: ",
1963 stringify!(ft_program_data),
1964 "::",
1965 stringify!(Rev4)
1966 )
1967 );
1968 assert_eq!(
1969 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IsoIn as *const _ as usize },
1970 57usize,
1971 concat!(
1972 "Offset of field: ",
1973 stringify!(ft_program_data),
1974 "::",
1975 stringify!(IsoIn)
1976 )
1977 );
1978 assert_eq!(
1979 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IsoOut as *const _ as usize },
1980 58usize,
1981 concat!(
1982 "Offset of field: ",
1983 stringify!(ft_program_data),
1984 "::",
1985 stringify!(IsoOut)
1986 )
1987 );
1988 assert_eq!(
1989 unsafe { &(*(::std::ptr::null::<ft_program_data>())).PullDownEnable as *const _ as usize },
1990 59usize,
1991 concat!(
1992 "Offset of field: ",
1993 stringify!(ft_program_data),
1994 "::",
1995 stringify!(PullDownEnable)
1996 )
1997 );
1998 assert_eq!(
1999 unsafe { &(*(::std::ptr::null::<ft_program_data>())).SerNumEnable as *const _ as usize },
2000 60usize,
2001 concat!(
2002 "Offset of field: ",
2003 stringify!(ft_program_data),
2004 "::",
2005 stringify!(SerNumEnable)
2006 )
2007 );
2008 assert_eq!(
2009 unsafe {
2010 &(*(::std::ptr::null::<ft_program_data>())).USBVersionEnable as *const _ as usize
2011 },
2012 61usize,
2013 concat!(
2014 "Offset of field: ",
2015 stringify!(ft_program_data),
2016 "::",
2017 stringify!(USBVersionEnable)
2018 )
2019 );
2020 assert_eq!(
2021 unsafe { &(*(::std::ptr::null::<ft_program_data>())).USBVersion as *const _ as usize },
2022 62usize,
2023 concat!(
2024 "Offset of field: ",
2025 stringify!(ft_program_data),
2026 "::",
2027 stringify!(USBVersion)
2028 )
2029 );
2030 assert_eq!(
2031 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Rev5 as *const _ as usize },
2032 64usize,
2033 concat!(
2034 "Offset of field: ",
2035 stringify!(ft_program_data),
2036 "::",
2037 stringify!(Rev5)
2038 )
2039 );
2040 assert_eq!(
2041 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IsoInA as *const _ as usize },
2042 65usize,
2043 concat!(
2044 "Offset of field: ",
2045 stringify!(ft_program_data),
2046 "::",
2047 stringify!(IsoInA)
2048 )
2049 );
2050 assert_eq!(
2051 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IsoInB as *const _ as usize },
2052 66usize,
2053 concat!(
2054 "Offset of field: ",
2055 stringify!(ft_program_data),
2056 "::",
2057 stringify!(IsoInB)
2058 )
2059 );
2060 assert_eq!(
2061 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IsoOutA as *const _ as usize },
2062 67usize,
2063 concat!(
2064 "Offset of field: ",
2065 stringify!(ft_program_data),
2066 "::",
2067 stringify!(IsoOutA)
2068 )
2069 );
2070 assert_eq!(
2071 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IsoOutB as *const _ as usize },
2072 68usize,
2073 concat!(
2074 "Offset of field: ",
2075 stringify!(ft_program_data),
2076 "::",
2077 stringify!(IsoOutB)
2078 )
2079 );
2080 assert_eq!(
2081 unsafe { &(*(::std::ptr::null::<ft_program_data>())).PullDownEnable5 as *const _ as usize },
2082 69usize,
2083 concat!(
2084 "Offset of field: ",
2085 stringify!(ft_program_data),
2086 "::",
2087 stringify!(PullDownEnable5)
2088 )
2089 );
2090 assert_eq!(
2091 unsafe { &(*(::std::ptr::null::<ft_program_data>())).SerNumEnable5 as *const _ as usize },
2092 70usize,
2093 concat!(
2094 "Offset of field: ",
2095 stringify!(ft_program_data),
2096 "::",
2097 stringify!(SerNumEnable5)
2098 )
2099 );
2100 assert_eq!(
2101 unsafe {
2102 &(*(::std::ptr::null::<ft_program_data>())).USBVersionEnable5 as *const _ as usize
2103 },
2104 71usize,
2105 concat!(
2106 "Offset of field: ",
2107 stringify!(ft_program_data),
2108 "::",
2109 stringify!(USBVersionEnable5)
2110 )
2111 );
2112 assert_eq!(
2113 unsafe { &(*(::std::ptr::null::<ft_program_data>())).USBVersion5 as *const _ as usize },
2114 72usize,
2115 concat!(
2116 "Offset of field: ",
2117 stringify!(ft_program_data),
2118 "::",
2119 stringify!(USBVersion5)
2120 )
2121 );
2122 assert_eq!(
2123 unsafe { &(*(::std::ptr::null::<ft_program_data>())).AIsHighCurrent as *const _ as usize },
2124 74usize,
2125 concat!(
2126 "Offset of field: ",
2127 stringify!(ft_program_data),
2128 "::",
2129 stringify!(AIsHighCurrent)
2130 )
2131 );
2132 assert_eq!(
2133 unsafe { &(*(::std::ptr::null::<ft_program_data>())).BIsHighCurrent as *const _ as usize },
2134 75usize,
2135 concat!(
2136 "Offset of field: ",
2137 stringify!(ft_program_data),
2138 "::",
2139 stringify!(BIsHighCurrent)
2140 )
2141 );
2142 assert_eq!(
2143 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IFAIsFifo as *const _ as usize },
2144 76usize,
2145 concat!(
2146 "Offset of field: ",
2147 stringify!(ft_program_data),
2148 "::",
2149 stringify!(IFAIsFifo)
2150 )
2151 );
2152 assert_eq!(
2153 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IFAIsFifoTar as *const _ as usize },
2154 77usize,
2155 concat!(
2156 "Offset of field: ",
2157 stringify!(ft_program_data),
2158 "::",
2159 stringify!(IFAIsFifoTar)
2160 )
2161 );
2162 assert_eq!(
2163 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IFAIsFastSer as *const _ as usize },
2164 78usize,
2165 concat!(
2166 "Offset of field: ",
2167 stringify!(ft_program_data),
2168 "::",
2169 stringify!(IFAIsFastSer)
2170 )
2171 );
2172 assert_eq!(
2173 unsafe { &(*(::std::ptr::null::<ft_program_data>())).AIsVCP as *const _ as usize },
2174 79usize,
2175 concat!(
2176 "Offset of field: ",
2177 stringify!(ft_program_data),
2178 "::",
2179 stringify!(AIsVCP)
2180 )
2181 );
2182 assert_eq!(
2183 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IFBIsFifo as *const _ as usize },
2184 80usize,
2185 concat!(
2186 "Offset of field: ",
2187 stringify!(ft_program_data),
2188 "::",
2189 stringify!(IFBIsFifo)
2190 )
2191 );
2192 assert_eq!(
2193 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IFBIsFifoTar as *const _ as usize },
2194 81usize,
2195 concat!(
2196 "Offset of field: ",
2197 stringify!(ft_program_data),
2198 "::",
2199 stringify!(IFBIsFifoTar)
2200 )
2201 );
2202 assert_eq!(
2203 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IFBIsFastSer as *const _ as usize },
2204 82usize,
2205 concat!(
2206 "Offset of field: ",
2207 stringify!(ft_program_data),
2208 "::",
2209 stringify!(IFBIsFastSer)
2210 )
2211 );
2212 assert_eq!(
2213 unsafe { &(*(::std::ptr::null::<ft_program_data>())).BIsVCP as *const _ as usize },
2214 83usize,
2215 concat!(
2216 "Offset of field: ",
2217 stringify!(ft_program_data),
2218 "::",
2219 stringify!(BIsVCP)
2220 )
2221 );
2222 assert_eq!(
2223 unsafe { &(*(::std::ptr::null::<ft_program_data>())).UseExtOsc as *const _ as usize },
2224 84usize,
2225 concat!(
2226 "Offset of field: ",
2227 stringify!(ft_program_data),
2228 "::",
2229 stringify!(UseExtOsc)
2230 )
2231 );
2232 assert_eq!(
2233 unsafe { &(*(::std::ptr::null::<ft_program_data>())).HighDriveIOs as *const _ as usize },
2234 85usize,
2235 concat!(
2236 "Offset of field: ",
2237 stringify!(ft_program_data),
2238 "::",
2239 stringify!(HighDriveIOs)
2240 )
2241 );
2242 assert_eq!(
2243 unsafe { &(*(::std::ptr::null::<ft_program_data>())).EndpointSize as *const _ as usize },
2244 86usize,
2245 concat!(
2246 "Offset of field: ",
2247 stringify!(ft_program_data),
2248 "::",
2249 stringify!(EndpointSize)
2250 )
2251 );
2252 assert_eq!(
2253 unsafe { &(*(::std::ptr::null::<ft_program_data>())).PullDownEnableR as *const _ as usize },
2254 87usize,
2255 concat!(
2256 "Offset of field: ",
2257 stringify!(ft_program_data),
2258 "::",
2259 stringify!(PullDownEnableR)
2260 )
2261 );
2262 assert_eq!(
2263 unsafe { &(*(::std::ptr::null::<ft_program_data>())).SerNumEnableR as *const _ as usize },
2264 88usize,
2265 concat!(
2266 "Offset of field: ",
2267 stringify!(ft_program_data),
2268 "::",
2269 stringify!(SerNumEnableR)
2270 )
2271 );
2272 assert_eq!(
2273 unsafe { &(*(::std::ptr::null::<ft_program_data>())).InvertTXD as *const _ as usize },
2274 89usize,
2275 concat!(
2276 "Offset of field: ",
2277 stringify!(ft_program_data),
2278 "::",
2279 stringify!(InvertTXD)
2280 )
2281 );
2282 assert_eq!(
2283 unsafe { &(*(::std::ptr::null::<ft_program_data>())).InvertRXD as *const _ as usize },
2284 90usize,
2285 concat!(
2286 "Offset of field: ",
2287 stringify!(ft_program_data),
2288 "::",
2289 stringify!(InvertRXD)
2290 )
2291 );
2292 assert_eq!(
2293 unsafe { &(*(::std::ptr::null::<ft_program_data>())).InvertRTS as *const _ as usize },
2294 91usize,
2295 concat!(
2296 "Offset of field: ",
2297 stringify!(ft_program_data),
2298 "::",
2299 stringify!(InvertRTS)
2300 )
2301 );
2302 assert_eq!(
2303 unsafe { &(*(::std::ptr::null::<ft_program_data>())).InvertCTS as *const _ as usize },
2304 92usize,
2305 concat!(
2306 "Offset of field: ",
2307 stringify!(ft_program_data),
2308 "::",
2309 stringify!(InvertCTS)
2310 )
2311 );
2312 assert_eq!(
2313 unsafe { &(*(::std::ptr::null::<ft_program_data>())).InvertDTR as *const _ as usize },
2314 93usize,
2315 concat!(
2316 "Offset of field: ",
2317 stringify!(ft_program_data),
2318 "::",
2319 stringify!(InvertDTR)
2320 )
2321 );
2322 assert_eq!(
2323 unsafe { &(*(::std::ptr::null::<ft_program_data>())).InvertDSR as *const _ as usize },
2324 94usize,
2325 concat!(
2326 "Offset of field: ",
2327 stringify!(ft_program_data),
2328 "::",
2329 stringify!(InvertDSR)
2330 )
2331 );
2332 assert_eq!(
2333 unsafe { &(*(::std::ptr::null::<ft_program_data>())).InvertDCD as *const _ as usize },
2334 95usize,
2335 concat!(
2336 "Offset of field: ",
2337 stringify!(ft_program_data),
2338 "::",
2339 stringify!(InvertDCD)
2340 )
2341 );
2342 assert_eq!(
2343 unsafe { &(*(::std::ptr::null::<ft_program_data>())).InvertRI as *const _ as usize },
2344 96usize,
2345 concat!(
2346 "Offset of field: ",
2347 stringify!(ft_program_data),
2348 "::",
2349 stringify!(InvertRI)
2350 )
2351 );
2352 assert_eq!(
2353 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Cbus0 as *const _ as usize },
2354 97usize,
2355 concat!(
2356 "Offset of field: ",
2357 stringify!(ft_program_data),
2358 "::",
2359 stringify!(Cbus0)
2360 )
2361 );
2362 assert_eq!(
2363 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Cbus1 as *const _ as usize },
2364 98usize,
2365 concat!(
2366 "Offset of field: ",
2367 stringify!(ft_program_data),
2368 "::",
2369 stringify!(Cbus1)
2370 )
2371 );
2372 assert_eq!(
2373 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Cbus2 as *const _ as usize },
2374 99usize,
2375 concat!(
2376 "Offset of field: ",
2377 stringify!(ft_program_data),
2378 "::",
2379 stringify!(Cbus2)
2380 )
2381 );
2382 assert_eq!(
2383 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Cbus3 as *const _ as usize },
2384 100usize,
2385 concat!(
2386 "Offset of field: ",
2387 stringify!(ft_program_data),
2388 "::",
2389 stringify!(Cbus3)
2390 )
2391 );
2392 assert_eq!(
2393 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Cbus4 as *const _ as usize },
2394 101usize,
2395 concat!(
2396 "Offset of field: ",
2397 stringify!(ft_program_data),
2398 "::",
2399 stringify!(Cbus4)
2400 )
2401 );
2402 assert_eq!(
2403 unsafe { &(*(::std::ptr::null::<ft_program_data>())).RIsD2XX as *const _ as usize },
2404 102usize,
2405 concat!(
2406 "Offset of field: ",
2407 stringify!(ft_program_data),
2408 "::",
2409 stringify!(RIsD2XX)
2410 )
2411 );
2412 assert_eq!(
2413 unsafe { &(*(::std::ptr::null::<ft_program_data>())).PullDownEnable7 as *const _ as usize },
2414 103usize,
2415 concat!(
2416 "Offset of field: ",
2417 stringify!(ft_program_data),
2418 "::",
2419 stringify!(PullDownEnable7)
2420 )
2421 );
2422 assert_eq!(
2423 unsafe { &(*(::std::ptr::null::<ft_program_data>())).SerNumEnable7 as *const _ as usize },
2424 104usize,
2425 concat!(
2426 "Offset of field: ",
2427 stringify!(ft_program_data),
2428 "::",
2429 stringify!(SerNumEnable7)
2430 )
2431 );
2432 assert_eq!(
2433 unsafe { &(*(::std::ptr::null::<ft_program_data>())).ALSlowSlew as *const _ as usize },
2434 105usize,
2435 concat!(
2436 "Offset of field: ",
2437 stringify!(ft_program_data),
2438 "::",
2439 stringify!(ALSlowSlew)
2440 )
2441 );
2442 assert_eq!(
2443 unsafe { &(*(::std::ptr::null::<ft_program_data>())).ALSchmittInput as *const _ as usize },
2444 106usize,
2445 concat!(
2446 "Offset of field: ",
2447 stringify!(ft_program_data),
2448 "::",
2449 stringify!(ALSchmittInput)
2450 )
2451 );
2452 assert_eq!(
2453 unsafe { &(*(::std::ptr::null::<ft_program_data>())).ALDriveCurrent as *const _ as usize },
2454 107usize,
2455 concat!(
2456 "Offset of field: ",
2457 stringify!(ft_program_data),
2458 "::",
2459 stringify!(ALDriveCurrent)
2460 )
2461 );
2462 assert_eq!(
2463 unsafe { &(*(::std::ptr::null::<ft_program_data>())).AHSlowSlew as *const _ as usize },
2464 108usize,
2465 concat!(
2466 "Offset of field: ",
2467 stringify!(ft_program_data),
2468 "::",
2469 stringify!(AHSlowSlew)
2470 )
2471 );
2472 assert_eq!(
2473 unsafe { &(*(::std::ptr::null::<ft_program_data>())).AHSchmittInput as *const _ as usize },
2474 109usize,
2475 concat!(
2476 "Offset of field: ",
2477 stringify!(ft_program_data),
2478 "::",
2479 stringify!(AHSchmittInput)
2480 )
2481 );
2482 assert_eq!(
2483 unsafe { &(*(::std::ptr::null::<ft_program_data>())).AHDriveCurrent as *const _ as usize },
2484 110usize,
2485 concat!(
2486 "Offset of field: ",
2487 stringify!(ft_program_data),
2488 "::",
2489 stringify!(AHDriveCurrent)
2490 )
2491 );
2492 assert_eq!(
2493 unsafe { &(*(::std::ptr::null::<ft_program_data>())).BLSlowSlew as *const _ as usize },
2494 111usize,
2495 concat!(
2496 "Offset of field: ",
2497 stringify!(ft_program_data),
2498 "::",
2499 stringify!(BLSlowSlew)
2500 )
2501 );
2502 assert_eq!(
2503 unsafe { &(*(::std::ptr::null::<ft_program_data>())).BLSchmittInput as *const _ as usize },
2504 112usize,
2505 concat!(
2506 "Offset of field: ",
2507 stringify!(ft_program_data),
2508 "::",
2509 stringify!(BLSchmittInput)
2510 )
2511 );
2512 assert_eq!(
2513 unsafe { &(*(::std::ptr::null::<ft_program_data>())).BLDriveCurrent as *const _ as usize },
2514 113usize,
2515 concat!(
2516 "Offset of field: ",
2517 stringify!(ft_program_data),
2518 "::",
2519 stringify!(BLDriveCurrent)
2520 )
2521 );
2522 assert_eq!(
2523 unsafe { &(*(::std::ptr::null::<ft_program_data>())).BHSlowSlew as *const _ as usize },
2524 114usize,
2525 concat!(
2526 "Offset of field: ",
2527 stringify!(ft_program_data),
2528 "::",
2529 stringify!(BHSlowSlew)
2530 )
2531 );
2532 assert_eq!(
2533 unsafe { &(*(::std::ptr::null::<ft_program_data>())).BHSchmittInput as *const _ as usize },
2534 115usize,
2535 concat!(
2536 "Offset of field: ",
2537 stringify!(ft_program_data),
2538 "::",
2539 stringify!(BHSchmittInput)
2540 )
2541 );
2542 assert_eq!(
2543 unsafe { &(*(::std::ptr::null::<ft_program_data>())).BHDriveCurrent as *const _ as usize },
2544 116usize,
2545 concat!(
2546 "Offset of field: ",
2547 stringify!(ft_program_data),
2548 "::",
2549 stringify!(BHDriveCurrent)
2550 )
2551 );
2552 assert_eq!(
2553 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IFAIsFifo7 as *const _ as usize },
2554 117usize,
2555 concat!(
2556 "Offset of field: ",
2557 stringify!(ft_program_data),
2558 "::",
2559 stringify!(IFAIsFifo7)
2560 )
2561 );
2562 assert_eq!(
2563 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IFAIsFifoTar7 as *const _ as usize },
2564 118usize,
2565 concat!(
2566 "Offset of field: ",
2567 stringify!(ft_program_data),
2568 "::",
2569 stringify!(IFAIsFifoTar7)
2570 )
2571 );
2572 assert_eq!(
2573 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IFAIsFastSer7 as *const _ as usize },
2574 119usize,
2575 concat!(
2576 "Offset of field: ",
2577 stringify!(ft_program_data),
2578 "::",
2579 stringify!(IFAIsFastSer7)
2580 )
2581 );
2582 assert_eq!(
2583 unsafe { &(*(::std::ptr::null::<ft_program_data>())).AIsVCP7 as *const _ as usize },
2584 120usize,
2585 concat!(
2586 "Offset of field: ",
2587 stringify!(ft_program_data),
2588 "::",
2589 stringify!(AIsVCP7)
2590 )
2591 );
2592 assert_eq!(
2593 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IFBIsFifo7 as *const _ as usize },
2594 121usize,
2595 concat!(
2596 "Offset of field: ",
2597 stringify!(ft_program_data),
2598 "::",
2599 stringify!(IFBIsFifo7)
2600 )
2601 );
2602 assert_eq!(
2603 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IFBIsFifoTar7 as *const _ as usize },
2604 122usize,
2605 concat!(
2606 "Offset of field: ",
2607 stringify!(ft_program_data),
2608 "::",
2609 stringify!(IFBIsFifoTar7)
2610 )
2611 );
2612 assert_eq!(
2613 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IFBIsFastSer7 as *const _ as usize },
2614 123usize,
2615 concat!(
2616 "Offset of field: ",
2617 stringify!(ft_program_data),
2618 "::",
2619 stringify!(IFBIsFastSer7)
2620 )
2621 );
2622 assert_eq!(
2623 unsafe { &(*(::std::ptr::null::<ft_program_data>())).BIsVCP7 as *const _ as usize },
2624 124usize,
2625 concat!(
2626 "Offset of field: ",
2627 stringify!(ft_program_data),
2628 "::",
2629 stringify!(BIsVCP7)
2630 )
2631 );
2632 assert_eq!(
2633 unsafe { &(*(::std::ptr::null::<ft_program_data>())).PowerSaveEnable as *const _ as usize },
2634 125usize,
2635 concat!(
2636 "Offset of field: ",
2637 stringify!(ft_program_data),
2638 "::",
2639 stringify!(PowerSaveEnable)
2640 )
2641 );
2642 assert_eq!(
2643 unsafe { &(*(::std::ptr::null::<ft_program_data>())).PullDownEnable8 as *const _ as usize },
2644 126usize,
2645 concat!(
2646 "Offset of field: ",
2647 stringify!(ft_program_data),
2648 "::",
2649 stringify!(PullDownEnable8)
2650 )
2651 );
2652 assert_eq!(
2653 unsafe { &(*(::std::ptr::null::<ft_program_data>())).SerNumEnable8 as *const _ as usize },
2654 127usize,
2655 concat!(
2656 "Offset of field: ",
2657 stringify!(ft_program_data),
2658 "::",
2659 stringify!(SerNumEnable8)
2660 )
2661 );
2662 assert_eq!(
2663 unsafe { &(*(::std::ptr::null::<ft_program_data>())).ASlowSlew as *const _ as usize },
2664 128usize,
2665 concat!(
2666 "Offset of field: ",
2667 stringify!(ft_program_data),
2668 "::",
2669 stringify!(ASlowSlew)
2670 )
2671 );
2672 assert_eq!(
2673 unsafe { &(*(::std::ptr::null::<ft_program_data>())).ASchmittInput as *const _ as usize },
2674 129usize,
2675 concat!(
2676 "Offset of field: ",
2677 stringify!(ft_program_data),
2678 "::",
2679 stringify!(ASchmittInput)
2680 )
2681 );
2682 assert_eq!(
2683 unsafe { &(*(::std::ptr::null::<ft_program_data>())).ADriveCurrent as *const _ as usize },
2684 130usize,
2685 concat!(
2686 "Offset of field: ",
2687 stringify!(ft_program_data),
2688 "::",
2689 stringify!(ADriveCurrent)
2690 )
2691 );
2692 assert_eq!(
2693 unsafe { &(*(::std::ptr::null::<ft_program_data>())).BSlowSlew as *const _ as usize },
2694 131usize,
2695 concat!(
2696 "Offset of field: ",
2697 stringify!(ft_program_data),
2698 "::",
2699 stringify!(BSlowSlew)
2700 )
2701 );
2702 assert_eq!(
2703 unsafe { &(*(::std::ptr::null::<ft_program_data>())).BSchmittInput as *const _ as usize },
2704 132usize,
2705 concat!(
2706 "Offset of field: ",
2707 stringify!(ft_program_data),
2708 "::",
2709 stringify!(BSchmittInput)
2710 )
2711 );
2712 assert_eq!(
2713 unsafe { &(*(::std::ptr::null::<ft_program_data>())).BDriveCurrent as *const _ as usize },
2714 133usize,
2715 concat!(
2716 "Offset of field: ",
2717 stringify!(ft_program_data),
2718 "::",
2719 stringify!(BDriveCurrent)
2720 )
2721 );
2722 assert_eq!(
2723 unsafe { &(*(::std::ptr::null::<ft_program_data>())).CSlowSlew as *const _ as usize },
2724 134usize,
2725 concat!(
2726 "Offset of field: ",
2727 stringify!(ft_program_data),
2728 "::",
2729 stringify!(CSlowSlew)
2730 )
2731 );
2732 assert_eq!(
2733 unsafe { &(*(::std::ptr::null::<ft_program_data>())).CSchmittInput as *const _ as usize },
2734 135usize,
2735 concat!(
2736 "Offset of field: ",
2737 stringify!(ft_program_data),
2738 "::",
2739 stringify!(CSchmittInput)
2740 )
2741 );
2742 assert_eq!(
2743 unsafe { &(*(::std::ptr::null::<ft_program_data>())).CDriveCurrent as *const _ as usize },
2744 136usize,
2745 concat!(
2746 "Offset of field: ",
2747 stringify!(ft_program_data),
2748 "::",
2749 stringify!(CDriveCurrent)
2750 )
2751 );
2752 assert_eq!(
2753 unsafe { &(*(::std::ptr::null::<ft_program_data>())).DSlowSlew as *const _ as usize },
2754 137usize,
2755 concat!(
2756 "Offset of field: ",
2757 stringify!(ft_program_data),
2758 "::",
2759 stringify!(DSlowSlew)
2760 )
2761 );
2762 assert_eq!(
2763 unsafe { &(*(::std::ptr::null::<ft_program_data>())).DSchmittInput as *const _ as usize },
2764 138usize,
2765 concat!(
2766 "Offset of field: ",
2767 stringify!(ft_program_data),
2768 "::",
2769 stringify!(DSchmittInput)
2770 )
2771 );
2772 assert_eq!(
2773 unsafe { &(*(::std::ptr::null::<ft_program_data>())).DDriveCurrent as *const _ as usize },
2774 139usize,
2775 concat!(
2776 "Offset of field: ",
2777 stringify!(ft_program_data),
2778 "::",
2779 stringify!(DDriveCurrent)
2780 )
2781 );
2782 assert_eq!(
2783 unsafe { &(*(::std::ptr::null::<ft_program_data>())).ARIIsTXDEN as *const _ as usize },
2784 140usize,
2785 concat!(
2786 "Offset of field: ",
2787 stringify!(ft_program_data),
2788 "::",
2789 stringify!(ARIIsTXDEN)
2790 )
2791 );
2792 assert_eq!(
2793 unsafe { &(*(::std::ptr::null::<ft_program_data>())).BRIIsTXDEN as *const _ as usize },
2794 141usize,
2795 concat!(
2796 "Offset of field: ",
2797 stringify!(ft_program_data),
2798 "::",
2799 stringify!(BRIIsTXDEN)
2800 )
2801 );
2802 assert_eq!(
2803 unsafe { &(*(::std::ptr::null::<ft_program_data>())).CRIIsTXDEN as *const _ as usize },
2804 142usize,
2805 concat!(
2806 "Offset of field: ",
2807 stringify!(ft_program_data),
2808 "::",
2809 stringify!(CRIIsTXDEN)
2810 )
2811 );
2812 assert_eq!(
2813 unsafe { &(*(::std::ptr::null::<ft_program_data>())).DRIIsTXDEN as *const _ as usize },
2814 143usize,
2815 concat!(
2816 "Offset of field: ",
2817 stringify!(ft_program_data),
2818 "::",
2819 stringify!(DRIIsTXDEN)
2820 )
2821 );
2822 assert_eq!(
2823 unsafe { &(*(::std::ptr::null::<ft_program_data>())).AIsVCP8 as *const _ as usize },
2824 144usize,
2825 concat!(
2826 "Offset of field: ",
2827 stringify!(ft_program_data),
2828 "::",
2829 stringify!(AIsVCP8)
2830 )
2831 );
2832 assert_eq!(
2833 unsafe { &(*(::std::ptr::null::<ft_program_data>())).BIsVCP8 as *const _ as usize },
2834 145usize,
2835 concat!(
2836 "Offset of field: ",
2837 stringify!(ft_program_data),
2838 "::",
2839 stringify!(BIsVCP8)
2840 )
2841 );
2842 assert_eq!(
2843 unsafe { &(*(::std::ptr::null::<ft_program_data>())).CIsVCP8 as *const _ as usize },
2844 146usize,
2845 concat!(
2846 "Offset of field: ",
2847 stringify!(ft_program_data),
2848 "::",
2849 stringify!(CIsVCP8)
2850 )
2851 );
2852 assert_eq!(
2853 unsafe { &(*(::std::ptr::null::<ft_program_data>())).DIsVCP8 as *const _ as usize },
2854 147usize,
2855 concat!(
2856 "Offset of field: ",
2857 stringify!(ft_program_data),
2858 "::",
2859 stringify!(DIsVCP8)
2860 )
2861 );
2862 assert_eq!(
2863 unsafe { &(*(::std::ptr::null::<ft_program_data>())).PullDownEnableH as *const _ as usize },
2864 148usize,
2865 concat!(
2866 "Offset of field: ",
2867 stringify!(ft_program_data),
2868 "::",
2869 stringify!(PullDownEnableH)
2870 )
2871 );
2872 assert_eq!(
2873 unsafe { &(*(::std::ptr::null::<ft_program_data>())).SerNumEnableH as *const _ as usize },
2874 149usize,
2875 concat!(
2876 "Offset of field: ",
2877 stringify!(ft_program_data),
2878 "::",
2879 stringify!(SerNumEnableH)
2880 )
2881 );
2882 assert_eq!(
2883 unsafe { &(*(::std::ptr::null::<ft_program_data>())).ACSlowSlewH as *const _ as usize },
2884 150usize,
2885 concat!(
2886 "Offset of field: ",
2887 stringify!(ft_program_data),
2888 "::",
2889 stringify!(ACSlowSlewH)
2890 )
2891 );
2892 assert_eq!(
2893 unsafe { &(*(::std::ptr::null::<ft_program_data>())).ACSchmittInputH as *const _ as usize },
2894 151usize,
2895 concat!(
2896 "Offset of field: ",
2897 stringify!(ft_program_data),
2898 "::",
2899 stringify!(ACSchmittInputH)
2900 )
2901 );
2902 assert_eq!(
2903 unsafe { &(*(::std::ptr::null::<ft_program_data>())).ACDriveCurrentH as *const _ as usize },
2904 152usize,
2905 concat!(
2906 "Offset of field: ",
2907 stringify!(ft_program_data),
2908 "::",
2909 stringify!(ACDriveCurrentH)
2910 )
2911 );
2912 assert_eq!(
2913 unsafe { &(*(::std::ptr::null::<ft_program_data>())).ADSlowSlewH as *const _ as usize },
2914 153usize,
2915 concat!(
2916 "Offset of field: ",
2917 stringify!(ft_program_data),
2918 "::",
2919 stringify!(ADSlowSlewH)
2920 )
2921 );
2922 assert_eq!(
2923 unsafe { &(*(::std::ptr::null::<ft_program_data>())).ADSchmittInputH as *const _ as usize },
2924 154usize,
2925 concat!(
2926 "Offset of field: ",
2927 stringify!(ft_program_data),
2928 "::",
2929 stringify!(ADSchmittInputH)
2930 )
2931 );
2932 assert_eq!(
2933 unsafe { &(*(::std::ptr::null::<ft_program_data>())).ADDriveCurrentH as *const _ as usize },
2934 155usize,
2935 concat!(
2936 "Offset of field: ",
2937 stringify!(ft_program_data),
2938 "::",
2939 stringify!(ADDriveCurrentH)
2940 )
2941 );
2942 assert_eq!(
2943 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Cbus0H as *const _ as usize },
2944 156usize,
2945 concat!(
2946 "Offset of field: ",
2947 stringify!(ft_program_data),
2948 "::",
2949 stringify!(Cbus0H)
2950 )
2951 );
2952 assert_eq!(
2953 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Cbus1H as *const _ as usize },
2954 157usize,
2955 concat!(
2956 "Offset of field: ",
2957 stringify!(ft_program_data),
2958 "::",
2959 stringify!(Cbus1H)
2960 )
2961 );
2962 assert_eq!(
2963 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Cbus2H as *const _ as usize },
2964 158usize,
2965 concat!(
2966 "Offset of field: ",
2967 stringify!(ft_program_data),
2968 "::",
2969 stringify!(Cbus2H)
2970 )
2971 );
2972 assert_eq!(
2973 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Cbus3H as *const _ as usize },
2974 159usize,
2975 concat!(
2976 "Offset of field: ",
2977 stringify!(ft_program_data),
2978 "::",
2979 stringify!(Cbus3H)
2980 )
2981 );
2982 assert_eq!(
2983 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Cbus4H as *const _ as usize },
2984 160usize,
2985 concat!(
2986 "Offset of field: ",
2987 stringify!(ft_program_data),
2988 "::",
2989 stringify!(Cbus4H)
2990 )
2991 );
2992 assert_eq!(
2993 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Cbus5H as *const _ as usize },
2994 161usize,
2995 concat!(
2996 "Offset of field: ",
2997 stringify!(ft_program_data),
2998 "::",
2999 stringify!(Cbus5H)
3000 )
3001 );
3002 assert_eq!(
3003 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Cbus6H as *const _ as usize },
3004 162usize,
3005 concat!(
3006 "Offset of field: ",
3007 stringify!(ft_program_data),
3008 "::",
3009 stringify!(Cbus6H)
3010 )
3011 );
3012 assert_eq!(
3013 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Cbus7H as *const _ as usize },
3014 163usize,
3015 concat!(
3016 "Offset of field: ",
3017 stringify!(ft_program_data),
3018 "::",
3019 stringify!(Cbus7H)
3020 )
3021 );
3022 assert_eq!(
3023 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Cbus8H as *const _ as usize },
3024 164usize,
3025 concat!(
3026 "Offset of field: ",
3027 stringify!(ft_program_data),
3028 "::",
3029 stringify!(Cbus8H)
3030 )
3031 );
3032 assert_eq!(
3033 unsafe { &(*(::std::ptr::null::<ft_program_data>())).Cbus9H as *const _ as usize },
3034 165usize,
3035 concat!(
3036 "Offset of field: ",
3037 stringify!(ft_program_data),
3038 "::",
3039 stringify!(Cbus9H)
3040 )
3041 );
3042 assert_eq!(
3043 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IsFifoH as *const _ as usize },
3044 166usize,
3045 concat!(
3046 "Offset of field: ",
3047 stringify!(ft_program_data),
3048 "::",
3049 stringify!(IsFifoH)
3050 )
3051 );
3052 assert_eq!(
3053 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IsFifoTarH as *const _ as usize },
3054 167usize,
3055 concat!(
3056 "Offset of field: ",
3057 stringify!(ft_program_data),
3058 "::",
3059 stringify!(IsFifoTarH)
3060 )
3061 );
3062 assert_eq!(
3063 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IsFastSerH as *const _ as usize },
3064 168usize,
3065 concat!(
3066 "Offset of field: ",
3067 stringify!(ft_program_data),
3068 "::",
3069 stringify!(IsFastSerH)
3070 )
3071 );
3072 assert_eq!(
3073 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IsFT1248H as *const _ as usize },
3074 169usize,
3075 concat!(
3076 "Offset of field: ",
3077 stringify!(ft_program_data),
3078 "::",
3079 stringify!(IsFT1248H)
3080 )
3081 );
3082 assert_eq!(
3083 unsafe { &(*(::std::ptr::null::<ft_program_data>())).FT1248CpolH as *const _ as usize },
3084 170usize,
3085 concat!(
3086 "Offset of field: ",
3087 stringify!(ft_program_data),
3088 "::",
3089 stringify!(FT1248CpolH)
3090 )
3091 );
3092 assert_eq!(
3093 unsafe { &(*(::std::ptr::null::<ft_program_data>())).FT1248LsbH as *const _ as usize },
3094 171usize,
3095 concat!(
3096 "Offset of field: ",
3097 stringify!(ft_program_data),
3098 "::",
3099 stringify!(FT1248LsbH)
3100 )
3101 );
3102 assert_eq!(
3103 unsafe {
3104 &(*(::std::ptr::null::<ft_program_data>())).FT1248FlowControlH as *const _ as usize
3105 },
3106 172usize,
3107 concat!(
3108 "Offset of field: ",
3109 stringify!(ft_program_data),
3110 "::",
3111 stringify!(FT1248FlowControlH)
3112 )
3113 );
3114 assert_eq!(
3115 unsafe { &(*(::std::ptr::null::<ft_program_data>())).IsVCPH as *const _ as usize },
3116 173usize,
3117 concat!(
3118 "Offset of field: ",
3119 stringify!(ft_program_data),
3120 "::",
3121 stringify!(IsVCPH)
3122 )
3123 );
3124 assert_eq!(
3125 unsafe {
3126 &(*(::std::ptr::null::<ft_program_data>())).PowerSaveEnableH as *const _ as usize
3127 },
3128 174usize,
3129 concat!(
3130 "Offset of field: ",
3131 stringify!(ft_program_data),
3132 "::",
3133 stringify!(PowerSaveEnableH)
3134 )
3135 );
3136}
3137#[doc = " Structure to hold program data for FT_EE_Program, FT_EE_ProgramEx, FT_EE_Read"]
3138#[doc = " and FT_EE_ReadEx functions."]
3139#[doc = " @see FT_EE_Read"]
3140#[doc = " @see FT_EE_ReadEx"]
3141#[doc = " @see FT_EE_Program"]
3142#[doc = " @see FT_EE_ProgramEx"]
3143pub type FT_PROGRAM_DATA = ft_program_data;
3144#[doc = " Structure to hold program data for FT_EE_Program, FT_EE_ProgramEx, FT_EE_Read"]
3145#[doc = " and FT_EE_ReadEx functions."]
3146#[doc = " @see FT_EE_Read"]
3147#[doc = " @see FT_EE_ReadEx"]
3148#[doc = " @see FT_EE_Program"]
3149#[doc = " @see FT_EE_ProgramEx"]
3150pub type PFT_PROGRAM_DATA = *mut ft_program_data;
3151extern "C" {
3152 #[doc = " @noop FT_EE_Read"]
3153 #[doc = " @par Supported Operating Systems"]
3154 #[doc = " Linux"]
3155 #[doc = " Mac OS X (10.4 and later)"]
3156 #[doc = " Windows (2000 and later)"]
3157 #[doc = " Windows CE (4.2 and later)"]
3158 #[doc = " @par Summary"]
3159 #[doc = " Read the contents of the EEPROM."]
3160 #[doc = " @param ftHandle Handle of the device."]
3161 #[doc = " @param pData Pointer to structure of type FT_PROGRAM_DATA."]
3162 #[doc = " @returns"]
3163 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
3164 #[doc = " @remarks"]
3165 #[doc = " This function interprets the parameter pData as a pointer to a structure of type FT_PROGRAM_DATA"]
3166 #[doc = " that contains storage for the data to be read from the EEPROM."]
3167 #[doc = " @n The function does not perform any checks on buffer sizes, so the buffers passed in the"]
3168 #[doc = " FT_PROGRAM_DATA structure must be big enough to accommodate their respective strings (including"]
3169 #[doc = " null terminators). The sizes shown in the following example are more than adequate and can be rounded"]
3170 #[doc = " down if necessary. The restriction is that the Manufacturer string length plus the Description string"]
3171 #[doc = " length is less than or equal to 40 characters."]
3172 #[doc = " @note Note that the DLL must be informed which version of the FT_PROGRAM_DATA structure is being used."]
3173 #[doc = " This is done through the Signature1, Signature2 and Version elements of the structure. Signature1"]
3174 #[doc = " should always be 0x00000000, Signature2 should always be 0xFFFFFFFF and Version can be set to use"]
3175 #[doc = " whichever version is required. For compatibility with all current devices Version should be set to the"]
3176 #[doc = " latest version of the FT_PROGRAM_DATA structure which is defined in FTD2XX.h."]
3177 #[doc = " @see FT_PROGRAM_DATA"]
3178 pub fn FT_EE_Read(ftHandle: FT_HANDLE, pData: PFT_PROGRAM_DATA) -> FT_STATUS;
3179}
3180extern "C" {
3181 #[doc = " @noop FT_EE_ReadEx"]
3182 #[doc = " @par Supported Operating Systems"]
3183 #[doc = " Linux"]
3184 #[doc = " Mac OS X (10.4 and later)"]
3185 #[doc = " Windows (2000 and later)"]
3186 #[doc = " Windows CE (4.2 and later)"]
3187 #[doc = " @par Summary"]
3188 #[doc = " Read the contents of the EEPROM and pass strings separately."]
3189 #[doc = " @param ftHandle Handle of the device."]
3190 #[doc = " @param pData Pointer to structure of type FT_PROGRAM_DATA."]
3191 #[doc = " @param *Manufacturer Pointer to a null-terminated string containing the manufacturer name."]
3192 #[doc = " @param *ManufacturerId Pointer to a null-terminated string containing the manufacturer ID."]
3193 #[doc = " @param *Description Pointer to a null-terminated string containing the device description."]
3194 #[doc = " @param *SerialNumber Pointer to a null-terminated string containing the device serial number."]
3195 #[doc = " @returns"]
3196 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
3197 #[doc = " @remarks"]
3198 #[doc = " This variation of the standard FT_EE_Read function was included to provide support for languages such"]
3199 #[doc = " as LabVIEW where problems can occur when string pointers are contained in a structure."]
3200 #[doc = " @n This function interprets the parameter pData as a pointer to a structure of type FT_PROGRAM_DATA that"]
3201 #[doc = " contains storage for the data to be read from the EEPROM."]
3202 #[doc = " @n The function does not perform any checks on buffer sizes, so the buffers passed in the"]
3203 #[doc = " FT_PROGRAM_DATA structure must be big enough to accommodate their respective strings (including"]
3204 #[doc = " null terminators)."]
3205 #[doc = " @note Note that the DLL must be informed which version of the FT_PROGRAM_DATA structure is being used."]
3206 #[doc = " This is done through the Signature1, Signature2 and Version elements of the structure. Signature1"]
3207 #[doc = " should always be 0x00000000, Signature2 should always be 0xFFFFFFFF and Version can be set to use"]
3208 #[doc = " whichever version is required. For compatibility with all current devices Version should be set to the"]
3209 #[doc = " latest version of the FT_PROGRAM_DATA structure which is defined in FTD2XX.h."]
3210 #[doc = " @n The string parameters in the FT_PROGRAM_DATA structure should be passed as DWORDs to avoid"]
3211 #[doc = " overlapping of parameters. All string pointers are passed out separately from the FT_PROGRAM_DATA"]
3212 #[doc = " structure."]
3213 #[doc = " @see FT_PROGRAM_DATA"]
3214 pub fn FT_EE_ReadEx(
3215 ftHandle: FT_HANDLE,
3216 pData: PFT_PROGRAM_DATA,
3217 Manufacturer: *mut ::std::os::raw::c_char,
3218 ManufacturerId: *mut ::std::os::raw::c_char,
3219 Description: *mut ::std::os::raw::c_char,
3220 SerialNumber: *mut ::std::os::raw::c_char,
3221 ) -> FT_STATUS;
3222}
3223extern "C" {
3224 #[doc = " @noop FT_EE_Program"]
3225 #[doc = " @par Supported Operating Systems"]
3226 #[doc = " Linux"]
3227 #[doc = " Mac OS X (10.4 and later)"]
3228 #[doc = " Windows (2000 and later)"]
3229 #[doc = " Windows CE (4.2 and later)"]
3230 #[doc = " @par Summary"]
3231 #[doc = " Program the EEPROM."]
3232 #[doc = " @param ftHandle Handle of the device."]
3233 #[doc = " @param pData Pointer to structure of type FT_PROGRAM_DATA."]
3234 #[doc = " @returns"]
3235 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
3236 #[doc = " @remarks"]
3237 #[doc = " This function interprets the parameter pData as a pointer to a structure of type FT_PROGRAM_DATA"]
3238 #[doc = " that\tcontains the data to write to the EEPROM. The data is written to EEPROM, then read back and"]
3239 #[doc = " verified."]
3240 #[doc = " @n If the SerialNumber field in FT_PROGRAM_DATA is NULL, or SerialNumber points to a NULL string,"]
3241 #[doc = " a serial number based on the ManufacturerId and the current date and time will be generated. The"]
3242 #[doc = " Manufacturer string length plus the Description string length must be less than or equal to 40"]
3243 #[doc = " characters."]
3244 #[doc = " @note Note that the DLL must be informed which version of the FT_PROGRAM_DATA structure is being"]
3245 #[doc = " used. This is done through the Signature1, Signature2 and Version elements of the structure."]
3246 #[doc = " Signature1 should always be 0x00000000, Signature2 should always be 0xFFFFFFFF and Version can be"]
3247 #[doc = " set to use whichever version is required. For compatibility with all current devices Version"]
3248 #[doc = " should be set to the latest version of the FT_PROGRAM_DATA structure which is defined in FTD2XX.h."]
3249 #[doc = " If pData is NULL, the structure version will default to 0 (original BM series) and the device will"]
3250 #[doc = " be programmed with the default data."]
3251 #[doc = " @see FT_PROGRAM_DATA"]
3252 pub fn FT_EE_Program(ftHandle: FT_HANDLE, pData: PFT_PROGRAM_DATA) -> FT_STATUS;
3253}
3254extern "C" {
3255 #[doc = " @noop FT_EE_ProgramEx"]
3256 #[doc = " @par Supported Operating Systems"]
3257 #[doc = " Linux"]
3258 #[doc = " Mac OS X (10.4 and later)"]
3259 #[doc = " Windows (2000 and later)"]
3260 #[doc = " Windows CE (4.2 and later)"]
3261 #[doc = " @par Summary"]
3262 #[doc = " Program the EEPROM and pass strings separately."]
3263 #[doc = " @param ftHandle Handle of the device."]
3264 #[doc = " @param pData Pointer to structure of type FT_PROGRAM_DATA."]
3265 #[doc = " @param *Manufacturer Pointer to a null-terminated string containing the manufacturer name."]
3266 #[doc = " @param *ManufacturerId Pointer to a null-terminated string containing the manufacturer ID."]
3267 #[doc = " @param *Description Pointer to a null-terminated string containing the device description."]
3268 #[doc = " @param *SerialNumber Pointer to a null-terminated string containing the device serial number."]
3269 #[doc = " @returns"]
3270 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
3271 #[doc = " @remarks"]
3272 #[doc = " This variation of the FT_EE_Program function was included to provide support for languages such"]
3273 #[doc = " as LabVIEW where problems can occur when string pointers are contained in a structure."]
3274 #[doc = " @n This function interprets the parameter pData as a pointer to a structure of type FT_PROGRAM_DATA"]
3275 #[doc = " that contains the data to write to the EEPROM. The data is written to EEPROM, then read back and"]
3276 #[doc = " verified. The string pointer parameters in the FT_PROGRAM_DATA structure should be allocated as"]
3277 #[doc = " DWORDs to avoid overlapping of parameters. The string parameters are then passed in separately."]
3278 #[doc = " @n If the SerialNumber field is NULL, or SerialNumber points to a NULL string, a serial number based"]
3279 #[doc = " on the ManufacturerId and the current date and time will be generated. The Manufacturer string"]
3280 #[doc = " length plus the Description string length must be less than or equal to 40 characters."]
3281 #[doc = " @note Note that the DLL must be informed which version of the FT_PROGRAM_DATA structure is being used."]
3282 #[doc = " This is done through the Signature1, Signature2 and Version elements of the structure. Signature1"]
3283 #[doc = " should always be 0x00000000, Signature2 should always be 0xFFFFFFFF and Version can be set to use"]
3284 #[doc = " whichever version is required. For compatibility with all current devices Version should be set to the"]
3285 #[doc = " latest version of the FT_PROGRAM_DATA structure which is defined in FTD2XX.h."]
3286 #[doc = " If pData is NULL, the structure version will default to 0 (original BM series) and the device will be"]
3287 #[doc = " programmed with the default data."]
3288 #[doc = " @see FT_PROGRAM_DATA"]
3289 pub fn FT_EE_ProgramEx(
3290 ftHandle: FT_HANDLE,
3291 pData: PFT_PROGRAM_DATA,
3292 Manufacturer: *mut ::std::os::raw::c_char,
3293 ManufacturerId: *mut ::std::os::raw::c_char,
3294 Description: *mut ::std::os::raw::c_char,
3295 SerialNumber: *mut ::std::os::raw::c_char,
3296 ) -> FT_STATUS;
3297}
3298extern "C" {
3299 #[doc = " @noop FT_EE_UASize"]
3300 #[doc = " @par Supported Operating Systems"]
3301 #[doc = " Linux"]
3302 #[doc = " Mac OS X (10.4 and later)"]
3303 #[doc = " Windows (2000 and later)"]
3304 #[doc = " Windows CE (4.2 and later)"]
3305 #[doc = " @par Summary"]
3306 #[doc = " Get the available size of the EEPROM user area."]
3307 #[doc = " @param ftHandle Handle of the device."]
3308 #[doc = " @param lpdwSize Pointer to a DWORD that receives the available size, in bytes, of the EEPROM"]
3309 #[doc = " user area."]
3310 #[doc = " @returns"]
3311 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
3312 #[doc = " @remarks"]
3313 #[doc = " The user area of an FTDI device EEPROM is the total area of the EEPROM that is unused by device"]
3314 #[doc = " configuration information and descriptors. This area is available to the user to store information"]
3315 #[doc = " specific\tto their application. The size of the user area depends on the length of the Manufacturer,"]
3316 #[doc = " ManufacturerId, Description and SerialNumber strings programmed into the EEPROM."]
3317 pub fn FT_EE_UASize(ftHandle: FT_HANDLE, lpdwSize: LPDWORD) -> FT_STATUS;
3318}
3319extern "C" {
3320 #[doc = " @noop FT_EE_UARead"]
3321 #[doc = " @par Supported Operating Systems"]
3322 #[doc = " Linux"]
3323 #[doc = " Mac OS X (10.4 and later)"]
3324 #[doc = " Windows (2000 and later)"]
3325 #[doc = " Windows CE (4.2 and later)"]
3326 #[doc = " @par Summary"]
3327 #[doc = " Read the contents of the EEPROM user area."]
3328 #[doc = " @param ftHandle Handle of the device."]
3329 #[doc = " @param pucData Pointer to a buffer that contains storage for data to be read."]
3330 #[doc = " @param dwDataLen Size, in bytes, of buffer that contains storage for the data to be read."]
3331 #[doc = " @param lpdwBytesRead Pointer to a DWORD that receives the number of bytes read."]
3332 #[doc = " @returns"]
3333 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
3334 #[doc = " @remarks"]
3335 #[doc = " This function interprets the parameter pucData as a pointer to an array of bytes of size"]
3336 #[doc = " dwDataLen that contains storage for the data to be read from the EEPROM user area. The actual"]
3337 #[doc = " number of bytes read is stored in the DWORD referenced by lpdwBytesRead."]
3338 #[doc = " @n If dwDataLen is less than the size of the EEPROM user area, then dwDataLen bytes are read"]
3339 #[doc = " into the buffer. Otherwise, the whole of the EEPROM user area is read into the buffer. The"]
3340 #[doc = " available user area size can be determined by calling FT_EE_UASize."]
3341 #[doc = " @n An application should check the function return value and lpdwBytesRead when FT_EE_UARead"]
3342 #[doc = " returns."]
3343 pub fn FT_EE_UARead(
3344 ftHandle: FT_HANDLE,
3345 pucData: PUCHAR,
3346 dwDataLen: DWORD,
3347 lpdwBytesRead: LPDWORD,
3348 ) -> FT_STATUS;
3349}
3350extern "C" {
3351 #[doc = " @noop FT_EE_UAWrite"]
3352 #[doc = " @par Supported Operating Systems"]
3353 #[doc = " Linux"]
3354 #[doc = " Mac OS X (10.4 and later)"]
3355 #[doc = " Windows (2000 and later)"]
3356 #[doc = " Windows CE (4.2 and later)"]
3357 #[doc = " @par Summary"]
3358 #[doc = " Write data into the EEPROM user area."]
3359 #[doc = " @param ftHandle Handle of the device."]
3360 #[doc = " @param pucData Pointer to a buffer that contains the data to be written."]
3361 #[doc = " @param dwDataLen Size, in bytes, of buffer that contains storage for the data to be read."]
3362 #[doc = " @returns"]
3363 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
3364 #[doc = " @remarks"]
3365 #[doc = " This function interprets the parameter pucData as a pointer to an array of bytes of size"]
3366 #[doc = " dwDataLen that contains the data to be written to the EEPROM user area. It is a programming"]
3367 #[doc = " error for dwDataLen to be greater than the size of the EEPROM user area. The available user"]
3368 #[doc = " area size can be determined by calling FT_EE_UASize."]
3369 pub fn FT_EE_UAWrite(ftHandle: FT_HANDLE, pucData: PUCHAR, dwDataLen: DWORD) -> FT_STATUS;
3370}
3371#[doc = " @noop FT_EEPROM_HEADER"]
3372#[doc = " @par Summary"]
3373#[doc = " Structure to hold data for FT_EEPROM_Program and FT_EEPROM_Read functions."]
3374#[doc = " The structure for the command includes one FT_EEPROM_HEADER with a device-specific"]
3375#[doc = " structure appended."]
3376#[doc = " @see FT_EEPROM_Read"]
3377#[doc = " @see FT_EEPROM_Program"]
3378#[repr(C)]
3379#[derive(Debug, Copy, Clone)]
3380pub struct ft_eeprom_header {
3381 pub deviceType: FT_DEVICE,
3382 #[doc = " FTxxxx device type to be programmed"]
3383 #[doc = " Device descriptor options"]
3384 pub VendorId: WORD,
3385 #[doc = " 0x0403"]
3386 pub ProductId: WORD,
3387 #[doc = " 0x6001"]
3388 pub SerNumEnable: UCHAR,
3389 #[doc = " non-zero if serial number to be used"]
3390 #[doc = " Config descriptor options"]
3391 pub MaxPower: WORD,
3392 #[doc = " 0 < MaxPower <= 500"]
3393 pub SelfPowered: UCHAR,
3394 #[doc = " 0 = bus powered, 1 = self powered"]
3395 pub RemoteWakeup: UCHAR,
3396 #[doc = " 0 = not capable, 1 = capable"]
3397 #[doc = " Hardware options"]
3398 pub PullDownEnable: UCHAR,
3399}
3400#[test]
3401fn bindgen_test_layout_ft_eeprom_header() {
3402 assert_eq!(
3403 ::std::mem::size_of::<ft_eeprom_header>(),
3404 16usize,
3405 concat!("Size of: ", stringify!(ft_eeprom_header))
3406 );
3407 assert_eq!(
3408 ::std::mem::align_of::<ft_eeprom_header>(),
3409 4usize,
3410 concat!("Alignment of ", stringify!(ft_eeprom_header))
3411 );
3412 assert_eq!(
3413 unsafe { &(*(::std::ptr::null::<ft_eeprom_header>())).deviceType as *const _ as usize },
3414 0usize,
3415 concat!(
3416 "Offset of field: ",
3417 stringify!(ft_eeprom_header),
3418 "::",
3419 stringify!(deviceType)
3420 )
3421 );
3422 assert_eq!(
3423 unsafe { &(*(::std::ptr::null::<ft_eeprom_header>())).VendorId as *const _ as usize },
3424 4usize,
3425 concat!(
3426 "Offset of field: ",
3427 stringify!(ft_eeprom_header),
3428 "::",
3429 stringify!(VendorId)
3430 )
3431 );
3432 assert_eq!(
3433 unsafe { &(*(::std::ptr::null::<ft_eeprom_header>())).ProductId as *const _ as usize },
3434 6usize,
3435 concat!(
3436 "Offset of field: ",
3437 stringify!(ft_eeprom_header),
3438 "::",
3439 stringify!(ProductId)
3440 )
3441 );
3442 assert_eq!(
3443 unsafe { &(*(::std::ptr::null::<ft_eeprom_header>())).SerNumEnable as *const _ as usize },
3444 8usize,
3445 concat!(
3446 "Offset of field: ",
3447 stringify!(ft_eeprom_header),
3448 "::",
3449 stringify!(SerNumEnable)
3450 )
3451 );
3452 assert_eq!(
3453 unsafe { &(*(::std::ptr::null::<ft_eeprom_header>())).MaxPower as *const _ as usize },
3454 10usize,
3455 concat!(
3456 "Offset of field: ",
3457 stringify!(ft_eeprom_header),
3458 "::",
3459 stringify!(MaxPower)
3460 )
3461 );
3462 assert_eq!(
3463 unsafe { &(*(::std::ptr::null::<ft_eeprom_header>())).SelfPowered as *const _ as usize },
3464 12usize,
3465 concat!(
3466 "Offset of field: ",
3467 stringify!(ft_eeprom_header),
3468 "::",
3469 stringify!(SelfPowered)
3470 )
3471 );
3472 assert_eq!(
3473 unsafe { &(*(::std::ptr::null::<ft_eeprom_header>())).RemoteWakeup as *const _ as usize },
3474 13usize,
3475 concat!(
3476 "Offset of field: ",
3477 stringify!(ft_eeprom_header),
3478 "::",
3479 stringify!(RemoteWakeup)
3480 )
3481 );
3482 assert_eq!(
3483 unsafe { &(*(::std::ptr::null::<ft_eeprom_header>())).PullDownEnable as *const _ as usize },
3484 14usize,
3485 concat!(
3486 "Offset of field: ",
3487 stringify!(ft_eeprom_header),
3488 "::",
3489 stringify!(PullDownEnable)
3490 )
3491 );
3492}
3493#[doc = " @noop FT_EEPROM_HEADER"]
3494#[doc = " @par Summary"]
3495#[doc = " Structure to hold data for FT_EEPROM_Program and FT_EEPROM_Read functions."]
3496#[doc = " The structure for the command includes one FT_EEPROM_HEADER with a device-specific"]
3497#[doc = " structure appended."]
3498#[doc = " @see FT_EEPROM_Read"]
3499#[doc = " @see FT_EEPROM_Program"]
3500pub type FT_EEPROM_HEADER = ft_eeprom_header;
3501#[doc = " @noop FT_EEPROM_232B"]
3502#[doc = " @par Summary"]
3503#[doc = " Structure to hold data for the FT232B data in the FT_EEPROM_Program and FT_EEPROM_Read functions."]
3504#[doc = " This is appended to an FT_EEPROM_HEADER structure."]
3505#[doc = " @see FT_EEPROM_HEADER"]
3506#[repr(C)]
3507#[derive(Debug, Copy, Clone)]
3508pub struct ft_eeprom_232b {
3509 #[doc = " Common header"]
3510 pub common: FT_EEPROM_HEADER,
3511}
3512#[test]
3513fn bindgen_test_layout_ft_eeprom_232b() {
3514 assert_eq!(
3515 ::std::mem::size_of::<ft_eeprom_232b>(),
3516 16usize,
3517 concat!("Size of: ", stringify!(ft_eeprom_232b))
3518 );
3519 assert_eq!(
3520 ::std::mem::align_of::<ft_eeprom_232b>(),
3521 4usize,
3522 concat!("Alignment of ", stringify!(ft_eeprom_232b))
3523 );
3524 assert_eq!(
3525 unsafe { &(*(::std::ptr::null::<ft_eeprom_232b>())).common as *const _ as usize },
3526 0usize,
3527 concat!(
3528 "Offset of field: ",
3529 stringify!(ft_eeprom_232b),
3530 "::",
3531 stringify!(common)
3532 )
3533 );
3534}
3535#[doc = " @noop FT_EEPROM_232B"]
3536#[doc = " @par Summary"]
3537#[doc = " Structure to hold data for the FT232B data in the FT_EEPROM_Program and FT_EEPROM_Read functions."]
3538#[doc = " This is appended to an FT_EEPROM_HEADER structure."]
3539#[doc = " @see FT_EEPROM_HEADER"]
3540pub type FT_EEPROM_232B = ft_eeprom_232b;
3541#[doc = " @noop FT_EEPROM_2232"]
3542#[doc = " @par Summary"]
3543#[doc = " Structure to hold data for the FT2232C, FT2232D and FT2232L data in the FT_EEPROM_Program"]
3544#[doc = " and FT_EEPROM_Read functions."]
3545#[doc = " This is appended to an FT_EEPROM_HEADER structure."]
3546#[doc = " @see FT_EEPROM_HEADER"]
3547#[repr(C)]
3548#[derive(Debug, Copy, Clone)]
3549pub struct ft_eeprom_2232 {
3550 #[doc = " Common header"]
3551 pub common: FT_EEPROM_HEADER,
3552 #[doc = " common elements for all device EEPROMs"]
3553 #[doc = " Drive options"]
3554 pub AIsHighCurrent: UCHAR,
3555 #[doc = " non-zero if interface is high current"]
3556 pub BIsHighCurrent: UCHAR,
3557 #[doc = " non-zero if interface is high current"]
3558 #[doc = " Hardware options"]
3559 pub AIsFifo: UCHAR,
3560 #[doc = " non-zero if interface is 245 FIFO"]
3561 pub AIsFifoTar: UCHAR,
3562 #[doc = " non-zero if interface is 245 FIFO CPU target"]
3563 pub AIsFastSer: UCHAR,
3564 #[doc = " non-zero if interface is Fast serial"]
3565 pub BIsFifo: UCHAR,
3566 #[doc = " non-zero if interface is 245 FIFO"]
3567 pub BIsFifoTar: UCHAR,
3568 #[doc = " non-zero if interface is 245 FIFO CPU target"]
3569 pub BIsFastSer: UCHAR,
3570 #[doc = " non-zero if interface is Fast serial"]
3571 #[doc = " Driver option"]
3572 pub ADriverType: UCHAR,
3573 #[doc = " non-zero if interface is to use VCP drivers"]
3574 pub BDriverType: UCHAR,
3575}
3576#[test]
3577fn bindgen_test_layout_ft_eeprom_2232() {
3578 assert_eq!(
3579 ::std::mem::size_of::<ft_eeprom_2232>(),
3580 28usize,
3581 concat!("Size of: ", stringify!(ft_eeprom_2232))
3582 );
3583 assert_eq!(
3584 ::std::mem::align_of::<ft_eeprom_2232>(),
3585 4usize,
3586 concat!("Alignment of ", stringify!(ft_eeprom_2232))
3587 );
3588 assert_eq!(
3589 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232>())).common as *const _ as usize },
3590 0usize,
3591 concat!(
3592 "Offset of field: ",
3593 stringify!(ft_eeprom_2232),
3594 "::",
3595 stringify!(common)
3596 )
3597 );
3598 assert_eq!(
3599 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232>())).AIsHighCurrent as *const _ as usize },
3600 16usize,
3601 concat!(
3602 "Offset of field: ",
3603 stringify!(ft_eeprom_2232),
3604 "::",
3605 stringify!(AIsHighCurrent)
3606 )
3607 );
3608 assert_eq!(
3609 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232>())).BIsHighCurrent as *const _ as usize },
3610 17usize,
3611 concat!(
3612 "Offset of field: ",
3613 stringify!(ft_eeprom_2232),
3614 "::",
3615 stringify!(BIsHighCurrent)
3616 )
3617 );
3618 assert_eq!(
3619 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232>())).AIsFifo as *const _ as usize },
3620 18usize,
3621 concat!(
3622 "Offset of field: ",
3623 stringify!(ft_eeprom_2232),
3624 "::",
3625 stringify!(AIsFifo)
3626 )
3627 );
3628 assert_eq!(
3629 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232>())).AIsFifoTar as *const _ as usize },
3630 19usize,
3631 concat!(
3632 "Offset of field: ",
3633 stringify!(ft_eeprom_2232),
3634 "::",
3635 stringify!(AIsFifoTar)
3636 )
3637 );
3638 assert_eq!(
3639 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232>())).AIsFastSer as *const _ as usize },
3640 20usize,
3641 concat!(
3642 "Offset of field: ",
3643 stringify!(ft_eeprom_2232),
3644 "::",
3645 stringify!(AIsFastSer)
3646 )
3647 );
3648 assert_eq!(
3649 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232>())).BIsFifo as *const _ as usize },
3650 21usize,
3651 concat!(
3652 "Offset of field: ",
3653 stringify!(ft_eeprom_2232),
3654 "::",
3655 stringify!(BIsFifo)
3656 )
3657 );
3658 assert_eq!(
3659 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232>())).BIsFifoTar as *const _ as usize },
3660 22usize,
3661 concat!(
3662 "Offset of field: ",
3663 stringify!(ft_eeprom_2232),
3664 "::",
3665 stringify!(BIsFifoTar)
3666 )
3667 );
3668 assert_eq!(
3669 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232>())).BIsFastSer as *const _ as usize },
3670 23usize,
3671 concat!(
3672 "Offset of field: ",
3673 stringify!(ft_eeprom_2232),
3674 "::",
3675 stringify!(BIsFastSer)
3676 )
3677 );
3678 assert_eq!(
3679 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232>())).ADriverType as *const _ as usize },
3680 24usize,
3681 concat!(
3682 "Offset of field: ",
3683 stringify!(ft_eeprom_2232),
3684 "::",
3685 stringify!(ADriverType)
3686 )
3687 );
3688 assert_eq!(
3689 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232>())).BDriverType as *const _ as usize },
3690 25usize,
3691 concat!(
3692 "Offset of field: ",
3693 stringify!(ft_eeprom_2232),
3694 "::",
3695 stringify!(BDriverType)
3696 )
3697 );
3698}
3699#[doc = " @noop FT_EEPROM_2232"]
3700#[doc = " @par Summary"]
3701#[doc = " Structure to hold data for the FT2232C, FT2232D and FT2232L data in the FT_EEPROM_Program"]
3702#[doc = " and FT_EEPROM_Read functions."]
3703#[doc = " This is appended to an FT_EEPROM_HEADER structure."]
3704#[doc = " @see FT_EEPROM_HEADER"]
3705pub type FT_EEPROM_2232 = ft_eeprom_2232;
3706#[doc = " @noop FT_EEPROM_232R"]
3707#[doc = " @par Summary"]
3708#[doc = " Structure to hold data for the FT232R data in the FT_EEPROM_Program and FT_EEPROM_Read functions."]
3709#[doc = " This is appended to an FT_EEPROM_HEADER structure."]
3710#[doc = " @see FT_EEPROM_HEADER"]
3711#[repr(C)]
3712#[derive(Debug, Copy, Clone)]
3713pub struct ft_eeprom_232r {
3714 #[doc = " Common header"]
3715 pub common: FT_EEPROM_HEADER,
3716 #[doc = " common elements for all device EEPROMs"]
3717 #[doc = " Drive options"]
3718 pub IsHighCurrent: UCHAR,
3719 #[doc = " non-zero if interface is high current"]
3720 #[doc = " Hardware options"]
3721 pub UseExtOsc: UCHAR,
3722 #[doc = " Use External Oscillator"]
3723 pub InvertTXD: UCHAR,
3724 #[doc = " non-zero if invert TXD"]
3725 pub InvertRXD: UCHAR,
3726 #[doc = " non-zero if invert RXD"]
3727 pub InvertRTS: UCHAR,
3728 #[doc = " non-zero if invert RTS"]
3729 pub InvertCTS: UCHAR,
3730 #[doc = " non-zero if invert CTS"]
3731 pub InvertDTR: UCHAR,
3732 #[doc = " non-zero if invert DTR"]
3733 pub InvertDSR: UCHAR,
3734 #[doc = " non-zero if invert DSR"]
3735 pub InvertDCD: UCHAR,
3736 #[doc = " non-zero if invert DCD"]
3737 pub InvertRI: UCHAR,
3738 #[doc = " non-zero if invert RI"]
3739 pub Cbus0: UCHAR,
3740 #[doc = " Cbus Mux control"]
3741 pub Cbus1: UCHAR,
3742 #[doc = " Cbus Mux control"]
3743 pub Cbus2: UCHAR,
3744 #[doc = " Cbus Mux control"]
3745 pub Cbus3: UCHAR,
3746 #[doc = " Cbus Mux control"]
3747 pub Cbus4: UCHAR,
3748 #[doc = " Cbus Mux control"]
3749 #[doc = " Driver option"]
3750 pub DriverType: UCHAR,
3751}
3752#[test]
3753fn bindgen_test_layout_ft_eeprom_232r() {
3754 assert_eq!(
3755 ::std::mem::size_of::<ft_eeprom_232r>(),
3756 32usize,
3757 concat!("Size of: ", stringify!(ft_eeprom_232r))
3758 );
3759 assert_eq!(
3760 ::std::mem::align_of::<ft_eeprom_232r>(),
3761 4usize,
3762 concat!("Alignment of ", stringify!(ft_eeprom_232r))
3763 );
3764 assert_eq!(
3765 unsafe { &(*(::std::ptr::null::<ft_eeprom_232r>())).common as *const _ as usize },
3766 0usize,
3767 concat!(
3768 "Offset of field: ",
3769 stringify!(ft_eeprom_232r),
3770 "::",
3771 stringify!(common)
3772 )
3773 );
3774 assert_eq!(
3775 unsafe { &(*(::std::ptr::null::<ft_eeprom_232r>())).IsHighCurrent as *const _ as usize },
3776 16usize,
3777 concat!(
3778 "Offset of field: ",
3779 stringify!(ft_eeprom_232r),
3780 "::",
3781 stringify!(IsHighCurrent)
3782 )
3783 );
3784 assert_eq!(
3785 unsafe { &(*(::std::ptr::null::<ft_eeprom_232r>())).UseExtOsc as *const _ as usize },
3786 17usize,
3787 concat!(
3788 "Offset of field: ",
3789 stringify!(ft_eeprom_232r),
3790 "::",
3791 stringify!(UseExtOsc)
3792 )
3793 );
3794 assert_eq!(
3795 unsafe { &(*(::std::ptr::null::<ft_eeprom_232r>())).InvertTXD as *const _ as usize },
3796 18usize,
3797 concat!(
3798 "Offset of field: ",
3799 stringify!(ft_eeprom_232r),
3800 "::",
3801 stringify!(InvertTXD)
3802 )
3803 );
3804 assert_eq!(
3805 unsafe { &(*(::std::ptr::null::<ft_eeprom_232r>())).InvertRXD as *const _ as usize },
3806 19usize,
3807 concat!(
3808 "Offset of field: ",
3809 stringify!(ft_eeprom_232r),
3810 "::",
3811 stringify!(InvertRXD)
3812 )
3813 );
3814 assert_eq!(
3815 unsafe { &(*(::std::ptr::null::<ft_eeprom_232r>())).InvertRTS as *const _ as usize },
3816 20usize,
3817 concat!(
3818 "Offset of field: ",
3819 stringify!(ft_eeprom_232r),
3820 "::",
3821 stringify!(InvertRTS)
3822 )
3823 );
3824 assert_eq!(
3825 unsafe { &(*(::std::ptr::null::<ft_eeprom_232r>())).InvertCTS as *const _ as usize },
3826 21usize,
3827 concat!(
3828 "Offset of field: ",
3829 stringify!(ft_eeprom_232r),
3830 "::",
3831 stringify!(InvertCTS)
3832 )
3833 );
3834 assert_eq!(
3835 unsafe { &(*(::std::ptr::null::<ft_eeprom_232r>())).InvertDTR as *const _ as usize },
3836 22usize,
3837 concat!(
3838 "Offset of field: ",
3839 stringify!(ft_eeprom_232r),
3840 "::",
3841 stringify!(InvertDTR)
3842 )
3843 );
3844 assert_eq!(
3845 unsafe { &(*(::std::ptr::null::<ft_eeprom_232r>())).InvertDSR as *const _ as usize },
3846 23usize,
3847 concat!(
3848 "Offset of field: ",
3849 stringify!(ft_eeprom_232r),
3850 "::",
3851 stringify!(InvertDSR)
3852 )
3853 );
3854 assert_eq!(
3855 unsafe { &(*(::std::ptr::null::<ft_eeprom_232r>())).InvertDCD as *const _ as usize },
3856 24usize,
3857 concat!(
3858 "Offset of field: ",
3859 stringify!(ft_eeprom_232r),
3860 "::",
3861 stringify!(InvertDCD)
3862 )
3863 );
3864 assert_eq!(
3865 unsafe { &(*(::std::ptr::null::<ft_eeprom_232r>())).InvertRI as *const _ as usize },
3866 25usize,
3867 concat!(
3868 "Offset of field: ",
3869 stringify!(ft_eeprom_232r),
3870 "::",
3871 stringify!(InvertRI)
3872 )
3873 );
3874 assert_eq!(
3875 unsafe { &(*(::std::ptr::null::<ft_eeprom_232r>())).Cbus0 as *const _ as usize },
3876 26usize,
3877 concat!(
3878 "Offset of field: ",
3879 stringify!(ft_eeprom_232r),
3880 "::",
3881 stringify!(Cbus0)
3882 )
3883 );
3884 assert_eq!(
3885 unsafe { &(*(::std::ptr::null::<ft_eeprom_232r>())).Cbus1 as *const _ as usize },
3886 27usize,
3887 concat!(
3888 "Offset of field: ",
3889 stringify!(ft_eeprom_232r),
3890 "::",
3891 stringify!(Cbus1)
3892 )
3893 );
3894 assert_eq!(
3895 unsafe { &(*(::std::ptr::null::<ft_eeprom_232r>())).Cbus2 as *const _ as usize },
3896 28usize,
3897 concat!(
3898 "Offset of field: ",
3899 stringify!(ft_eeprom_232r),
3900 "::",
3901 stringify!(Cbus2)
3902 )
3903 );
3904 assert_eq!(
3905 unsafe { &(*(::std::ptr::null::<ft_eeprom_232r>())).Cbus3 as *const _ as usize },
3906 29usize,
3907 concat!(
3908 "Offset of field: ",
3909 stringify!(ft_eeprom_232r),
3910 "::",
3911 stringify!(Cbus3)
3912 )
3913 );
3914 assert_eq!(
3915 unsafe { &(*(::std::ptr::null::<ft_eeprom_232r>())).Cbus4 as *const _ as usize },
3916 30usize,
3917 concat!(
3918 "Offset of field: ",
3919 stringify!(ft_eeprom_232r),
3920 "::",
3921 stringify!(Cbus4)
3922 )
3923 );
3924 assert_eq!(
3925 unsafe { &(*(::std::ptr::null::<ft_eeprom_232r>())).DriverType as *const _ as usize },
3926 31usize,
3927 concat!(
3928 "Offset of field: ",
3929 stringify!(ft_eeprom_232r),
3930 "::",
3931 stringify!(DriverType)
3932 )
3933 );
3934}
3935#[doc = " @noop FT_EEPROM_232R"]
3936#[doc = " @par Summary"]
3937#[doc = " Structure to hold data for the FT232R data in the FT_EEPROM_Program and FT_EEPROM_Read functions."]
3938#[doc = " This is appended to an FT_EEPROM_HEADER structure."]
3939#[doc = " @see FT_EEPROM_HEADER"]
3940pub type FT_EEPROM_232R = ft_eeprom_232r;
3941#[doc = " @noop FT_EEPROM_2232H"]
3942#[doc = " @par Summary"]
3943#[doc = " Structure to hold data for the FT2232H data in the FT_EEPROM_Program and FT_EEPROM_Read functions."]
3944#[doc = " This is appended to an FT_EEPROM_HEADER structure."]
3945#[doc = " @see FT_EEPROM_HEADER"]
3946#[repr(C)]
3947#[derive(Debug, Copy, Clone)]
3948pub struct ft_eeprom_2232h {
3949 #[doc = " Common header"]
3950 pub common: FT_EEPROM_HEADER,
3951 #[doc = " common elements for all device EEPROMs"]
3952 #[doc = " Drive options"]
3953 pub ALSlowSlew: UCHAR,
3954 #[doc = " non-zero if AL pins have slow slew"]
3955 pub ALSchmittInput: UCHAR,
3956 #[doc = " non-zero if AL pins are Schmitt input"]
3957 pub ALDriveCurrent: UCHAR,
3958 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
3959 pub AHSlowSlew: UCHAR,
3960 #[doc = " non-zero if AH pins have slow slew"]
3961 pub AHSchmittInput: UCHAR,
3962 #[doc = " non-zero if AH pins are Schmitt input"]
3963 pub AHDriveCurrent: UCHAR,
3964 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
3965 pub BLSlowSlew: UCHAR,
3966 #[doc = " non-zero if BL pins have slow slew"]
3967 pub BLSchmittInput: UCHAR,
3968 #[doc = " non-zero if BL pins are Schmitt input"]
3969 pub BLDriveCurrent: UCHAR,
3970 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
3971 pub BHSlowSlew: UCHAR,
3972 #[doc = " non-zero if BH pins have slow slew"]
3973 pub BHSchmittInput: UCHAR,
3974 #[doc = " non-zero if BH pins are Schmitt input"]
3975 pub BHDriveCurrent: UCHAR,
3976 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
3977 #[doc = " Hardware options"]
3978 pub AIsFifo: UCHAR,
3979 #[doc = " non-zero if interface is 245 FIFO"]
3980 pub AIsFifoTar: UCHAR,
3981 #[doc = " non-zero if interface is 245 FIFO CPU target"]
3982 pub AIsFastSer: UCHAR,
3983 #[doc = " non-zero if interface is Fast serial"]
3984 pub BIsFifo: UCHAR,
3985 #[doc = " non-zero if interface is 245 FIFO"]
3986 pub BIsFifoTar: UCHAR,
3987 #[doc = " non-zero if interface is 245 FIFO CPU target"]
3988 pub BIsFastSer: UCHAR,
3989 #[doc = " non-zero if interface is Fast serial"]
3990 pub PowerSaveEnable: UCHAR,
3991 #[doc = " non-zero if using BCBUS7 to save power for self-powered designs"]
3992 #[doc = " Driver option"]
3993 pub ADriverType: UCHAR,
3994 #[doc = " non-zero if interface is to use VCP drivers"]
3995 pub BDriverType: UCHAR,
3996}
3997#[test]
3998fn bindgen_test_layout_ft_eeprom_2232h() {
3999 assert_eq!(
4000 ::std::mem::size_of::<ft_eeprom_2232h>(),
4001 40usize,
4002 concat!("Size of: ", stringify!(ft_eeprom_2232h))
4003 );
4004 assert_eq!(
4005 ::std::mem::align_of::<ft_eeprom_2232h>(),
4006 4usize,
4007 concat!("Alignment of ", stringify!(ft_eeprom_2232h))
4008 );
4009 assert_eq!(
4010 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).common as *const _ as usize },
4011 0usize,
4012 concat!(
4013 "Offset of field: ",
4014 stringify!(ft_eeprom_2232h),
4015 "::",
4016 stringify!(common)
4017 )
4018 );
4019 assert_eq!(
4020 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).ALSlowSlew as *const _ as usize },
4021 16usize,
4022 concat!(
4023 "Offset of field: ",
4024 stringify!(ft_eeprom_2232h),
4025 "::",
4026 stringify!(ALSlowSlew)
4027 )
4028 );
4029 assert_eq!(
4030 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).ALSchmittInput as *const _ as usize },
4031 17usize,
4032 concat!(
4033 "Offset of field: ",
4034 stringify!(ft_eeprom_2232h),
4035 "::",
4036 stringify!(ALSchmittInput)
4037 )
4038 );
4039 assert_eq!(
4040 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).ALDriveCurrent as *const _ as usize },
4041 18usize,
4042 concat!(
4043 "Offset of field: ",
4044 stringify!(ft_eeprom_2232h),
4045 "::",
4046 stringify!(ALDriveCurrent)
4047 )
4048 );
4049 assert_eq!(
4050 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).AHSlowSlew as *const _ as usize },
4051 19usize,
4052 concat!(
4053 "Offset of field: ",
4054 stringify!(ft_eeprom_2232h),
4055 "::",
4056 stringify!(AHSlowSlew)
4057 )
4058 );
4059 assert_eq!(
4060 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).AHSchmittInput as *const _ as usize },
4061 20usize,
4062 concat!(
4063 "Offset of field: ",
4064 stringify!(ft_eeprom_2232h),
4065 "::",
4066 stringify!(AHSchmittInput)
4067 )
4068 );
4069 assert_eq!(
4070 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).AHDriveCurrent as *const _ as usize },
4071 21usize,
4072 concat!(
4073 "Offset of field: ",
4074 stringify!(ft_eeprom_2232h),
4075 "::",
4076 stringify!(AHDriveCurrent)
4077 )
4078 );
4079 assert_eq!(
4080 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).BLSlowSlew as *const _ as usize },
4081 22usize,
4082 concat!(
4083 "Offset of field: ",
4084 stringify!(ft_eeprom_2232h),
4085 "::",
4086 stringify!(BLSlowSlew)
4087 )
4088 );
4089 assert_eq!(
4090 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).BLSchmittInput as *const _ as usize },
4091 23usize,
4092 concat!(
4093 "Offset of field: ",
4094 stringify!(ft_eeprom_2232h),
4095 "::",
4096 stringify!(BLSchmittInput)
4097 )
4098 );
4099 assert_eq!(
4100 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).BLDriveCurrent as *const _ as usize },
4101 24usize,
4102 concat!(
4103 "Offset of field: ",
4104 stringify!(ft_eeprom_2232h),
4105 "::",
4106 stringify!(BLDriveCurrent)
4107 )
4108 );
4109 assert_eq!(
4110 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).BHSlowSlew as *const _ as usize },
4111 25usize,
4112 concat!(
4113 "Offset of field: ",
4114 stringify!(ft_eeprom_2232h),
4115 "::",
4116 stringify!(BHSlowSlew)
4117 )
4118 );
4119 assert_eq!(
4120 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).BHSchmittInput as *const _ as usize },
4121 26usize,
4122 concat!(
4123 "Offset of field: ",
4124 stringify!(ft_eeprom_2232h),
4125 "::",
4126 stringify!(BHSchmittInput)
4127 )
4128 );
4129 assert_eq!(
4130 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).BHDriveCurrent as *const _ as usize },
4131 27usize,
4132 concat!(
4133 "Offset of field: ",
4134 stringify!(ft_eeprom_2232h),
4135 "::",
4136 stringify!(BHDriveCurrent)
4137 )
4138 );
4139 assert_eq!(
4140 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).AIsFifo as *const _ as usize },
4141 28usize,
4142 concat!(
4143 "Offset of field: ",
4144 stringify!(ft_eeprom_2232h),
4145 "::",
4146 stringify!(AIsFifo)
4147 )
4148 );
4149 assert_eq!(
4150 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).AIsFifoTar as *const _ as usize },
4151 29usize,
4152 concat!(
4153 "Offset of field: ",
4154 stringify!(ft_eeprom_2232h),
4155 "::",
4156 stringify!(AIsFifoTar)
4157 )
4158 );
4159 assert_eq!(
4160 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).AIsFastSer as *const _ as usize },
4161 30usize,
4162 concat!(
4163 "Offset of field: ",
4164 stringify!(ft_eeprom_2232h),
4165 "::",
4166 stringify!(AIsFastSer)
4167 )
4168 );
4169 assert_eq!(
4170 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).BIsFifo as *const _ as usize },
4171 31usize,
4172 concat!(
4173 "Offset of field: ",
4174 stringify!(ft_eeprom_2232h),
4175 "::",
4176 stringify!(BIsFifo)
4177 )
4178 );
4179 assert_eq!(
4180 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).BIsFifoTar as *const _ as usize },
4181 32usize,
4182 concat!(
4183 "Offset of field: ",
4184 stringify!(ft_eeprom_2232h),
4185 "::",
4186 stringify!(BIsFifoTar)
4187 )
4188 );
4189 assert_eq!(
4190 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).BIsFastSer as *const _ as usize },
4191 33usize,
4192 concat!(
4193 "Offset of field: ",
4194 stringify!(ft_eeprom_2232h),
4195 "::",
4196 stringify!(BIsFastSer)
4197 )
4198 );
4199 assert_eq!(
4200 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).PowerSaveEnable as *const _ as usize },
4201 34usize,
4202 concat!(
4203 "Offset of field: ",
4204 stringify!(ft_eeprom_2232h),
4205 "::",
4206 stringify!(PowerSaveEnable)
4207 )
4208 );
4209 assert_eq!(
4210 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).ADriverType as *const _ as usize },
4211 35usize,
4212 concat!(
4213 "Offset of field: ",
4214 stringify!(ft_eeprom_2232h),
4215 "::",
4216 stringify!(ADriverType)
4217 )
4218 );
4219 assert_eq!(
4220 unsafe { &(*(::std::ptr::null::<ft_eeprom_2232h>())).BDriverType as *const _ as usize },
4221 36usize,
4222 concat!(
4223 "Offset of field: ",
4224 stringify!(ft_eeprom_2232h),
4225 "::",
4226 stringify!(BDriverType)
4227 )
4228 );
4229}
4230#[doc = " @noop FT_EEPROM_2232H"]
4231#[doc = " @par Summary"]
4232#[doc = " Structure to hold data for the FT2232H data in the FT_EEPROM_Program and FT_EEPROM_Read functions."]
4233#[doc = " This is appended to an FT_EEPROM_HEADER structure."]
4234#[doc = " @see FT_EEPROM_HEADER"]
4235pub type FT_EEPROM_2232H = ft_eeprom_2232h;
4236#[doc = " @noop FT_EEPROM_4232H"]
4237#[doc = " @par Summary"]
4238#[doc = " Structure to hold data for the FT4232H data in the FT_EEPROM_Program and FT_EEPROM_Read functions."]
4239#[doc = " This is appended to an FT_EEPROM_HEADER structure."]
4240#[doc = " @see FT_EEPROM_HEADER"]
4241#[repr(C)]
4242#[derive(Debug, Copy, Clone)]
4243pub struct ft_eeprom_4232h {
4244 #[doc = " Common header"]
4245 pub common: FT_EEPROM_HEADER,
4246 #[doc = " common elements for all device EEPROMs"]
4247 #[doc = " Drive options"]
4248 pub ASlowSlew: UCHAR,
4249 #[doc = " non-zero if A pins have slow slew"]
4250 pub ASchmittInput: UCHAR,
4251 #[doc = " non-zero if A pins are Schmitt input"]
4252 pub ADriveCurrent: UCHAR,
4253 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
4254 pub BSlowSlew: UCHAR,
4255 #[doc = " non-zero if B pins have slow slew"]
4256 pub BSchmittInput: UCHAR,
4257 #[doc = " non-zero if B pins are Schmitt input"]
4258 pub BDriveCurrent: UCHAR,
4259 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
4260 pub CSlowSlew: UCHAR,
4261 #[doc = " non-zero if C pins have slow slew"]
4262 pub CSchmittInput: UCHAR,
4263 #[doc = " non-zero if C pins are Schmitt input"]
4264 pub CDriveCurrent: UCHAR,
4265 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
4266 pub DSlowSlew: UCHAR,
4267 #[doc = " non-zero if D pins have slow slew"]
4268 pub DSchmittInput: UCHAR,
4269 #[doc = " non-zero if D pins are Schmitt input"]
4270 pub DDriveCurrent: UCHAR,
4271 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
4272 #[doc = " Hardware options"]
4273 pub ARIIsTXDEN: UCHAR,
4274 #[doc = " non-zero if port A uses RI as RS485 TXDEN"]
4275 pub BRIIsTXDEN: UCHAR,
4276 #[doc = " non-zero if port B uses RI as RS485 TXDEN"]
4277 pub CRIIsTXDEN: UCHAR,
4278 #[doc = " non-zero if port C uses RI as RS485 TXDEN"]
4279 pub DRIIsTXDEN: UCHAR,
4280 #[doc = " non-zero if port D uses RI as RS485 TXDEN"]
4281 #[doc = " Driver option"]
4282 pub ADriverType: UCHAR,
4283 #[doc = " non-zero if interface is to use VCP drivers"]
4284 pub BDriverType: UCHAR,
4285 #[doc = " non-zero if interface is to use VCP drivers"]
4286 pub CDriverType: UCHAR,
4287 #[doc = " non-zero if interface is to use VCP drivers"]
4288 pub DDriverType: UCHAR,
4289}
4290#[test]
4291fn bindgen_test_layout_ft_eeprom_4232h() {
4292 assert_eq!(
4293 ::std::mem::size_of::<ft_eeprom_4232h>(),
4294 36usize,
4295 concat!("Size of: ", stringify!(ft_eeprom_4232h))
4296 );
4297 assert_eq!(
4298 ::std::mem::align_of::<ft_eeprom_4232h>(),
4299 4usize,
4300 concat!("Alignment of ", stringify!(ft_eeprom_4232h))
4301 );
4302 assert_eq!(
4303 unsafe { &(*(::std::ptr::null::<ft_eeprom_4232h>())).common as *const _ as usize },
4304 0usize,
4305 concat!(
4306 "Offset of field: ",
4307 stringify!(ft_eeprom_4232h),
4308 "::",
4309 stringify!(common)
4310 )
4311 );
4312 assert_eq!(
4313 unsafe { &(*(::std::ptr::null::<ft_eeprom_4232h>())).ASlowSlew as *const _ as usize },
4314 16usize,
4315 concat!(
4316 "Offset of field: ",
4317 stringify!(ft_eeprom_4232h),
4318 "::",
4319 stringify!(ASlowSlew)
4320 )
4321 );
4322 assert_eq!(
4323 unsafe { &(*(::std::ptr::null::<ft_eeprom_4232h>())).ASchmittInput as *const _ as usize },
4324 17usize,
4325 concat!(
4326 "Offset of field: ",
4327 stringify!(ft_eeprom_4232h),
4328 "::",
4329 stringify!(ASchmittInput)
4330 )
4331 );
4332 assert_eq!(
4333 unsafe { &(*(::std::ptr::null::<ft_eeprom_4232h>())).ADriveCurrent as *const _ as usize },
4334 18usize,
4335 concat!(
4336 "Offset of field: ",
4337 stringify!(ft_eeprom_4232h),
4338 "::",
4339 stringify!(ADriveCurrent)
4340 )
4341 );
4342 assert_eq!(
4343 unsafe { &(*(::std::ptr::null::<ft_eeprom_4232h>())).BSlowSlew as *const _ as usize },
4344 19usize,
4345 concat!(
4346 "Offset of field: ",
4347 stringify!(ft_eeprom_4232h),
4348 "::",
4349 stringify!(BSlowSlew)
4350 )
4351 );
4352 assert_eq!(
4353 unsafe { &(*(::std::ptr::null::<ft_eeprom_4232h>())).BSchmittInput as *const _ as usize },
4354 20usize,
4355 concat!(
4356 "Offset of field: ",
4357 stringify!(ft_eeprom_4232h),
4358 "::",
4359 stringify!(BSchmittInput)
4360 )
4361 );
4362 assert_eq!(
4363 unsafe { &(*(::std::ptr::null::<ft_eeprom_4232h>())).BDriveCurrent as *const _ as usize },
4364 21usize,
4365 concat!(
4366 "Offset of field: ",
4367 stringify!(ft_eeprom_4232h),
4368 "::",
4369 stringify!(BDriveCurrent)
4370 )
4371 );
4372 assert_eq!(
4373 unsafe { &(*(::std::ptr::null::<ft_eeprom_4232h>())).CSlowSlew as *const _ as usize },
4374 22usize,
4375 concat!(
4376 "Offset of field: ",
4377 stringify!(ft_eeprom_4232h),
4378 "::",
4379 stringify!(CSlowSlew)
4380 )
4381 );
4382 assert_eq!(
4383 unsafe { &(*(::std::ptr::null::<ft_eeprom_4232h>())).CSchmittInput as *const _ as usize },
4384 23usize,
4385 concat!(
4386 "Offset of field: ",
4387 stringify!(ft_eeprom_4232h),
4388 "::",
4389 stringify!(CSchmittInput)
4390 )
4391 );
4392 assert_eq!(
4393 unsafe { &(*(::std::ptr::null::<ft_eeprom_4232h>())).CDriveCurrent as *const _ as usize },
4394 24usize,
4395 concat!(
4396 "Offset of field: ",
4397 stringify!(ft_eeprom_4232h),
4398 "::",
4399 stringify!(CDriveCurrent)
4400 )
4401 );
4402 assert_eq!(
4403 unsafe { &(*(::std::ptr::null::<ft_eeprom_4232h>())).DSlowSlew as *const _ as usize },
4404 25usize,
4405 concat!(
4406 "Offset of field: ",
4407 stringify!(ft_eeprom_4232h),
4408 "::",
4409 stringify!(DSlowSlew)
4410 )
4411 );
4412 assert_eq!(
4413 unsafe { &(*(::std::ptr::null::<ft_eeprom_4232h>())).DSchmittInput as *const _ as usize },
4414 26usize,
4415 concat!(
4416 "Offset of field: ",
4417 stringify!(ft_eeprom_4232h),
4418 "::",
4419 stringify!(DSchmittInput)
4420 )
4421 );
4422 assert_eq!(
4423 unsafe { &(*(::std::ptr::null::<ft_eeprom_4232h>())).DDriveCurrent as *const _ as usize },
4424 27usize,
4425 concat!(
4426 "Offset of field: ",
4427 stringify!(ft_eeprom_4232h),
4428 "::",
4429 stringify!(DDriveCurrent)
4430 )
4431 );
4432 assert_eq!(
4433 unsafe { &(*(::std::ptr::null::<ft_eeprom_4232h>())).ARIIsTXDEN as *const _ as usize },
4434 28usize,
4435 concat!(
4436 "Offset of field: ",
4437 stringify!(ft_eeprom_4232h),
4438 "::",
4439 stringify!(ARIIsTXDEN)
4440 )
4441 );
4442 assert_eq!(
4443 unsafe { &(*(::std::ptr::null::<ft_eeprom_4232h>())).BRIIsTXDEN as *const _ as usize },
4444 29usize,
4445 concat!(
4446 "Offset of field: ",
4447 stringify!(ft_eeprom_4232h),
4448 "::",
4449 stringify!(BRIIsTXDEN)
4450 )
4451 );
4452 assert_eq!(
4453 unsafe { &(*(::std::ptr::null::<ft_eeprom_4232h>())).CRIIsTXDEN as *const _ as usize },
4454 30usize,
4455 concat!(
4456 "Offset of field: ",
4457 stringify!(ft_eeprom_4232h),
4458 "::",
4459 stringify!(CRIIsTXDEN)
4460 )
4461 );
4462 assert_eq!(
4463 unsafe { &(*(::std::ptr::null::<ft_eeprom_4232h>())).DRIIsTXDEN as *const _ as usize },
4464 31usize,
4465 concat!(
4466 "Offset of field: ",
4467 stringify!(ft_eeprom_4232h),
4468 "::",
4469 stringify!(DRIIsTXDEN)
4470 )
4471 );
4472 assert_eq!(
4473 unsafe { &(*(::std::ptr::null::<ft_eeprom_4232h>())).ADriverType as *const _ as usize },
4474 32usize,
4475 concat!(
4476 "Offset of field: ",
4477 stringify!(ft_eeprom_4232h),
4478 "::",
4479 stringify!(ADriverType)
4480 )
4481 );
4482 assert_eq!(
4483 unsafe { &(*(::std::ptr::null::<ft_eeprom_4232h>())).BDriverType as *const _ as usize },
4484 33usize,
4485 concat!(
4486 "Offset of field: ",
4487 stringify!(ft_eeprom_4232h),
4488 "::",
4489 stringify!(BDriverType)
4490 )
4491 );
4492 assert_eq!(
4493 unsafe { &(*(::std::ptr::null::<ft_eeprom_4232h>())).CDriverType as *const _ as usize },
4494 34usize,
4495 concat!(
4496 "Offset of field: ",
4497 stringify!(ft_eeprom_4232h),
4498 "::",
4499 stringify!(CDriverType)
4500 )
4501 );
4502 assert_eq!(
4503 unsafe { &(*(::std::ptr::null::<ft_eeprom_4232h>())).DDriverType as *const _ as usize },
4504 35usize,
4505 concat!(
4506 "Offset of field: ",
4507 stringify!(ft_eeprom_4232h),
4508 "::",
4509 stringify!(DDriverType)
4510 )
4511 );
4512}
4513#[doc = " @noop FT_EEPROM_4232H"]
4514#[doc = " @par Summary"]
4515#[doc = " Structure to hold data for the FT4232H data in the FT_EEPROM_Program and FT_EEPROM_Read functions."]
4516#[doc = " This is appended to an FT_EEPROM_HEADER structure."]
4517#[doc = " @see FT_EEPROM_HEADER"]
4518pub type FT_EEPROM_4232H = ft_eeprom_4232h;
4519#[doc = " @noop FT_EEPROM_232H"]
4520#[doc = " @par Summary"]
4521#[doc = " Structure to hold data for the FT232H data in the FT_EEPROM_Program and FT_EEPROM_Read functions."]
4522#[doc = " This is appended to an FT_EEPROM_HEADER structure."]
4523#[doc = " @see FT_EEPROM_HEADER"]
4524#[repr(C)]
4525#[derive(Debug, Copy, Clone)]
4526pub struct ft_eeprom_232h {
4527 #[doc = " Common header"]
4528 pub common: FT_EEPROM_HEADER,
4529 #[doc = " common elements for all device EEPROMs"]
4530 #[doc = " Drive options"]
4531 pub ACSlowSlew: UCHAR,
4532 #[doc = " non-zero if AC bus pins have slow slew"]
4533 pub ACSchmittInput: UCHAR,
4534 #[doc = " non-zero if AC bus pins are Schmitt input"]
4535 pub ACDriveCurrent: UCHAR,
4536 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
4537 pub ADSlowSlew: UCHAR,
4538 #[doc = " non-zero if AD bus pins have slow slew"]
4539 pub ADSchmittInput: UCHAR,
4540 #[doc = " non-zero if AD bus pins are Schmitt input"]
4541 pub ADDriveCurrent: UCHAR,
4542 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
4543 #[doc = " CBUS options"]
4544 pub Cbus0: UCHAR,
4545 #[doc = " Cbus Mux control"]
4546 pub Cbus1: UCHAR,
4547 #[doc = " Cbus Mux control"]
4548 pub Cbus2: UCHAR,
4549 #[doc = " Cbus Mux control"]
4550 pub Cbus3: UCHAR,
4551 #[doc = " Cbus Mux control"]
4552 pub Cbus4: UCHAR,
4553 #[doc = " Cbus Mux control"]
4554 pub Cbus5: UCHAR,
4555 #[doc = " Cbus Mux control"]
4556 pub Cbus6: UCHAR,
4557 #[doc = " Cbus Mux control"]
4558 pub Cbus7: UCHAR,
4559 #[doc = " Cbus Mux control"]
4560 pub Cbus8: UCHAR,
4561 #[doc = " Cbus Mux control"]
4562 pub Cbus9: UCHAR,
4563 #[doc = " Cbus Mux control"]
4564 #[doc = " FT1248 options"]
4565 pub FT1248Cpol: UCHAR,
4566 #[doc = " FT1248 clock polarity - clock idle high (1) or clock idle low (0)"]
4567 pub FT1248Lsb: UCHAR,
4568 #[doc = " FT1248 data is LSB (1) or MSB (0)"]
4569 pub FT1248FlowControl: UCHAR,
4570 #[doc = " FT1248 flow control enable"]
4571 #[doc = " Hardware options"]
4572 pub IsFifo: UCHAR,
4573 #[doc = " non-zero if interface is 245 FIFO"]
4574 pub IsFifoTar: UCHAR,
4575 #[doc = " non-zero if interface is 245 FIFO CPU target"]
4576 pub IsFastSer: UCHAR,
4577 #[doc = " non-zero if interface is Fast serial"]
4578 pub IsFT1248: UCHAR,
4579 #[doc = " non-zero if interface is FT1248"]
4580 pub PowerSaveEnable: UCHAR,
4581 #[doc = ""]
4582 #[doc = " Driver option"]
4583 pub DriverType: UCHAR,
4584}
4585#[test]
4586fn bindgen_test_layout_ft_eeprom_232h() {
4587 assert_eq!(
4588 ::std::mem::size_of::<ft_eeprom_232h>(),
4589 44usize,
4590 concat!("Size of: ", stringify!(ft_eeprom_232h))
4591 );
4592 assert_eq!(
4593 ::std::mem::align_of::<ft_eeprom_232h>(),
4594 4usize,
4595 concat!("Alignment of ", stringify!(ft_eeprom_232h))
4596 );
4597 assert_eq!(
4598 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).common as *const _ as usize },
4599 0usize,
4600 concat!(
4601 "Offset of field: ",
4602 stringify!(ft_eeprom_232h),
4603 "::",
4604 stringify!(common)
4605 )
4606 );
4607 assert_eq!(
4608 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).ACSlowSlew as *const _ as usize },
4609 16usize,
4610 concat!(
4611 "Offset of field: ",
4612 stringify!(ft_eeprom_232h),
4613 "::",
4614 stringify!(ACSlowSlew)
4615 )
4616 );
4617 assert_eq!(
4618 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).ACSchmittInput as *const _ as usize },
4619 17usize,
4620 concat!(
4621 "Offset of field: ",
4622 stringify!(ft_eeprom_232h),
4623 "::",
4624 stringify!(ACSchmittInput)
4625 )
4626 );
4627 assert_eq!(
4628 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).ACDriveCurrent as *const _ as usize },
4629 18usize,
4630 concat!(
4631 "Offset of field: ",
4632 stringify!(ft_eeprom_232h),
4633 "::",
4634 stringify!(ACDriveCurrent)
4635 )
4636 );
4637 assert_eq!(
4638 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).ADSlowSlew as *const _ as usize },
4639 19usize,
4640 concat!(
4641 "Offset of field: ",
4642 stringify!(ft_eeprom_232h),
4643 "::",
4644 stringify!(ADSlowSlew)
4645 )
4646 );
4647 assert_eq!(
4648 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).ADSchmittInput as *const _ as usize },
4649 20usize,
4650 concat!(
4651 "Offset of field: ",
4652 stringify!(ft_eeprom_232h),
4653 "::",
4654 stringify!(ADSchmittInput)
4655 )
4656 );
4657 assert_eq!(
4658 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).ADDriveCurrent as *const _ as usize },
4659 21usize,
4660 concat!(
4661 "Offset of field: ",
4662 stringify!(ft_eeprom_232h),
4663 "::",
4664 stringify!(ADDriveCurrent)
4665 )
4666 );
4667 assert_eq!(
4668 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).Cbus0 as *const _ as usize },
4669 22usize,
4670 concat!(
4671 "Offset of field: ",
4672 stringify!(ft_eeprom_232h),
4673 "::",
4674 stringify!(Cbus0)
4675 )
4676 );
4677 assert_eq!(
4678 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).Cbus1 as *const _ as usize },
4679 23usize,
4680 concat!(
4681 "Offset of field: ",
4682 stringify!(ft_eeprom_232h),
4683 "::",
4684 stringify!(Cbus1)
4685 )
4686 );
4687 assert_eq!(
4688 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).Cbus2 as *const _ as usize },
4689 24usize,
4690 concat!(
4691 "Offset of field: ",
4692 stringify!(ft_eeprom_232h),
4693 "::",
4694 stringify!(Cbus2)
4695 )
4696 );
4697 assert_eq!(
4698 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).Cbus3 as *const _ as usize },
4699 25usize,
4700 concat!(
4701 "Offset of field: ",
4702 stringify!(ft_eeprom_232h),
4703 "::",
4704 stringify!(Cbus3)
4705 )
4706 );
4707 assert_eq!(
4708 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).Cbus4 as *const _ as usize },
4709 26usize,
4710 concat!(
4711 "Offset of field: ",
4712 stringify!(ft_eeprom_232h),
4713 "::",
4714 stringify!(Cbus4)
4715 )
4716 );
4717 assert_eq!(
4718 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).Cbus5 as *const _ as usize },
4719 27usize,
4720 concat!(
4721 "Offset of field: ",
4722 stringify!(ft_eeprom_232h),
4723 "::",
4724 stringify!(Cbus5)
4725 )
4726 );
4727 assert_eq!(
4728 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).Cbus6 as *const _ as usize },
4729 28usize,
4730 concat!(
4731 "Offset of field: ",
4732 stringify!(ft_eeprom_232h),
4733 "::",
4734 stringify!(Cbus6)
4735 )
4736 );
4737 assert_eq!(
4738 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).Cbus7 as *const _ as usize },
4739 29usize,
4740 concat!(
4741 "Offset of field: ",
4742 stringify!(ft_eeprom_232h),
4743 "::",
4744 stringify!(Cbus7)
4745 )
4746 );
4747 assert_eq!(
4748 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).Cbus8 as *const _ as usize },
4749 30usize,
4750 concat!(
4751 "Offset of field: ",
4752 stringify!(ft_eeprom_232h),
4753 "::",
4754 stringify!(Cbus8)
4755 )
4756 );
4757 assert_eq!(
4758 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).Cbus9 as *const _ as usize },
4759 31usize,
4760 concat!(
4761 "Offset of field: ",
4762 stringify!(ft_eeprom_232h),
4763 "::",
4764 stringify!(Cbus9)
4765 )
4766 );
4767 assert_eq!(
4768 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).FT1248Cpol as *const _ as usize },
4769 32usize,
4770 concat!(
4771 "Offset of field: ",
4772 stringify!(ft_eeprom_232h),
4773 "::",
4774 stringify!(FT1248Cpol)
4775 )
4776 );
4777 assert_eq!(
4778 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).FT1248Lsb as *const _ as usize },
4779 33usize,
4780 concat!(
4781 "Offset of field: ",
4782 stringify!(ft_eeprom_232h),
4783 "::",
4784 stringify!(FT1248Lsb)
4785 )
4786 );
4787 assert_eq!(
4788 unsafe {
4789 &(*(::std::ptr::null::<ft_eeprom_232h>())).FT1248FlowControl as *const _ as usize
4790 },
4791 34usize,
4792 concat!(
4793 "Offset of field: ",
4794 stringify!(ft_eeprom_232h),
4795 "::",
4796 stringify!(FT1248FlowControl)
4797 )
4798 );
4799 assert_eq!(
4800 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).IsFifo as *const _ as usize },
4801 35usize,
4802 concat!(
4803 "Offset of field: ",
4804 stringify!(ft_eeprom_232h),
4805 "::",
4806 stringify!(IsFifo)
4807 )
4808 );
4809 assert_eq!(
4810 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).IsFifoTar as *const _ as usize },
4811 36usize,
4812 concat!(
4813 "Offset of field: ",
4814 stringify!(ft_eeprom_232h),
4815 "::",
4816 stringify!(IsFifoTar)
4817 )
4818 );
4819 assert_eq!(
4820 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).IsFastSer as *const _ as usize },
4821 37usize,
4822 concat!(
4823 "Offset of field: ",
4824 stringify!(ft_eeprom_232h),
4825 "::",
4826 stringify!(IsFastSer)
4827 )
4828 );
4829 assert_eq!(
4830 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).IsFT1248 as *const _ as usize },
4831 38usize,
4832 concat!(
4833 "Offset of field: ",
4834 stringify!(ft_eeprom_232h),
4835 "::",
4836 stringify!(IsFT1248)
4837 )
4838 );
4839 assert_eq!(
4840 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).PowerSaveEnable as *const _ as usize },
4841 39usize,
4842 concat!(
4843 "Offset of field: ",
4844 stringify!(ft_eeprom_232h),
4845 "::",
4846 stringify!(PowerSaveEnable)
4847 )
4848 );
4849 assert_eq!(
4850 unsafe { &(*(::std::ptr::null::<ft_eeprom_232h>())).DriverType as *const _ as usize },
4851 40usize,
4852 concat!(
4853 "Offset of field: ",
4854 stringify!(ft_eeprom_232h),
4855 "::",
4856 stringify!(DriverType)
4857 )
4858 );
4859}
4860#[doc = " @noop FT_EEPROM_232H"]
4861#[doc = " @par Summary"]
4862#[doc = " Structure to hold data for the FT232H data in the FT_EEPROM_Program and FT_EEPROM_Read functions."]
4863#[doc = " This is appended to an FT_EEPROM_HEADER structure."]
4864#[doc = " @see FT_EEPROM_HEADER"]
4865pub type FT_EEPROM_232H = ft_eeprom_232h;
4866#[doc = " @noop FT_EEPROM_X_SERIES"]
4867#[doc = " @par Summary"]
4868#[doc = " Structure to hold data for the FT-X series data in the FT_EEPROM_Program and FT_EEPROM_Read functions."]
4869#[doc = " This is appended to an FT_EEPROM_HEADER structure."]
4870#[doc = " @see FT_EEPROM_HEADER"]
4871#[repr(C)]
4872#[derive(Debug, Copy, Clone)]
4873pub struct ft_eeprom_x_series {
4874 #[doc = " Common header"]
4875 pub common: FT_EEPROM_HEADER,
4876 #[doc = " common elements for all device EEPROMs"]
4877 #[doc = " Drive options"]
4878 pub ACSlowSlew: UCHAR,
4879 #[doc = " non-zero if AC bus pins have slow slew"]
4880 pub ACSchmittInput: UCHAR,
4881 #[doc = " non-zero if AC bus pins are Schmitt input"]
4882 pub ACDriveCurrent: UCHAR,
4883 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
4884 pub ADSlowSlew: UCHAR,
4885 #[doc = " non-zero if AD bus pins have slow slew"]
4886 pub ADSchmittInput: UCHAR,
4887 #[doc = " non-zero if AD bus pins are Schmitt input"]
4888 pub ADDriveCurrent: UCHAR,
4889 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
4890 #[doc = " CBUS options"]
4891 pub Cbus0: UCHAR,
4892 #[doc = " Cbus Mux control"]
4893 pub Cbus1: UCHAR,
4894 #[doc = " Cbus Mux control"]
4895 pub Cbus2: UCHAR,
4896 #[doc = " Cbus Mux control"]
4897 pub Cbus3: UCHAR,
4898 #[doc = " Cbus Mux control"]
4899 pub Cbus4: UCHAR,
4900 #[doc = " Cbus Mux control"]
4901 pub Cbus5: UCHAR,
4902 #[doc = " Cbus Mux control"]
4903 pub Cbus6: UCHAR,
4904 #[doc = " Cbus Mux control"]
4905 #[doc = " UART signal options"]
4906 pub InvertTXD: UCHAR,
4907 #[doc = " non-zero if invert TXD"]
4908 pub InvertRXD: UCHAR,
4909 #[doc = " non-zero if invert RXD"]
4910 pub InvertRTS: UCHAR,
4911 #[doc = " non-zero if invert RTS"]
4912 pub InvertCTS: UCHAR,
4913 #[doc = " non-zero if invert CTS"]
4914 pub InvertDTR: UCHAR,
4915 #[doc = " non-zero if invert DTR"]
4916 pub InvertDSR: UCHAR,
4917 #[doc = " non-zero if invert DSR"]
4918 pub InvertDCD: UCHAR,
4919 #[doc = " non-zero if invert DCD"]
4920 pub InvertRI: UCHAR,
4921 #[doc = " non-zero if invert RI"]
4922 #[doc = " Battery Charge Detect options"]
4923 pub BCDEnable: UCHAR,
4924 #[doc = " Enable Battery Charger Detection"]
4925 pub BCDForceCbusPWREN: UCHAR,
4926 #[doc = " asserts the power enable signal on CBUS when charging port detected"]
4927 pub BCDDisableSleep: UCHAR,
4928 #[doc = " forces the device never to go into sleep mode"]
4929 #[doc = " I2C options"]
4930 pub I2CSlaveAddress: WORD,
4931 #[doc = " I2C slave device address"]
4932 pub I2CDeviceId: DWORD,
4933 #[doc = " I2C device ID"]
4934 pub I2CDisableSchmitt: UCHAR,
4935 #[doc = " Disable I2C Schmitt trigger"]
4936 #[doc = " FT1248 options"]
4937 pub FT1248Cpol: UCHAR,
4938 #[doc = " FT1248 clock polarity - clock idle high (1) or clock idle low (0)"]
4939 pub FT1248Lsb: UCHAR,
4940 #[doc = " FT1248 data is LSB (1) or MSB (0)"]
4941 pub FT1248FlowControl: UCHAR,
4942 #[doc = " FT1248 flow control enable"]
4943 #[doc = " Hardware options"]
4944 pub RS485EchoSuppress: UCHAR,
4945 #[doc = ""]
4946 pub PowerSaveEnable: UCHAR,
4947 #[doc = ""]
4948 #[doc = " Driver option"]
4949 pub DriverType: UCHAR,
4950}
4951#[test]
4952fn bindgen_test_layout_ft_eeprom_x_series() {
4953 assert_eq!(
4954 ::std::mem::size_of::<ft_eeprom_x_series>(),
4955 56usize,
4956 concat!("Size of: ", stringify!(ft_eeprom_x_series))
4957 );
4958 assert_eq!(
4959 ::std::mem::align_of::<ft_eeprom_x_series>(),
4960 4usize,
4961 concat!("Alignment of ", stringify!(ft_eeprom_x_series))
4962 );
4963 assert_eq!(
4964 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).common as *const _ as usize },
4965 0usize,
4966 concat!(
4967 "Offset of field: ",
4968 stringify!(ft_eeprom_x_series),
4969 "::",
4970 stringify!(common)
4971 )
4972 );
4973 assert_eq!(
4974 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).ACSlowSlew as *const _ as usize },
4975 16usize,
4976 concat!(
4977 "Offset of field: ",
4978 stringify!(ft_eeprom_x_series),
4979 "::",
4980 stringify!(ACSlowSlew)
4981 )
4982 );
4983 assert_eq!(
4984 unsafe {
4985 &(*(::std::ptr::null::<ft_eeprom_x_series>())).ACSchmittInput as *const _ as usize
4986 },
4987 17usize,
4988 concat!(
4989 "Offset of field: ",
4990 stringify!(ft_eeprom_x_series),
4991 "::",
4992 stringify!(ACSchmittInput)
4993 )
4994 );
4995 assert_eq!(
4996 unsafe {
4997 &(*(::std::ptr::null::<ft_eeprom_x_series>())).ACDriveCurrent as *const _ as usize
4998 },
4999 18usize,
5000 concat!(
5001 "Offset of field: ",
5002 stringify!(ft_eeprom_x_series),
5003 "::",
5004 stringify!(ACDriveCurrent)
5005 )
5006 );
5007 assert_eq!(
5008 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).ADSlowSlew as *const _ as usize },
5009 19usize,
5010 concat!(
5011 "Offset of field: ",
5012 stringify!(ft_eeprom_x_series),
5013 "::",
5014 stringify!(ADSlowSlew)
5015 )
5016 );
5017 assert_eq!(
5018 unsafe {
5019 &(*(::std::ptr::null::<ft_eeprom_x_series>())).ADSchmittInput as *const _ as usize
5020 },
5021 20usize,
5022 concat!(
5023 "Offset of field: ",
5024 stringify!(ft_eeprom_x_series),
5025 "::",
5026 stringify!(ADSchmittInput)
5027 )
5028 );
5029 assert_eq!(
5030 unsafe {
5031 &(*(::std::ptr::null::<ft_eeprom_x_series>())).ADDriveCurrent as *const _ as usize
5032 },
5033 21usize,
5034 concat!(
5035 "Offset of field: ",
5036 stringify!(ft_eeprom_x_series),
5037 "::",
5038 stringify!(ADDriveCurrent)
5039 )
5040 );
5041 assert_eq!(
5042 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).Cbus0 as *const _ as usize },
5043 22usize,
5044 concat!(
5045 "Offset of field: ",
5046 stringify!(ft_eeprom_x_series),
5047 "::",
5048 stringify!(Cbus0)
5049 )
5050 );
5051 assert_eq!(
5052 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).Cbus1 as *const _ as usize },
5053 23usize,
5054 concat!(
5055 "Offset of field: ",
5056 stringify!(ft_eeprom_x_series),
5057 "::",
5058 stringify!(Cbus1)
5059 )
5060 );
5061 assert_eq!(
5062 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).Cbus2 as *const _ as usize },
5063 24usize,
5064 concat!(
5065 "Offset of field: ",
5066 stringify!(ft_eeprom_x_series),
5067 "::",
5068 stringify!(Cbus2)
5069 )
5070 );
5071 assert_eq!(
5072 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).Cbus3 as *const _ as usize },
5073 25usize,
5074 concat!(
5075 "Offset of field: ",
5076 stringify!(ft_eeprom_x_series),
5077 "::",
5078 stringify!(Cbus3)
5079 )
5080 );
5081 assert_eq!(
5082 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).Cbus4 as *const _ as usize },
5083 26usize,
5084 concat!(
5085 "Offset of field: ",
5086 stringify!(ft_eeprom_x_series),
5087 "::",
5088 stringify!(Cbus4)
5089 )
5090 );
5091 assert_eq!(
5092 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).Cbus5 as *const _ as usize },
5093 27usize,
5094 concat!(
5095 "Offset of field: ",
5096 stringify!(ft_eeprom_x_series),
5097 "::",
5098 stringify!(Cbus5)
5099 )
5100 );
5101 assert_eq!(
5102 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).Cbus6 as *const _ as usize },
5103 28usize,
5104 concat!(
5105 "Offset of field: ",
5106 stringify!(ft_eeprom_x_series),
5107 "::",
5108 stringify!(Cbus6)
5109 )
5110 );
5111 assert_eq!(
5112 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).InvertTXD as *const _ as usize },
5113 29usize,
5114 concat!(
5115 "Offset of field: ",
5116 stringify!(ft_eeprom_x_series),
5117 "::",
5118 stringify!(InvertTXD)
5119 )
5120 );
5121 assert_eq!(
5122 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).InvertRXD as *const _ as usize },
5123 30usize,
5124 concat!(
5125 "Offset of field: ",
5126 stringify!(ft_eeprom_x_series),
5127 "::",
5128 stringify!(InvertRXD)
5129 )
5130 );
5131 assert_eq!(
5132 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).InvertRTS as *const _ as usize },
5133 31usize,
5134 concat!(
5135 "Offset of field: ",
5136 stringify!(ft_eeprom_x_series),
5137 "::",
5138 stringify!(InvertRTS)
5139 )
5140 );
5141 assert_eq!(
5142 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).InvertCTS as *const _ as usize },
5143 32usize,
5144 concat!(
5145 "Offset of field: ",
5146 stringify!(ft_eeprom_x_series),
5147 "::",
5148 stringify!(InvertCTS)
5149 )
5150 );
5151 assert_eq!(
5152 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).InvertDTR as *const _ as usize },
5153 33usize,
5154 concat!(
5155 "Offset of field: ",
5156 stringify!(ft_eeprom_x_series),
5157 "::",
5158 stringify!(InvertDTR)
5159 )
5160 );
5161 assert_eq!(
5162 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).InvertDSR as *const _ as usize },
5163 34usize,
5164 concat!(
5165 "Offset of field: ",
5166 stringify!(ft_eeprom_x_series),
5167 "::",
5168 stringify!(InvertDSR)
5169 )
5170 );
5171 assert_eq!(
5172 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).InvertDCD as *const _ as usize },
5173 35usize,
5174 concat!(
5175 "Offset of field: ",
5176 stringify!(ft_eeprom_x_series),
5177 "::",
5178 stringify!(InvertDCD)
5179 )
5180 );
5181 assert_eq!(
5182 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).InvertRI as *const _ as usize },
5183 36usize,
5184 concat!(
5185 "Offset of field: ",
5186 stringify!(ft_eeprom_x_series),
5187 "::",
5188 stringify!(InvertRI)
5189 )
5190 );
5191 assert_eq!(
5192 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).BCDEnable as *const _ as usize },
5193 37usize,
5194 concat!(
5195 "Offset of field: ",
5196 stringify!(ft_eeprom_x_series),
5197 "::",
5198 stringify!(BCDEnable)
5199 )
5200 );
5201 assert_eq!(
5202 unsafe {
5203 &(*(::std::ptr::null::<ft_eeprom_x_series>())).BCDForceCbusPWREN as *const _ as usize
5204 },
5205 38usize,
5206 concat!(
5207 "Offset of field: ",
5208 stringify!(ft_eeprom_x_series),
5209 "::",
5210 stringify!(BCDForceCbusPWREN)
5211 )
5212 );
5213 assert_eq!(
5214 unsafe {
5215 &(*(::std::ptr::null::<ft_eeprom_x_series>())).BCDDisableSleep as *const _ as usize
5216 },
5217 39usize,
5218 concat!(
5219 "Offset of field: ",
5220 stringify!(ft_eeprom_x_series),
5221 "::",
5222 stringify!(BCDDisableSleep)
5223 )
5224 );
5225 assert_eq!(
5226 unsafe {
5227 &(*(::std::ptr::null::<ft_eeprom_x_series>())).I2CSlaveAddress as *const _ as usize
5228 },
5229 40usize,
5230 concat!(
5231 "Offset of field: ",
5232 stringify!(ft_eeprom_x_series),
5233 "::",
5234 stringify!(I2CSlaveAddress)
5235 )
5236 );
5237 assert_eq!(
5238 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).I2CDeviceId as *const _ as usize },
5239 44usize,
5240 concat!(
5241 "Offset of field: ",
5242 stringify!(ft_eeprom_x_series),
5243 "::",
5244 stringify!(I2CDeviceId)
5245 )
5246 );
5247 assert_eq!(
5248 unsafe {
5249 &(*(::std::ptr::null::<ft_eeprom_x_series>())).I2CDisableSchmitt as *const _ as usize
5250 },
5251 48usize,
5252 concat!(
5253 "Offset of field: ",
5254 stringify!(ft_eeprom_x_series),
5255 "::",
5256 stringify!(I2CDisableSchmitt)
5257 )
5258 );
5259 assert_eq!(
5260 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).FT1248Cpol as *const _ as usize },
5261 49usize,
5262 concat!(
5263 "Offset of field: ",
5264 stringify!(ft_eeprom_x_series),
5265 "::",
5266 stringify!(FT1248Cpol)
5267 )
5268 );
5269 assert_eq!(
5270 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).FT1248Lsb as *const _ as usize },
5271 50usize,
5272 concat!(
5273 "Offset of field: ",
5274 stringify!(ft_eeprom_x_series),
5275 "::",
5276 stringify!(FT1248Lsb)
5277 )
5278 );
5279 assert_eq!(
5280 unsafe {
5281 &(*(::std::ptr::null::<ft_eeprom_x_series>())).FT1248FlowControl as *const _ as usize
5282 },
5283 51usize,
5284 concat!(
5285 "Offset of field: ",
5286 stringify!(ft_eeprom_x_series),
5287 "::",
5288 stringify!(FT1248FlowControl)
5289 )
5290 );
5291 assert_eq!(
5292 unsafe {
5293 &(*(::std::ptr::null::<ft_eeprom_x_series>())).RS485EchoSuppress as *const _ as usize
5294 },
5295 52usize,
5296 concat!(
5297 "Offset of field: ",
5298 stringify!(ft_eeprom_x_series),
5299 "::",
5300 stringify!(RS485EchoSuppress)
5301 )
5302 );
5303 assert_eq!(
5304 unsafe {
5305 &(*(::std::ptr::null::<ft_eeprom_x_series>())).PowerSaveEnable as *const _ as usize
5306 },
5307 53usize,
5308 concat!(
5309 "Offset of field: ",
5310 stringify!(ft_eeprom_x_series),
5311 "::",
5312 stringify!(PowerSaveEnable)
5313 )
5314 );
5315 assert_eq!(
5316 unsafe { &(*(::std::ptr::null::<ft_eeprom_x_series>())).DriverType as *const _ as usize },
5317 54usize,
5318 concat!(
5319 "Offset of field: ",
5320 stringify!(ft_eeprom_x_series),
5321 "::",
5322 stringify!(DriverType)
5323 )
5324 );
5325}
5326#[doc = " @noop FT_EEPROM_X_SERIES"]
5327#[doc = " @par Summary"]
5328#[doc = " Structure to hold data for the FT-X series data in the FT_EEPROM_Program and FT_EEPROM_Read functions."]
5329#[doc = " This is appended to an FT_EEPROM_HEADER structure."]
5330#[doc = " @see FT_EEPROM_HEADER"]
5331pub type FT_EEPROM_X_SERIES = ft_eeprom_x_series;
5332#[doc = " @noop FT_EEPROM_4222H"]
5333#[doc = " @par Summary"]
5334#[doc = " Structure to hold data for the FT4222H data in the FT_EEPROM_Program and FT_EEPROM_Read functions."]
5335#[doc = " This is appended to an FT_EEPROM_HEADER structure."]
5336#[doc = " @see FT_EEPROM_HEADER"]
5337#[repr(C)]
5338#[derive(Debug, Copy, Clone)]
5339pub struct ft_eeprom_4222h {
5340 #[doc = " Common header"]
5341 pub common: FT_EEPROM_HEADER,
5342 #[doc = " common elements for all device EEPROMs"]
5343 pub Revision: CHAR,
5344 #[doc = " 'A', 'B', 'C', or 'D'."]
5345 pub I2C_Slave_Address: UCHAR,
5346 #[doc = " Suspend"]
5347 pub SPISuspend: UCHAR,
5348 #[doc = " 0 for \"Disable SPI, tristate pins\", 2 for \"Keep SPI pin status\", 3 for \"Enable SPI pin control\""]
5349 pub SuspendOutPol: UCHAR,
5350 #[doc = " 0 for negative, 1 for positive (not implemented on Rev A)"]
5351 pub EnableSuspendOut: UCHAR,
5352 #[doc = " non-zero to enable (not implemented on Rev A)"]
5353 #[doc = " QSPI"]
5354 pub Clock_SlowSlew: UCHAR,
5355 #[doc = " non-zero if clock pin has slow slew"]
5356 pub Clock_Drive: UCHAR,
5357 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
5358 pub IO0_SlowSlew: UCHAR,
5359 #[doc = " non-zero if IO0 pin has slow slew"]
5360 pub IO1_SlowSlew: UCHAR,
5361 #[doc = " non-zero if IO1 pin has slow slew"]
5362 pub IO2_SlowSlew: UCHAR,
5363 #[doc = " non-zero if IO2 pin has slow slew"]
5364 pub IO3_SlowSlew: UCHAR,
5365 #[doc = " non-zero if IO3 pin has slow slew"]
5366 pub IO_Drive: UCHAR,
5367 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
5368 pub SlaveSelect_PullUp: UCHAR,
5369 #[doc = " non-zero to enable pull up"]
5370 pub SlaveSelect_PullDown: UCHAR,
5371 #[doc = " non-zero to enable pull down"]
5372 pub SlaveSelect_Drive: UCHAR,
5373 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
5374 pub SlaveSelect_SlowSlew: UCHAR,
5375 #[doc = " non-zero if slave select pin has slow slew"]
5376 pub MISO_Suspend: UCHAR,
5377 #[doc = " 2 for push-low, 3 for push high, 0 and 1 reserved"]
5378 pub SIMO_Suspend: UCHAR,
5379 #[doc = " 2 for push-low, 3 for push high, 0 and 1 reserved"]
5380 pub IO2_IO3_Suspend: UCHAR,
5381 #[doc = " 2 for push-low, 3 for push high, 0 and 1 reserved"]
5382 pub SlaveSelect_Suspend: UCHAR,
5383 #[doc = " 0 for no-change (not implemented on Rev A), 2 for push-low, 3 for push high, 1 reserved"]
5384 #[doc = " GPIO"]
5385 pub GPIO0_Drive: UCHAR,
5386 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
5387 pub GPIO1_Drive: UCHAR,
5388 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
5389 pub GPIO2_Drive: UCHAR,
5390 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
5391 pub GPIO3_Drive: UCHAR,
5392 #[doc = " valid values are 4mA, 8mA, 12mA, 16mA"]
5393 pub GPIO0_SlowSlew: UCHAR,
5394 #[doc = " non-zero if IO0 pin has slow slew"]
5395 pub GPIO1_SlowSlew: UCHAR,
5396 #[doc = " non-zero if IO0 pin has slow slew"]
5397 pub GPIO2_SlowSlew: UCHAR,
5398 #[doc = " non-zero if IO0 pin has slow slew"]
5399 pub GPIO3_SlowSlew: UCHAR,
5400 #[doc = " non-zero if IO0 pin has slow slew"]
5401 pub GPIO0_PullDown: UCHAR,
5402 #[doc = " non-zero to enable pull down"]
5403 pub GPIO1_PullDown: UCHAR,
5404 #[doc = " non-zero to enable pull down"]
5405 pub GPIO2_PullDown: UCHAR,
5406 #[doc = " non-zero to enable pull down"]
5407 pub GPIO3_PullDown: UCHAR,
5408 #[doc = " non-zero to enable pull down"]
5409 pub GPIO0_PullUp: UCHAR,
5410 #[doc = " non-zero to enable pull up"]
5411 pub GPIO1_PullUp: UCHAR,
5412 #[doc = " non-zero to enable pull up"]
5413 pub GPIO2_PullUp: UCHAR,
5414 #[doc = " non-zero to enable pull up"]
5415 pub GPIO3_PullUp: UCHAR,
5416 #[doc = " non-zero to enable pull up"]
5417 pub GPIO0_OpenDrain: UCHAR,
5418 #[doc = " non-zero to enable open drain"]
5419 pub GPIO1_OpenDrain: UCHAR,
5420 #[doc = " non-zero to enable open drain"]
5421 pub GPIO2_OpenDrain: UCHAR,
5422 #[doc = " non-zero to enable open drain"]
5423 pub GPIO3_OpenDrain: UCHAR,
5424 #[doc = " non-zero to enable open drain"]
5425 pub GPIO0_Suspend: UCHAR,
5426 #[doc = " 0 for no-change, 1 for input (not implemented on Rev A), 2 for push-low, 3 for push high"]
5427 pub GPIO1_Suspend: UCHAR,
5428 #[doc = " 0 for no-change, 1 for input (not implemented on Rev A), 2 for push-low, 3 for push high"]
5429 pub GPIO2_Suspend: UCHAR,
5430 #[doc = " 0 for no-change, 1 for input (not implemented on Rev A), 2 for push-low, 3 for push high"]
5431 pub GPIO3_Suspend: UCHAR,
5432 #[doc = " 0 for no-change, 1 for input (not implemented on Rev A), 2 for push-low, 3 for push high"]
5433 pub FallingEdge: UCHAR,
5434 #[doc = " non-zero to change GPIO on falling edge"]
5435 #[doc = " BCD"]
5436 pub BCD_Disable: UCHAR,
5437 #[doc = " non-zero to disable BCD"]
5438 pub BCD_OutputActiveLow: UCHAR,
5439 #[doc = " non-zero to set BCD output active low"]
5440 pub BCD_Drive: UCHAR,
5441}
5442#[test]
5443fn bindgen_test_layout_ft_eeprom_4222h() {
5444 assert_eq!(
5445 ::std::mem::size_of::<ft_eeprom_4222h>(),
5446 64usize,
5447 concat!("Size of: ", stringify!(ft_eeprom_4222h))
5448 );
5449 assert_eq!(
5450 ::std::mem::align_of::<ft_eeprom_4222h>(),
5451 4usize,
5452 concat!("Alignment of ", stringify!(ft_eeprom_4222h))
5453 );
5454 assert_eq!(
5455 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).common as *const _ as usize },
5456 0usize,
5457 concat!(
5458 "Offset of field: ",
5459 stringify!(ft_eeprom_4222h),
5460 "::",
5461 stringify!(common)
5462 )
5463 );
5464 assert_eq!(
5465 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).Revision as *const _ as usize },
5466 16usize,
5467 concat!(
5468 "Offset of field: ",
5469 stringify!(ft_eeprom_4222h),
5470 "::",
5471 stringify!(Revision)
5472 )
5473 );
5474 assert_eq!(
5475 unsafe {
5476 &(*(::std::ptr::null::<ft_eeprom_4222h>())).I2C_Slave_Address as *const _ as usize
5477 },
5478 17usize,
5479 concat!(
5480 "Offset of field: ",
5481 stringify!(ft_eeprom_4222h),
5482 "::",
5483 stringify!(I2C_Slave_Address)
5484 )
5485 );
5486 assert_eq!(
5487 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).SPISuspend as *const _ as usize },
5488 18usize,
5489 concat!(
5490 "Offset of field: ",
5491 stringify!(ft_eeprom_4222h),
5492 "::",
5493 stringify!(SPISuspend)
5494 )
5495 );
5496 assert_eq!(
5497 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).SuspendOutPol as *const _ as usize },
5498 19usize,
5499 concat!(
5500 "Offset of field: ",
5501 stringify!(ft_eeprom_4222h),
5502 "::",
5503 stringify!(SuspendOutPol)
5504 )
5505 );
5506 assert_eq!(
5507 unsafe {
5508 &(*(::std::ptr::null::<ft_eeprom_4222h>())).EnableSuspendOut as *const _ as usize
5509 },
5510 20usize,
5511 concat!(
5512 "Offset of field: ",
5513 stringify!(ft_eeprom_4222h),
5514 "::",
5515 stringify!(EnableSuspendOut)
5516 )
5517 );
5518 assert_eq!(
5519 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).Clock_SlowSlew as *const _ as usize },
5520 21usize,
5521 concat!(
5522 "Offset of field: ",
5523 stringify!(ft_eeprom_4222h),
5524 "::",
5525 stringify!(Clock_SlowSlew)
5526 )
5527 );
5528 assert_eq!(
5529 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).Clock_Drive as *const _ as usize },
5530 22usize,
5531 concat!(
5532 "Offset of field: ",
5533 stringify!(ft_eeprom_4222h),
5534 "::",
5535 stringify!(Clock_Drive)
5536 )
5537 );
5538 assert_eq!(
5539 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).IO0_SlowSlew as *const _ as usize },
5540 23usize,
5541 concat!(
5542 "Offset of field: ",
5543 stringify!(ft_eeprom_4222h),
5544 "::",
5545 stringify!(IO0_SlowSlew)
5546 )
5547 );
5548 assert_eq!(
5549 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).IO1_SlowSlew as *const _ as usize },
5550 24usize,
5551 concat!(
5552 "Offset of field: ",
5553 stringify!(ft_eeprom_4222h),
5554 "::",
5555 stringify!(IO1_SlowSlew)
5556 )
5557 );
5558 assert_eq!(
5559 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).IO2_SlowSlew as *const _ as usize },
5560 25usize,
5561 concat!(
5562 "Offset of field: ",
5563 stringify!(ft_eeprom_4222h),
5564 "::",
5565 stringify!(IO2_SlowSlew)
5566 )
5567 );
5568 assert_eq!(
5569 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).IO3_SlowSlew as *const _ as usize },
5570 26usize,
5571 concat!(
5572 "Offset of field: ",
5573 stringify!(ft_eeprom_4222h),
5574 "::",
5575 stringify!(IO3_SlowSlew)
5576 )
5577 );
5578 assert_eq!(
5579 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).IO_Drive as *const _ as usize },
5580 27usize,
5581 concat!(
5582 "Offset of field: ",
5583 stringify!(ft_eeprom_4222h),
5584 "::",
5585 stringify!(IO_Drive)
5586 )
5587 );
5588 assert_eq!(
5589 unsafe {
5590 &(*(::std::ptr::null::<ft_eeprom_4222h>())).SlaveSelect_PullUp as *const _ as usize
5591 },
5592 28usize,
5593 concat!(
5594 "Offset of field: ",
5595 stringify!(ft_eeprom_4222h),
5596 "::",
5597 stringify!(SlaveSelect_PullUp)
5598 )
5599 );
5600 assert_eq!(
5601 unsafe {
5602 &(*(::std::ptr::null::<ft_eeprom_4222h>())).SlaveSelect_PullDown as *const _ as usize
5603 },
5604 29usize,
5605 concat!(
5606 "Offset of field: ",
5607 stringify!(ft_eeprom_4222h),
5608 "::",
5609 stringify!(SlaveSelect_PullDown)
5610 )
5611 );
5612 assert_eq!(
5613 unsafe {
5614 &(*(::std::ptr::null::<ft_eeprom_4222h>())).SlaveSelect_Drive as *const _ as usize
5615 },
5616 30usize,
5617 concat!(
5618 "Offset of field: ",
5619 stringify!(ft_eeprom_4222h),
5620 "::",
5621 stringify!(SlaveSelect_Drive)
5622 )
5623 );
5624 assert_eq!(
5625 unsafe {
5626 &(*(::std::ptr::null::<ft_eeprom_4222h>())).SlaveSelect_SlowSlew as *const _ as usize
5627 },
5628 31usize,
5629 concat!(
5630 "Offset of field: ",
5631 stringify!(ft_eeprom_4222h),
5632 "::",
5633 stringify!(SlaveSelect_SlowSlew)
5634 )
5635 );
5636 assert_eq!(
5637 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).MISO_Suspend as *const _ as usize },
5638 32usize,
5639 concat!(
5640 "Offset of field: ",
5641 stringify!(ft_eeprom_4222h),
5642 "::",
5643 stringify!(MISO_Suspend)
5644 )
5645 );
5646 assert_eq!(
5647 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).SIMO_Suspend as *const _ as usize },
5648 33usize,
5649 concat!(
5650 "Offset of field: ",
5651 stringify!(ft_eeprom_4222h),
5652 "::",
5653 stringify!(SIMO_Suspend)
5654 )
5655 );
5656 assert_eq!(
5657 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).IO2_IO3_Suspend as *const _ as usize },
5658 34usize,
5659 concat!(
5660 "Offset of field: ",
5661 stringify!(ft_eeprom_4222h),
5662 "::",
5663 stringify!(IO2_IO3_Suspend)
5664 )
5665 );
5666 assert_eq!(
5667 unsafe {
5668 &(*(::std::ptr::null::<ft_eeprom_4222h>())).SlaveSelect_Suspend as *const _ as usize
5669 },
5670 35usize,
5671 concat!(
5672 "Offset of field: ",
5673 stringify!(ft_eeprom_4222h),
5674 "::",
5675 stringify!(SlaveSelect_Suspend)
5676 )
5677 );
5678 assert_eq!(
5679 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO0_Drive as *const _ as usize },
5680 36usize,
5681 concat!(
5682 "Offset of field: ",
5683 stringify!(ft_eeprom_4222h),
5684 "::",
5685 stringify!(GPIO0_Drive)
5686 )
5687 );
5688 assert_eq!(
5689 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO1_Drive as *const _ as usize },
5690 37usize,
5691 concat!(
5692 "Offset of field: ",
5693 stringify!(ft_eeprom_4222h),
5694 "::",
5695 stringify!(GPIO1_Drive)
5696 )
5697 );
5698 assert_eq!(
5699 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO2_Drive as *const _ as usize },
5700 38usize,
5701 concat!(
5702 "Offset of field: ",
5703 stringify!(ft_eeprom_4222h),
5704 "::",
5705 stringify!(GPIO2_Drive)
5706 )
5707 );
5708 assert_eq!(
5709 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO3_Drive as *const _ as usize },
5710 39usize,
5711 concat!(
5712 "Offset of field: ",
5713 stringify!(ft_eeprom_4222h),
5714 "::",
5715 stringify!(GPIO3_Drive)
5716 )
5717 );
5718 assert_eq!(
5719 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO0_SlowSlew as *const _ as usize },
5720 40usize,
5721 concat!(
5722 "Offset of field: ",
5723 stringify!(ft_eeprom_4222h),
5724 "::",
5725 stringify!(GPIO0_SlowSlew)
5726 )
5727 );
5728 assert_eq!(
5729 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO1_SlowSlew as *const _ as usize },
5730 41usize,
5731 concat!(
5732 "Offset of field: ",
5733 stringify!(ft_eeprom_4222h),
5734 "::",
5735 stringify!(GPIO1_SlowSlew)
5736 )
5737 );
5738 assert_eq!(
5739 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO2_SlowSlew as *const _ as usize },
5740 42usize,
5741 concat!(
5742 "Offset of field: ",
5743 stringify!(ft_eeprom_4222h),
5744 "::",
5745 stringify!(GPIO2_SlowSlew)
5746 )
5747 );
5748 assert_eq!(
5749 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO3_SlowSlew as *const _ as usize },
5750 43usize,
5751 concat!(
5752 "Offset of field: ",
5753 stringify!(ft_eeprom_4222h),
5754 "::",
5755 stringify!(GPIO3_SlowSlew)
5756 )
5757 );
5758 assert_eq!(
5759 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO0_PullDown as *const _ as usize },
5760 44usize,
5761 concat!(
5762 "Offset of field: ",
5763 stringify!(ft_eeprom_4222h),
5764 "::",
5765 stringify!(GPIO0_PullDown)
5766 )
5767 );
5768 assert_eq!(
5769 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO1_PullDown as *const _ as usize },
5770 45usize,
5771 concat!(
5772 "Offset of field: ",
5773 stringify!(ft_eeprom_4222h),
5774 "::",
5775 stringify!(GPIO1_PullDown)
5776 )
5777 );
5778 assert_eq!(
5779 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO2_PullDown as *const _ as usize },
5780 46usize,
5781 concat!(
5782 "Offset of field: ",
5783 stringify!(ft_eeprom_4222h),
5784 "::",
5785 stringify!(GPIO2_PullDown)
5786 )
5787 );
5788 assert_eq!(
5789 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO3_PullDown as *const _ as usize },
5790 47usize,
5791 concat!(
5792 "Offset of field: ",
5793 stringify!(ft_eeprom_4222h),
5794 "::",
5795 stringify!(GPIO3_PullDown)
5796 )
5797 );
5798 assert_eq!(
5799 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO0_PullUp as *const _ as usize },
5800 48usize,
5801 concat!(
5802 "Offset of field: ",
5803 stringify!(ft_eeprom_4222h),
5804 "::",
5805 stringify!(GPIO0_PullUp)
5806 )
5807 );
5808 assert_eq!(
5809 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO1_PullUp as *const _ as usize },
5810 49usize,
5811 concat!(
5812 "Offset of field: ",
5813 stringify!(ft_eeprom_4222h),
5814 "::",
5815 stringify!(GPIO1_PullUp)
5816 )
5817 );
5818 assert_eq!(
5819 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO2_PullUp as *const _ as usize },
5820 50usize,
5821 concat!(
5822 "Offset of field: ",
5823 stringify!(ft_eeprom_4222h),
5824 "::",
5825 stringify!(GPIO2_PullUp)
5826 )
5827 );
5828 assert_eq!(
5829 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO3_PullUp as *const _ as usize },
5830 51usize,
5831 concat!(
5832 "Offset of field: ",
5833 stringify!(ft_eeprom_4222h),
5834 "::",
5835 stringify!(GPIO3_PullUp)
5836 )
5837 );
5838 assert_eq!(
5839 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO0_OpenDrain as *const _ as usize },
5840 52usize,
5841 concat!(
5842 "Offset of field: ",
5843 stringify!(ft_eeprom_4222h),
5844 "::",
5845 stringify!(GPIO0_OpenDrain)
5846 )
5847 );
5848 assert_eq!(
5849 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO1_OpenDrain as *const _ as usize },
5850 53usize,
5851 concat!(
5852 "Offset of field: ",
5853 stringify!(ft_eeprom_4222h),
5854 "::",
5855 stringify!(GPIO1_OpenDrain)
5856 )
5857 );
5858 assert_eq!(
5859 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO2_OpenDrain as *const _ as usize },
5860 54usize,
5861 concat!(
5862 "Offset of field: ",
5863 stringify!(ft_eeprom_4222h),
5864 "::",
5865 stringify!(GPIO2_OpenDrain)
5866 )
5867 );
5868 assert_eq!(
5869 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO3_OpenDrain as *const _ as usize },
5870 55usize,
5871 concat!(
5872 "Offset of field: ",
5873 stringify!(ft_eeprom_4222h),
5874 "::",
5875 stringify!(GPIO3_OpenDrain)
5876 )
5877 );
5878 assert_eq!(
5879 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO0_Suspend as *const _ as usize },
5880 56usize,
5881 concat!(
5882 "Offset of field: ",
5883 stringify!(ft_eeprom_4222h),
5884 "::",
5885 stringify!(GPIO0_Suspend)
5886 )
5887 );
5888 assert_eq!(
5889 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO1_Suspend as *const _ as usize },
5890 57usize,
5891 concat!(
5892 "Offset of field: ",
5893 stringify!(ft_eeprom_4222h),
5894 "::",
5895 stringify!(GPIO1_Suspend)
5896 )
5897 );
5898 assert_eq!(
5899 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO2_Suspend as *const _ as usize },
5900 58usize,
5901 concat!(
5902 "Offset of field: ",
5903 stringify!(ft_eeprom_4222h),
5904 "::",
5905 stringify!(GPIO2_Suspend)
5906 )
5907 );
5908 assert_eq!(
5909 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).GPIO3_Suspend as *const _ as usize },
5910 59usize,
5911 concat!(
5912 "Offset of field: ",
5913 stringify!(ft_eeprom_4222h),
5914 "::",
5915 stringify!(GPIO3_Suspend)
5916 )
5917 );
5918 assert_eq!(
5919 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).FallingEdge as *const _ as usize },
5920 60usize,
5921 concat!(
5922 "Offset of field: ",
5923 stringify!(ft_eeprom_4222h),
5924 "::",
5925 stringify!(FallingEdge)
5926 )
5927 );
5928 assert_eq!(
5929 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).BCD_Disable as *const _ as usize },
5930 61usize,
5931 concat!(
5932 "Offset of field: ",
5933 stringify!(ft_eeprom_4222h),
5934 "::",
5935 stringify!(BCD_Disable)
5936 )
5937 );
5938 assert_eq!(
5939 unsafe {
5940 &(*(::std::ptr::null::<ft_eeprom_4222h>())).BCD_OutputActiveLow as *const _ as usize
5941 },
5942 62usize,
5943 concat!(
5944 "Offset of field: ",
5945 stringify!(ft_eeprom_4222h),
5946 "::",
5947 stringify!(BCD_OutputActiveLow)
5948 )
5949 );
5950 assert_eq!(
5951 unsafe { &(*(::std::ptr::null::<ft_eeprom_4222h>())).BCD_Drive as *const _ as usize },
5952 63usize,
5953 concat!(
5954 "Offset of field: ",
5955 stringify!(ft_eeprom_4222h),
5956 "::",
5957 stringify!(BCD_Drive)
5958 )
5959 );
5960}
5961#[doc = " @noop FT_EEPROM_4222H"]
5962#[doc = " @par Summary"]
5963#[doc = " Structure to hold data for the FT4222H data in the FT_EEPROM_Program and FT_EEPROM_Read functions."]
5964#[doc = " This is appended to an FT_EEPROM_HEADER structure."]
5965#[doc = " @see FT_EEPROM_HEADER"]
5966pub type FT_EEPROM_4222H = ft_eeprom_4222h;
5967#[doc = " @noop FT_EEPROM_PD_PDO_mv_ma"]
5968#[doc = " @par Summary"]
5969#[doc = " Structure to hold PDO Configuration structure, mA supported values 0 to 10230mA, mV supported"]
5970#[doc = " values 0 to 51100mV. This is part of the FT_EEPROM_PD structure."]
5971#[doc = " @see FT_EEPROM_PD"]
5972#[repr(C)]
5973#[derive(Debug, Copy, Clone)]
5974pub struct ft_eeprom_PD_PDO_mv_ma {
5975 pub PDO1ma: USHORT,
5976 #[doc = " PDO1 mA"]
5977 pub PDO1mv: USHORT,
5978 #[doc = " PDO1 mV"]
5979 pub PDO2ma: USHORT,
5980 #[doc = " PDO2 mA"]
5981 pub PDO2mv: USHORT,
5982 #[doc = " PDO2 mV"]
5983 pub PDO3ma: USHORT,
5984 #[doc = " PDO3 mA"]
5985 pub PDO3mv: USHORT,
5986 #[doc = " PDO3 mV"]
5987 pub PDO4ma: USHORT,
5988 #[doc = " PDO4 mA"]
5989 pub PDO4mv: USHORT,
5990 #[doc = " PDO4 mV"]
5991 pub PDO5ma: USHORT,
5992 #[doc = " PDO5 mA (FTx233HP only)"]
5993 pub PDO5mv: USHORT,
5994 #[doc = " PDO5 mV (FTx233HP only)"]
5995 pub PDO6ma: USHORT,
5996 #[doc = " PDO6 mA (FTx233HP only)"]
5997 pub PDO6mv: USHORT,
5998 #[doc = " PDO6 mV (FTx233HP only)"]
5999 pub PDO7ma: USHORT,
6000 #[doc = " PDO7 mA (FTx233HP only)"]
6001 pub PDO7mv: USHORT,
6002}
6003#[test]
6004fn bindgen_test_layout_ft_eeprom_PD_PDO_mv_ma() {
6005 assert_eq!(
6006 ::std::mem::size_of::<ft_eeprom_PD_PDO_mv_ma>(),
6007 28usize,
6008 concat!("Size of: ", stringify!(ft_eeprom_PD_PDO_mv_ma))
6009 );
6010 assert_eq!(
6011 ::std::mem::align_of::<ft_eeprom_PD_PDO_mv_ma>(),
6012 2usize,
6013 concat!("Alignment of ", stringify!(ft_eeprom_PD_PDO_mv_ma))
6014 );
6015 assert_eq!(
6016 unsafe { &(*(::std::ptr::null::<ft_eeprom_PD_PDO_mv_ma>())).PDO1ma as *const _ as usize },
6017 0usize,
6018 concat!(
6019 "Offset of field: ",
6020 stringify!(ft_eeprom_PD_PDO_mv_ma),
6021 "::",
6022 stringify!(PDO1ma)
6023 )
6024 );
6025 assert_eq!(
6026 unsafe { &(*(::std::ptr::null::<ft_eeprom_PD_PDO_mv_ma>())).PDO1mv as *const _ as usize },
6027 2usize,
6028 concat!(
6029 "Offset of field: ",
6030 stringify!(ft_eeprom_PD_PDO_mv_ma),
6031 "::",
6032 stringify!(PDO1mv)
6033 )
6034 );
6035 assert_eq!(
6036 unsafe { &(*(::std::ptr::null::<ft_eeprom_PD_PDO_mv_ma>())).PDO2ma as *const _ as usize },
6037 4usize,
6038 concat!(
6039 "Offset of field: ",
6040 stringify!(ft_eeprom_PD_PDO_mv_ma),
6041 "::",
6042 stringify!(PDO2ma)
6043 )
6044 );
6045 assert_eq!(
6046 unsafe { &(*(::std::ptr::null::<ft_eeprom_PD_PDO_mv_ma>())).PDO2mv as *const _ as usize },
6047 6usize,
6048 concat!(
6049 "Offset of field: ",
6050 stringify!(ft_eeprom_PD_PDO_mv_ma),
6051 "::",
6052 stringify!(PDO2mv)
6053 )
6054 );
6055 assert_eq!(
6056 unsafe { &(*(::std::ptr::null::<ft_eeprom_PD_PDO_mv_ma>())).PDO3ma as *const _ as usize },
6057 8usize,
6058 concat!(
6059 "Offset of field: ",
6060 stringify!(ft_eeprom_PD_PDO_mv_ma),
6061 "::",
6062 stringify!(PDO3ma)
6063 )
6064 );
6065 assert_eq!(
6066 unsafe { &(*(::std::ptr::null::<ft_eeprom_PD_PDO_mv_ma>())).PDO3mv as *const _ as usize },
6067 10usize,
6068 concat!(
6069 "Offset of field: ",
6070 stringify!(ft_eeprom_PD_PDO_mv_ma),
6071 "::",
6072 stringify!(PDO3mv)
6073 )
6074 );
6075 assert_eq!(
6076 unsafe { &(*(::std::ptr::null::<ft_eeprom_PD_PDO_mv_ma>())).PDO4ma as *const _ as usize },
6077 12usize,
6078 concat!(
6079 "Offset of field: ",
6080 stringify!(ft_eeprom_PD_PDO_mv_ma),
6081 "::",
6082 stringify!(PDO4ma)
6083 )
6084 );
6085 assert_eq!(
6086 unsafe { &(*(::std::ptr::null::<ft_eeprom_PD_PDO_mv_ma>())).PDO4mv as *const _ as usize },
6087 14usize,
6088 concat!(
6089 "Offset of field: ",
6090 stringify!(ft_eeprom_PD_PDO_mv_ma),
6091 "::",
6092 stringify!(PDO4mv)
6093 )
6094 );
6095 assert_eq!(
6096 unsafe { &(*(::std::ptr::null::<ft_eeprom_PD_PDO_mv_ma>())).PDO5ma as *const _ as usize },
6097 16usize,
6098 concat!(
6099 "Offset of field: ",
6100 stringify!(ft_eeprom_PD_PDO_mv_ma),
6101 "::",
6102 stringify!(PDO5ma)
6103 )
6104 );
6105 assert_eq!(
6106 unsafe { &(*(::std::ptr::null::<ft_eeprom_PD_PDO_mv_ma>())).PDO5mv as *const _ as usize },
6107 18usize,
6108 concat!(
6109 "Offset of field: ",
6110 stringify!(ft_eeprom_PD_PDO_mv_ma),
6111 "::",
6112 stringify!(PDO5mv)
6113 )
6114 );
6115 assert_eq!(
6116 unsafe { &(*(::std::ptr::null::<ft_eeprom_PD_PDO_mv_ma>())).PDO6ma as *const _ as usize },
6117 20usize,
6118 concat!(
6119 "Offset of field: ",
6120 stringify!(ft_eeprom_PD_PDO_mv_ma),
6121 "::",
6122 stringify!(PDO6ma)
6123 )
6124 );
6125 assert_eq!(
6126 unsafe { &(*(::std::ptr::null::<ft_eeprom_PD_PDO_mv_ma>())).PDO6mv as *const _ as usize },
6127 22usize,
6128 concat!(
6129 "Offset of field: ",
6130 stringify!(ft_eeprom_PD_PDO_mv_ma),
6131 "::",
6132 stringify!(PDO6mv)
6133 )
6134 );
6135 assert_eq!(
6136 unsafe { &(*(::std::ptr::null::<ft_eeprom_PD_PDO_mv_ma>())).PDO7ma as *const _ as usize },
6137 24usize,
6138 concat!(
6139 "Offset of field: ",
6140 stringify!(ft_eeprom_PD_PDO_mv_ma),
6141 "::",
6142 stringify!(PDO7ma)
6143 )
6144 );
6145 assert_eq!(
6146 unsafe { &(*(::std::ptr::null::<ft_eeprom_PD_PDO_mv_ma>())).PDO7mv as *const _ as usize },
6147 26usize,
6148 concat!(
6149 "Offset of field: ",
6150 stringify!(ft_eeprom_PD_PDO_mv_ma),
6151 "::",
6152 stringify!(PDO7mv)
6153 )
6154 );
6155}
6156#[doc = " @noop FT_EEPROM_PD_PDO_mv_ma"]
6157#[doc = " @par Summary"]
6158#[doc = " Structure to hold PDO Configuration structure, mA supported values 0 to 10230mA, mV supported"]
6159#[doc = " values 0 to 51100mV. This is part of the FT_EEPROM_PD structure."]
6160#[doc = " @see FT_EEPROM_PD"]
6161pub type FT_EEPROM_PD_PDO_mv_ma = ft_eeprom_PD_PDO_mv_ma;
6162#[doc = " @noop FT_EEPROM_PD"]
6163#[doc = " @par Summary"]
6164#[doc = " Structure to hold power delivery configuration data for the FT4233PD, FT2233PD, FT4232PD,"]
6165#[doc = " FT2232PD, FT233PD and FT232PD in the FT_EEPROM_Program and FT_EEPROM_Read functions."]
6166#[doc = " This is appended to an FT_EEPROM_HEADER and a base device structure."]
6167#[doc = " e_g. @verbatim"]
6168#[doc = "\t\tstruct {"]
6169#[doc = "\t\t\tFT_EEPROM_xxx base;"]
6170#[doc = "\t\t\tFT_EEPROM_PD pd;"]
6171#[doc = "\t\t};"]
6172#[doc = " @endverbatim"]
6173#[doc = " @remarks"]
6174#[doc = " Device GPIO values are:"]
6175#[doc = " @li\tFTx233HP - 0 to 7, 15 for N/A"]
6176#[doc = " @li FTx232HP - 0 to 3, 15 for N/A"]
6177#[doc = " @see FT_EEPROM_HEADER"]
6178#[doc = " @see FT_EEPROM_PD_PDO_mv_ma"]
6179#[repr(C)]
6180#[derive(Debug, Copy, Clone)]
6181pub struct ft_eeprom_pd {
6182 #[doc = " Configuration"]
6183 pub srprs: UCHAR,
6184 #[doc = " non-zero to enable Sink Request Power Role Swap"]
6185 pub sraprs: UCHAR,
6186 #[doc = " non-zero to enable Sink Accept PR Swap"]
6187 pub srrprs: UCHAR,
6188 #[doc = " non-zero to enable Source Request PR SWAP"]
6189 pub saprs: UCHAR,
6190 #[doc = " non-zero to enable Source Accept PR SWAP"]
6191 pub vconns: UCHAR,
6192 #[doc = " non-zero to enable vConn Swap"]
6193 pub passthru: UCHAR,
6194 #[doc = " non-zero to enable Pass Through (FTx233HP only)"]
6195 pub extmcu: UCHAR,
6196 #[doc = " non-zero to enable External MCU"]
6197 pub pd2en: UCHAR,
6198 #[doc = " non-zero to enable PD2 (FTx233HP only)"]
6199 pub pd1autoclk: UCHAR,
6200 #[doc = " non-zero to enable PD1 Auto Clock"]
6201 pub pd2autoclk: UCHAR,
6202 #[doc = " non-zero to enable PD2 Auto Clock (FTx233HP only)"]
6203 pub useefuse: UCHAR,
6204 #[doc = " non-zero to Use EFUSE"]
6205 pub extvconn: UCHAR,
6206 #[doc = " GPIO Configuration"]
6207 pub count: UCHAR,
6208 #[doc = " GPIO Count, supported values are 0 to 7"]
6209 pub gpio1: UCHAR,
6210 #[doc = " GPIO Number 1, supports device GPIO values"]
6211 pub gpio2: UCHAR,
6212 #[doc = " GPIO Number 2, supports device GPIO values"]
6213 pub gpio3: UCHAR,
6214 #[doc = " GPIO Number 3, supports device GPIO values"]
6215 pub gpio4: UCHAR,
6216 #[doc = " GPIO Number 4, supports device GPIO values"]
6217 pub gpio5: UCHAR,
6218 #[doc = " GPIO Number 5, supports device GPIO values (FTx233HP only)"]
6219 pub gpio6: UCHAR,
6220 #[doc = " GPIO Number 6, supports device GPIO values (FTx233HP only)"]
6221 pub gpio7: UCHAR,
6222 #[doc = " GPIO Number 7, supports device GPIO values (FTx233HP only)"]
6223 pub pd1lden: UCHAR,
6224 #[doc = " PD1 Load Enable, supports device GPIO values"]
6225 pub pd2lden: UCHAR,
6226 #[doc = " PD2 Load Enable, supports device GPIO values (FTx233HP only)"]
6227 pub dispin: UCHAR,
6228 #[doc = " Discharge Pin, supports device GPIO values"]
6229 pub disenbm: UCHAR,
6230 #[doc = " Discharge Enable BM, 0 for \"Drive Hi\", 1 for \"Drive Low\", 2 for \"Input Mode\", 3 for \"Don't Care\""]
6231 pub disdisbm: UCHAR,
6232 #[doc = " Discharge Disable BM, 0 for \"Drive Hi\", 1 for \"Drive Low\", 2 for \"Input Mode\", 3 for \"Don't Care\""]
6233 pub ccselect: UCHAR,
6234 #[doc = " ISET Configuration"]
6235 pub iset1: UCHAR,
6236 #[doc = " ISET1, supports device GPIO values"]
6237 pub iset2: UCHAR,
6238 #[doc = " ISET2, supports device GPIO values"]
6239 pub iset3: UCHAR,
6240 #[doc = " ISET3, supports device GPIO values"]
6241 pub extiset: UCHAR,
6242 #[doc = " non-zero to enable EXTEND_ISET"]
6243 pub isetpd2: UCHAR,
6244 #[doc = " non-zero to enable ISET_PD2"]
6245 pub iseten: UCHAR,
6246 #[doc = " BM Configuration, 0 for \"Drive Hi\", 1 for \"Drive Low\", 2 for \"Input Mode\", 3 for \"Don't Care\""]
6247 pub PDO1_GPIO: [UCHAR; 7usize],
6248 #[doc = " PDO1 GPIO1 to GPIO7"]
6249 pub PDO2_GPIO: [UCHAR; 7usize],
6250 #[doc = " PDO2 GPIO1 to GPIO7"]
6251 pub PDO3_GPIO: [UCHAR; 7usize],
6252 #[doc = " PDO3 GPIO1 to GPIO7"]
6253 pub PDO4_GPIO: [UCHAR; 7usize],
6254 #[doc = " PDO4 GPIO1 to GPIO7"]
6255 pub PDO5_GPIO: [UCHAR; 7usize],
6256 #[doc = " PDO5 GPIO1 to GPIO7 (FTx233HP only)"]
6257 pub PDO6_GPIO: [UCHAR; 7usize],
6258 #[doc = " PDO6 GPIO1 to GPIO7 (FTx233HP only)"]
6259 pub PDO7_GPIO: [UCHAR; 7usize],
6260 #[doc = " PDO7 GPIO1 to GPIO7 (FTx233HP only)"]
6261 pub VSET0V_GPIO: [UCHAR; 7usize],
6262 #[doc = " PDO7 GPIO1 to GPIO7"]
6263 pub VSAFE5V_GPIO: [UCHAR; 7usize],
6264 #[doc = " PDO7 GPIO1 to GPIO7"]
6265 pub BM_PDO_Sink: FT_EEPROM_PD_PDO_mv_ma,
6266 pub BM_PDO_Source: FT_EEPROM_PD_PDO_mv_ma,
6267 pub BM_PDO_Sink_2: FT_EEPROM_PD_PDO_mv_ma,
6268 #[doc = " PD Timers"]
6269 pub srt: UCHAR,
6270 #[doc = " Sender Response Timer"]
6271 pub hrt: UCHAR,
6272 #[doc = " Hard Reset Timer"]
6273 pub sct: UCHAR,
6274 #[doc = " Source Capability Timer"]
6275 pub dit: UCHAR,
6276 #[doc = " Discover Identity Timer"]
6277 pub srcrt: USHORT,
6278 #[doc = " Source Recover Timer"]
6279 pub trt: USHORT,
6280 #[doc = " Transition Timer"]
6281 pub sofft: USHORT,
6282 #[doc = " Source off timer"]
6283 pub nrt: USHORT,
6284 #[doc = " No Response Timer"]
6285 pub swct: USHORT,
6286 #[doc = " Sink Wait Capability Timer"]
6287 pub snkrt: USHORT,
6288 #[doc = " Sink Request Timer"]
6289 pub dt: UCHAR,
6290 #[doc = " Discharge Timer"]
6291 pub cnst: UCHAR,
6292 #[doc = " Chunk not supported timer"]
6293 pub it: USHORT,
6294 #[doc = " PD Control"]
6295 pub i2caddr: UCHAR,
6296 #[doc = " I2C Address (hex)"]
6297 pub prou: UINT,
6298 #[doc = " Power Reserved for OWN use"]
6299 pub trim1: UINT,
6300 #[doc = " TRIM1"]
6301 pub trim2: UINT,
6302 #[doc = " TRIM2"]
6303 pub extdc: UCHAR,
6304}
6305#[test]
6306fn bindgen_test_layout_ft_eeprom_pd() {
6307 assert_eq!(
6308 ::std::mem::size_of::<ft_eeprom_pd>(),
6309 220usize,
6310 concat!("Size of: ", stringify!(ft_eeprom_pd))
6311 );
6312 assert_eq!(
6313 ::std::mem::align_of::<ft_eeprom_pd>(),
6314 4usize,
6315 concat!("Alignment of ", stringify!(ft_eeprom_pd))
6316 );
6317 assert_eq!(
6318 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).srprs as *const _ as usize },
6319 0usize,
6320 concat!(
6321 "Offset of field: ",
6322 stringify!(ft_eeprom_pd),
6323 "::",
6324 stringify!(srprs)
6325 )
6326 );
6327 assert_eq!(
6328 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).sraprs as *const _ as usize },
6329 1usize,
6330 concat!(
6331 "Offset of field: ",
6332 stringify!(ft_eeprom_pd),
6333 "::",
6334 stringify!(sraprs)
6335 )
6336 );
6337 assert_eq!(
6338 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).srrprs as *const _ as usize },
6339 2usize,
6340 concat!(
6341 "Offset of field: ",
6342 stringify!(ft_eeprom_pd),
6343 "::",
6344 stringify!(srrprs)
6345 )
6346 );
6347 assert_eq!(
6348 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).saprs as *const _ as usize },
6349 3usize,
6350 concat!(
6351 "Offset of field: ",
6352 stringify!(ft_eeprom_pd),
6353 "::",
6354 stringify!(saprs)
6355 )
6356 );
6357 assert_eq!(
6358 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).vconns as *const _ as usize },
6359 4usize,
6360 concat!(
6361 "Offset of field: ",
6362 stringify!(ft_eeprom_pd),
6363 "::",
6364 stringify!(vconns)
6365 )
6366 );
6367 assert_eq!(
6368 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).passthru as *const _ as usize },
6369 5usize,
6370 concat!(
6371 "Offset of field: ",
6372 stringify!(ft_eeprom_pd),
6373 "::",
6374 stringify!(passthru)
6375 )
6376 );
6377 assert_eq!(
6378 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).extmcu as *const _ as usize },
6379 6usize,
6380 concat!(
6381 "Offset of field: ",
6382 stringify!(ft_eeprom_pd),
6383 "::",
6384 stringify!(extmcu)
6385 )
6386 );
6387 assert_eq!(
6388 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).pd2en as *const _ as usize },
6389 7usize,
6390 concat!(
6391 "Offset of field: ",
6392 stringify!(ft_eeprom_pd),
6393 "::",
6394 stringify!(pd2en)
6395 )
6396 );
6397 assert_eq!(
6398 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).pd1autoclk as *const _ as usize },
6399 8usize,
6400 concat!(
6401 "Offset of field: ",
6402 stringify!(ft_eeprom_pd),
6403 "::",
6404 stringify!(pd1autoclk)
6405 )
6406 );
6407 assert_eq!(
6408 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).pd2autoclk as *const _ as usize },
6409 9usize,
6410 concat!(
6411 "Offset of field: ",
6412 stringify!(ft_eeprom_pd),
6413 "::",
6414 stringify!(pd2autoclk)
6415 )
6416 );
6417 assert_eq!(
6418 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).useefuse as *const _ as usize },
6419 10usize,
6420 concat!(
6421 "Offset of field: ",
6422 stringify!(ft_eeprom_pd),
6423 "::",
6424 stringify!(useefuse)
6425 )
6426 );
6427 assert_eq!(
6428 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).extvconn as *const _ as usize },
6429 11usize,
6430 concat!(
6431 "Offset of field: ",
6432 stringify!(ft_eeprom_pd),
6433 "::",
6434 stringify!(extvconn)
6435 )
6436 );
6437 assert_eq!(
6438 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).count as *const _ as usize },
6439 12usize,
6440 concat!(
6441 "Offset of field: ",
6442 stringify!(ft_eeprom_pd),
6443 "::",
6444 stringify!(count)
6445 )
6446 );
6447 assert_eq!(
6448 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).gpio1 as *const _ as usize },
6449 13usize,
6450 concat!(
6451 "Offset of field: ",
6452 stringify!(ft_eeprom_pd),
6453 "::",
6454 stringify!(gpio1)
6455 )
6456 );
6457 assert_eq!(
6458 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).gpio2 as *const _ as usize },
6459 14usize,
6460 concat!(
6461 "Offset of field: ",
6462 stringify!(ft_eeprom_pd),
6463 "::",
6464 stringify!(gpio2)
6465 )
6466 );
6467 assert_eq!(
6468 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).gpio3 as *const _ as usize },
6469 15usize,
6470 concat!(
6471 "Offset of field: ",
6472 stringify!(ft_eeprom_pd),
6473 "::",
6474 stringify!(gpio3)
6475 )
6476 );
6477 assert_eq!(
6478 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).gpio4 as *const _ as usize },
6479 16usize,
6480 concat!(
6481 "Offset of field: ",
6482 stringify!(ft_eeprom_pd),
6483 "::",
6484 stringify!(gpio4)
6485 )
6486 );
6487 assert_eq!(
6488 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).gpio5 as *const _ as usize },
6489 17usize,
6490 concat!(
6491 "Offset of field: ",
6492 stringify!(ft_eeprom_pd),
6493 "::",
6494 stringify!(gpio5)
6495 )
6496 );
6497 assert_eq!(
6498 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).gpio6 as *const _ as usize },
6499 18usize,
6500 concat!(
6501 "Offset of field: ",
6502 stringify!(ft_eeprom_pd),
6503 "::",
6504 stringify!(gpio6)
6505 )
6506 );
6507 assert_eq!(
6508 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).gpio7 as *const _ as usize },
6509 19usize,
6510 concat!(
6511 "Offset of field: ",
6512 stringify!(ft_eeprom_pd),
6513 "::",
6514 stringify!(gpio7)
6515 )
6516 );
6517 assert_eq!(
6518 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).pd1lden as *const _ as usize },
6519 20usize,
6520 concat!(
6521 "Offset of field: ",
6522 stringify!(ft_eeprom_pd),
6523 "::",
6524 stringify!(pd1lden)
6525 )
6526 );
6527 assert_eq!(
6528 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).pd2lden as *const _ as usize },
6529 21usize,
6530 concat!(
6531 "Offset of field: ",
6532 stringify!(ft_eeprom_pd),
6533 "::",
6534 stringify!(pd2lden)
6535 )
6536 );
6537 assert_eq!(
6538 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).dispin as *const _ as usize },
6539 22usize,
6540 concat!(
6541 "Offset of field: ",
6542 stringify!(ft_eeprom_pd),
6543 "::",
6544 stringify!(dispin)
6545 )
6546 );
6547 assert_eq!(
6548 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).disenbm as *const _ as usize },
6549 23usize,
6550 concat!(
6551 "Offset of field: ",
6552 stringify!(ft_eeprom_pd),
6553 "::",
6554 stringify!(disenbm)
6555 )
6556 );
6557 assert_eq!(
6558 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).disdisbm as *const _ as usize },
6559 24usize,
6560 concat!(
6561 "Offset of field: ",
6562 stringify!(ft_eeprom_pd),
6563 "::",
6564 stringify!(disdisbm)
6565 )
6566 );
6567 assert_eq!(
6568 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).ccselect as *const _ as usize },
6569 25usize,
6570 concat!(
6571 "Offset of field: ",
6572 stringify!(ft_eeprom_pd),
6573 "::",
6574 stringify!(ccselect)
6575 )
6576 );
6577 assert_eq!(
6578 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).iset1 as *const _ as usize },
6579 26usize,
6580 concat!(
6581 "Offset of field: ",
6582 stringify!(ft_eeprom_pd),
6583 "::",
6584 stringify!(iset1)
6585 )
6586 );
6587 assert_eq!(
6588 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).iset2 as *const _ as usize },
6589 27usize,
6590 concat!(
6591 "Offset of field: ",
6592 stringify!(ft_eeprom_pd),
6593 "::",
6594 stringify!(iset2)
6595 )
6596 );
6597 assert_eq!(
6598 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).iset3 as *const _ as usize },
6599 28usize,
6600 concat!(
6601 "Offset of field: ",
6602 stringify!(ft_eeprom_pd),
6603 "::",
6604 stringify!(iset3)
6605 )
6606 );
6607 assert_eq!(
6608 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).extiset as *const _ as usize },
6609 29usize,
6610 concat!(
6611 "Offset of field: ",
6612 stringify!(ft_eeprom_pd),
6613 "::",
6614 stringify!(extiset)
6615 )
6616 );
6617 assert_eq!(
6618 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).isetpd2 as *const _ as usize },
6619 30usize,
6620 concat!(
6621 "Offset of field: ",
6622 stringify!(ft_eeprom_pd),
6623 "::",
6624 stringify!(isetpd2)
6625 )
6626 );
6627 assert_eq!(
6628 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).iseten as *const _ as usize },
6629 31usize,
6630 concat!(
6631 "Offset of field: ",
6632 stringify!(ft_eeprom_pd),
6633 "::",
6634 stringify!(iseten)
6635 )
6636 );
6637 assert_eq!(
6638 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).PDO1_GPIO as *const _ as usize },
6639 32usize,
6640 concat!(
6641 "Offset of field: ",
6642 stringify!(ft_eeprom_pd),
6643 "::",
6644 stringify!(PDO1_GPIO)
6645 )
6646 );
6647 assert_eq!(
6648 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).PDO2_GPIO as *const _ as usize },
6649 39usize,
6650 concat!(
6651 "Offset of field: ",
6652 stringify!(ft_eeprom_pd),
6653 "::",
6654 stringify!(PDO2_GPIO)
6655 )
6656 );
6657 assert_eq!(
6658 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).PDO3_GPIO as *const _ as usize },
6659 46usize,
6660 concat!(
6661 "Offset of field: ",
6662 stringify!(ft_eeprom_pd),
6663 "::",
6664 stringify!(PDO3_GPIO)
6665 )
6666 );
6667 assert_eq!(
6668 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).PDO4_GPIO as *const _ as usize },
6669 53usize,
6670 concat!(
6671 "Offset of field: ",
6672 stringify!(ft_eeprom_pd),
6673 "::",
6674 stringify!(PDO4_GPIO)
6675 )
6676 );
6677 assert_eq!(
6678 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).PDO5_GPIO as *const _ as usize },
6679 60usize,
6680 concat!(
6681 "Offset of field: ",
6682 stringify!(ft_eeprom_pd),
6683 "::",
6684 stringify!(PDO5_GPIO)
6685 )
6686 );
6687 assert_eq!(
6688 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).PDO6_GPIO as *const _ as usize },
6689 67usize,
6690 concat!(
6691 "Offset of field: ",
6692 stringify!(ft_eeprom_pd),
6693 "::",
6694 stringify!(PDO6_GPIO)
6695 )
6696 );
6697 assert_eq!(
6698 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).PDO7_GPIO as *const _ as usize },
6699 74usize,
6700 concat!(
6701 "Offset of field: ",
6702 stringify!(ft_eeprom_pd),
6703 "::",
6704 stringify!(PDO7_GPIO)
6705 )
6706 );
6707 assert_eq!(
6708 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).VSET0V_GPIO as *const _ as usize },
6709 81usize,
6710 concat!(
6711 "Offset of field: ",
6712 stringify!(ft_eeprom_pd),
6713 "::",
6714 stringify!(VSET0V_GPIO)
6715 )
6716 );
6717 assert_eq!(
6718 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).VSAFE5V_GPIO as *const _ as usize },
6719 88usize,
6720 concat!(
6721 "Offset of field: ",
6722 stringify!(ft_eeprom_pd),
6723 "::",
6724 stringify!(VSAFE5V_GPIO)
6725 )
6726 );
6727 assert_eq!(
6728 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).BM_PDO_Sink as *const _ as usize },
6729 96usize,
6730 concat!(
6731 "Offset of field: ",
6732 stringify!(ft_eeprom_pd),
6733 "::",
6734 stringify!(BM_PDO_Sink)
6735 )
6736 );
6737 assert_eq!(
6738 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).BM_PDO_Source as *const _ as usize },
6739 124usize,
6740 concat!(
6741 "Offset of field: ",
6742 stringify!(ft_eeprom_pd),
6743 "::",
6744 stringify!(BM_PDO_Source)
6745 )
6746 );
6747 assert_eq!(
6748 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).BM_PDO_Sink_2 as *const _ as usize },
6749 152usize,
6750 concat!(
6751 "Offset of field: ",
6752 stringify!(ft_eeprom_pd),
6753 "::",
6754 stringify!(BM_PDO_Sink_2)
6755 )
6756 );
6757 assert_eq!(
6758 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).srt as *const _ as usize },
6759 180usize,
6760 concat!(
6761 "Offset of field: ",
6762 stringify!(ft_eeprom_pd),
6763 "::",
6764 stringify!(srt)
6765 )
6766 );
6767 assert_eq!(
6768 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).hrt as *const _ as usize },
6769 181usize,
6770 concat!(
6771 "Offset of field: ",
6772 stringify!(ft_eeprom_pd),
6773 "::",
6774 stringify!(hrt)
6775 )
6776 );
6777 assert_eq!(
6778 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).sct as *const _ as usize },
6779 182usize,
6780 concat!(
6781 "Offset of field: ",
6782 stringify!(ft_eeprom_pd),
6783 "::",
6784 stringify!(sct)
6785 )
6786 );
6787 assert_eq!(
6788 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).dit as *const _ as usize },
6789 183usize,
6790 concat!(
6791 "Offset of field: ",
6792 stringify!(ft_eeprom_pd),
6793 "::",
6794 stringify!(dit)
6795 )
6796 );
6797 assert_eq!(
6798 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).srcrt as *const _ as usize },
6799 184usize,
6800 concat!(
6801 "Offset of field: ",
6802 stringify!(ft_eeprom_pd),
6803 "::",
6804 stringify!(srcrt)
6805 )
6806 );
6807 assert_eq!(
6808 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).trt as *const _ as usize },
6809 186usize,
6810 concat!(
6811 "Offset of field: ",
6812 stringify!(ft_eeprom_pd),
6813 "::",
6814 stringify!(trt)
6815 )
6816 );
6817 assert_eq!(
6818 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).sofft as *const _ as usize },
6819 188usize,
6820 concat!(
6821 "Offset of field: ",
6822 stringify!(ft_eeprom_pd),
6823 "::",
6824 stringify!(sofft)
6825 )
6826 );
6827 assert_eq!(
6828 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).nrt as *const _ as usize },
6829 190usize,
6830 concat!(
6831 "Offset of field: ",
6832 stringify!(ft_eeprom_pd),
6833 "::",
6834 stringify!(nrt)
6835 )
6836 );
6837 assert_eq!(
6838 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).swct as *const _ as usize },
6839 192usize,
6840 concat!(
6841 "Offset of field: ",
6842 stringify!(ft_eeprom_pd),
6843 "::",
6844 stringify!(swct)
6845 )
6846 );
6847 assert_eq!(
6848 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).snkrt as *const _ as usize },
6849 194usize,
6850 concat!(
6851 "Offset of field: ",
6852 stringify!(ft_eeprom_pd),
6853 "::",
6854 stringify!(snkrt)
6855 )
6856 );
6857 assert_eq!(
6858 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).dt as *const _ as usize },
6859 196usize,
6860 concat!(
6861 "Offset of field: ",
6862 stringify!(ft_eeprom_pd),
6863 "::",
6864 stringify!(dt)
6865 )
6866 );
6867 assert_eq!(
6868 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).cnst as *const _ as usize },
6869 197usize,
6870 concat!(
6871 "Offset of field: ",
6872 stringify!(ft_eeprom_pd),
6873 "::",
6874 stringify!(cnst)
6875 )
6876 );
6877 assert_eq!(
6878 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).it as *const _ as usize },
6879 198usize,
6880 concat!(
6881 "Offset of field: ",
6882 stringify!(ft_eeprom_pd),
6883 "::",
6884 stringify!(it)
6885 )
6886 );
6887 assert_eq!(
6888 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).i2caddr as *const _ as usize },
6889 200usize,
6890 concat!(
6891 "Offset of field: ",
6892 stringify!(ft_eeprom_pd),
6893 "::",
6894 stringify!(i2caddr)
6895 )
6896 );
6897 assert_eq!(
6898 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).prou as *const _ as usize },
6899 204usize,
6900 concat!(
6901 "Offset of field: ",
6902 stringify!(ft_eeprom_pd),
6903 "::",
6904 stringify!(prou)
6905 )
6906 );
6907 assert_eq!(
6908 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).trim1 as *const _ as usize },
6909 208usize,
6910 concat!(
6911 "Offset of field: ",
6912 stringify!(ft_eeprom_pd),
6913 "::",
6914 stringify!(trim1)
6915 )
6916 );
6917 assert_eq!(
6918 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).trim2 as *const _ as usize },
6919 212usize,
6920 concat!(
6921 "Offset of field: ",
6922 stringify!(ft_eeprom_pd),
6923 "::",
6924 stringify!(trim2)
6925 )
6926 );
6927 assert_eq!(
6928 unsafe { &(*(::std::ptr::null::<ft_eeprom_pd>())).extdc as *const _ as usize },
6929 216usize,
6930 concat!(
6931 "Offset of field: ",
6932 stringify!(ft_eeprom_pd),
6933 "::",
6934 stringify!(extdc)
6935 )
6936 );
6937}
6938#[doc = " @noop FT_EEPROM_PD"]
6939#[doc = " @par Summary"]
6940#[doc = " Structure to hold power delivery configuration data for the FT4233PD, FT2233PD, FT4232PD,"]
6941#[doc = " FT2232PD, FT233PD and FT232PD in the FT_EEPROM_Program and FT_EEPROM_Read functions."]
6942#[doc = " This is appended to an FT_EEPROM_HEADER and a base device structure."]
6943#[doc = " e_g. @verbatim"]
6944#[doc = "\t\tstruct {"]
6945#[doc = "\t\t\tFT_EEPROM_xxx base;"]
6946#[doc = "\t\t\tFT_EEPROM_PD pd;"]
6947#[doc = "\t\t};"]
6948#[doc = " @endverbatim"]
6949#[doc = " @remarks"]
6950#[doc = " Device GPIO values are:"]
6951#[doc = " @li\tFTx233HP - 0 to 7, 15 for N/A"]
6952#[doc = " @li FTx232HP - 0 to 3, 15 for N/A"]
6953#[doc = " @see FT_EEPROM_HEADER"]
6954#[doc = " @see FT_EEPROM_PD_PDO_mv_ma"]
6955pub type FT_EEPROM_PD = ft_eeprom_pd;
6956#[doc = " FT2233HP EEPROM structure for use with FT_EEPROM_Read and FT_EEPROM_Program"]
6957#[doc = " FT2232H with power delivery"]
6958#[repr(C)]
6959#[derive(Debug, Copy, Clone)]
6960pub struct _ft_eeprom_2233hp {
6961 pub ft2232h: FT_EEPROM_2232H,
6962 pub pd: FT_EEPROM_PD,
6963}
6964#[test]
6965fn bindgen_test_layout__ft_eeprom_2233hp() {
6966 assert_eq!(
6967 ::std::mem::size_of::<_ft_eeprom_2233hp>(),
6968 260usize,
6969 concat!("Size of: ", stringify!(_ft_eeprom_2233hp))
6970 );
6971 assert_eq!(
6972 ::std::mem::align_of::<_ft_eeprom_2233hp>(),
6973 4usize,
6974 concat!("Alignment of ", stringify!(_ft_eeprom_2233hp))
6975 );
6976 assert_eq!(
6977 unsafe { &(*(::std::ptr::null::<_ft_eeprom_2233hp>())).ft2232h as *const _ as usize },
6978 0usize,
6979 concat!(
6980 "Offset of field: ",
6981 stringify!(_ft_eeprom_2233hp),
6982 "::",
6983 stringify!(ft2232h)
6984 )
6985 );
6986 assert_eq!(
6987 unsafe { &(*(::std::ptr::null::<_ft_eeprom_2233hp>())).pd as *const _ as usize },
6988 40usize,
6989 concat!(
6990 "Offset of field: ",
6991 stringify!(_ft_eeprom_2233hp),
6992 "::",
6993 stringify!(pd)
6994 )
6995 );
6996}
6997#[doc = " FT2233HP EEPROM structure for use with FT_EEPROM_Read and FT_EEPROM_Program"]
6998#[doc = " FT2232H with power delivery"]
6999pub type FT_EEPROM_2233HP = _ft_eeprom_2233hp;
7000#[doc = " FT4233HP EEPROM structure for use with FT_EEPROM_Read and FT_EEPROM_Program"]
7001#[doc = " FT4232H with power delivery"]
7002#[repr(C)]
7003#[derive(Debug, Copy, Clone)]
7004pub struct _ft_eeprom_4233hp {
7005 pub ft4232h: FT_EEPROM_4232H,
7006 pub pd: FT_EEPROM_PD,
7007}
7008#[test]
7009fn bindgen_test_layout__ft_eeprom_4233hp() {
7010 assert_eq!(
7011 ::std::mem::size_of::<_ft_eeprom_4233hp>(),
7012 256usize,
7013 concat!("Size of: ", stringify!(_ft_eeprom_4233hp))
7014 );
7015 assert_eq!(
7016 ::std::mem::align_of::<_ft_eeprom_4233hp>(),
7017 4usize,
7018 concat!("Alignment of ", stringify!(_ft_eeprom_4233hp))
7019 );
7020 assert_eq!(
7021 unsafe { &(*(::std::ptr::null::<_ft_eeprom_4233hp>())).ft4232h as *const _ as usize },
7022 0usize,
7023 concat!(
7024 "Offset of field: ",
7025 stringify!(_ft_eeprom_4233hp),
7026 "::",
7027 stringify!(ft4232h)
7028 )
7029 );
7030 assert_eq!(
7031 unsafe { &(*(::std::ptr::null::<_ft_eeprom_4233hp>())).pd as *const _ as usize },
7032 36usize,
7033 concat!(
7034 "Offset of field: ",
7035 stringify!(_ft_eeprom_4233hp),
7036 "::",
7037 stringify!(pd)
7038 )
7039 );
7040}
7041#[doc = " FT4233HP EEPROM structure for use with FT_EEPROM_Read and FT_EEPROM_Program"]
7042#[doc = " FT4232H with power delivery"]
7043pub type FT_EEPROM_4233HP = _ft_eeprom_4233hp;
7044#[doc = " FT2232HP EEPROM structure for use with FT_EEPROM_Read and FT_EEPROM_Program"]
7045#[doc = " FT2232H with power delivery"]
7046#[repr(C)]
7047#[derive(Debug, Copy, Clone)]
7048pub struct _ft_eeprom_2232hp {
7049 pub ft2232h: FT_EEPROM_2232H,
7050 pub pd: FT_EEPROM_PD,
7051}
7052#[test]
7053fn bindgen_test_layout__ft_eeprom_2232hp() {
7054 assert_eq!(
7055 ::std::mem::size_of::<_ft_eeprom_2232hp>(),
7056 260usize,
7057 concat!("Size of: ", stringify!(_ft_eeprom_2232hp))
7058 );
7059 assert_eq!(
7060 ::std::mem::align_of::<_ft_eeprom_2232hp>(),
7061 4usize,
7062 concat!("Alignment of ", stringify!(_ft_eeprom_2232hp))
7063 );
7064 assert_eq!(
7065 unsafe { &(*(::std::ptr::null::<_ft_eeprom_2232hp>())).ft2232h as *const _ as usize },
7066 0usize,
7067 concat!(
7068 "Offset of field: ",
7069 stringify!(_ft_eeprom_2232hp),
7070 "::",
7071 stringify!(ft2232h)
7072 )
7073 );
7074 assert_eq!(
7075 unsafe { &(*(::std::ptr::null::<_ft_eeprom_2232hp>())).pd as *const _ as usize },
7076 40usize,
7077 concat!(
7078 "Offset of field: ",
7079 stringify!(_ft_eeprom_2232hp),
7080 "::",
7081 stringify!(pd)
7082 )
7083 );
7084}
7085#[doc = " FT2232HP EEPROM structure for use with FT_EEPROM_Read and FT_EEPROM_Program"]
7086#[doc = " FT2232H with power delivery"]
7087pub type FT_EEPROM_2232HP = _ft_eeprom_2232hp;
7088#[doc = " FT4232HP EEPROM structure for use with FT_EEPROM_Read and FT_EEPROM_Program"]
7089#[doc = " FT4232H with power delivery"]
7090#[repr(C)]
7091#[derive(Debug, Copy, Clone)]
7092pub struct _ft_eeprom_4232hp {
7093 pub ft4232h: FT_EEPROM_4232H,
7094 pub pd: FT_EEPROM_PD,
7095}
7096#[test]
7097fn bindgen_test_layout__ft_eeprom_4232hp() {
7098 assert_eq!(
7099 ::std::mem::size_of::<_ft_eeprom_4232hp>(),
7100 256usize,
7101 concat!("Size of: ", stringify!(_ft_eeprom_4232hp))
7102 );
7103 assert_eq!(
7104 ::std::mem::align_of::<_ft_eeprom_4232hp>(),
7105 4usize,
7106 concat!("Alignment of ", stringify!(_ft_eeprom_4232hp))
7107 );
7108 assert_eq!(
7109 unsafe { &(*(::std::ptr::null::<_ft_eeprom_4232hp>())).ft4232h as *const _ as usize },
7110 0usize,
7111 concat!(
7112 "Offset of field: ",
7113 stringify!(_ft_eeprom_4232hp),
7114 "::",
7115 stringify!(ft4232h)
7116 )
7117 );
7118 assert_eq!(
7119 unsafe { &(*(::std::ptr::null::<_ft_eeprom_4232hp>())).pd as *const _ as usize },
7120 36usize,
7121 concat!(
7122 "Offset of field: ",
7123 stringify!(_ft_eeprom_4232hp),
7124 "::",
7125 stringify!(pd)
7126 )
7127 );
7128}
7129#[doc = " FT4232HP EEPROM structure for use with FT_EEPROM_Read and FT_EEPROM_Program"]
7130#[doc = " FT4232H with power delivery"]
7131pub type FT_EEPROM_4232HP = _ft_eeprom_4232hp;
7132#[doc = " FT233HP EEPROM structure for use with FT_EEPROM_Read and FT_EEPROM_Program"]
7133#[doc = " FT233H with power delivery"]
7134#[repr(C)]
7135#[derive(Debug, Copy, Clone)]
7136pub struct _ft_eeprom_233hp {
7137 pub ft232h: FT_EEPROM_232H,
7138 pub pd: FT_EEPROM_PD,
7139}
7140#[test]
7141fn bindgen_test_layout__ft_eeprom_233hp() {
7142 assert_eq!(
7143 ::std::mem::size_of::<_ft_eeprom_233hp>(),
7144 264usize,
7145 concat!("Size of: ", stringify!(_ft_eeprom_233hp))
7146 );
7147 assert_eq!(
7148 ::std::mem::align_of::<_ft_eeprom_233hp>(),
7149 4usize,
7150 concat!("Alignment of ", stringify!(_ft_eeprom_233hp))
7151 );
7152 assert_eq!(
7153 unsafe { &(*(::std::ptr::null::<_ft_eeprom_233hp>())).ft232h as *const _ as usize },
7154 0usize,
7155 concat!(
7156 "Offset of field: ",
7157 stringify!(_ft_eeprom_233hp),
7158 "::",
7159 stringify!(ft232h)
7160 )
7161 );
7162 assert_eq!(
7163 unsafe { &(*(::std::ptr::null::<_ft_eeprom_233hp>())).pd as *const _ as usize },
7164 44usize,
7165 concat!(
7166 "Offset of field: ",
7167 stringify!(_ft_eeprom_233hp),
7168 "::",
7169 stringify!(pd)
7170 )
7171 );
7172}
7173#[doc = " FT233HP EEPROM structure for use with FT_EEPROM_Read and FT_EEPROM_Program"]
7174#[doc = " FT233H with power delivery"]
7175pub type FT_EEPROM_233HP = _ft_eeprom_233hp;
7176#[doc = " FT232HP EEPROM structure for use with FT_EEPROM_Read and FT_EEPROM_Program"]
7177#[doc = " FT232H with power delivery"]
7178#[repr(C)]
7179#[derive(Debug, Copy, Clone)]
7180pub struct _ft_eeprom_232hp {
7181 pub ft232h: FT_EEPROM_232H,
7182 pub pd: FT_EEPROM_PD,
7183}
7184#[test]
7185fn bindgen_test_layout__ft_eeprom_232hp() {
7186 assert_eq!(
7187 ::std::mem::size_of::<_ft_eeprom_232hp>(),
7188 264usize,
7189 concat!("Size of: ", stringify!(_ft_eeprom_232hp))
7190 );
7191 assert_eq!(
7192 ::std::mem::align_of::<_ft_eeprom_232hp>(),
7193 4usize,
7194 concat!("Alignment of ", stringify!(_ft_eeprom_232hp))
7195 );
7196 assert_eq!(
7197 unsafe { &(*(::std::ptr::null::<_ft_eeprom_232hp>())).ft232h as *const _ as usize },
7198 0usize,
7199 concat!(
7200 "Offset of field: ",
7201 stringify!(_ft_eeprom_232hp),
7202 "::",
7203 stringify!(ft232h)
7204 )
7205 );
7206 assert_eq!(
7207 unsafe { &(*(::std::ptr::null::<_ft_eeprom_232hp>())).pd as *const _ as usize },
7208 44usize,
7209 concat!(
7210 "Offset of field: ",
7211 stringify!(_ft_eeprom_232hp),
7212 "::",
7213 stringify!(pd)
7214 )
7215 );
7216}
7217#[doc = " FT232HP EEPROM structure for use with FT_EEPROM_Read and FT_EEPROM_Program"]
7218#[doc = " FT232H with power delivery"]
7219pub type FT_EEPROM_232HP = _ft_eeprom_232hp;
7220extern "C" {
7221 #[doc = " @noop FT_EEPROM_Read"]
7222 #[doc = " @par Supported Operating Systems"]
7223 #[doc = " Linux"]
7224 #[doc = " Mac OS X (10.4 and later)"]
7225 #[doc = " Windows (XP and later)"]
7226 #[doc = " @par Summary"]
7227 #[doc = " Read data from the EEPROM, this command will work for all existing FTDI chipset, and must be"]
7228 #[doc = " used for the FT-X series."]
7229 #[doc = " @param ftHandle Handle of the device."]
7230 #[doc = " @param *eepromData Pointer to a buffer that contains the data to be read."]
7231 #[doc = " Note: This structure is different for each device type."]
7232 #[doc = " @param eepromDataSize Size of the eepromData buffer that contains storage for the data to be read."]
7233 #[doc = " @param *Manufacturer Pointer to a null-terminated string containing the manufacturer\tname."]
7234 #[doc = " @param *ManufacturerId Pointer to a null-terminated string containing the manufacturer ID."]
7235 #[doc = " @param *Description Pointer to a null-terminated string containing the device description."]
7236 #[doc = " @param *SerialNumber Pointer to a null-terminated string containing the device serial number."]
7237 #[doc = " @returns"]
7238 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
7239 #[doc = " @remarks"]
7240 #[doc = " This function interprets the parameter *eepromDATA as a pointer to a structure matching the device"]
7241 #[doc = " type being accessed e.g."]
7242 #[doc = " @li PFT_EEPROM_232B is the structure for FT2xxB devices."]
7243 #[doc = " @li PFT_EEPROM_2232 is the structure for FT2232D devices."]
7244 #[doc = " @li PFT_EEPROM_232R is the structure for FT232R devices."]
7245 #[doc = " @li PFT_EEPROM_2232H is the structure for FT2232H devices."]
7246 #[doc = " @li PFT_EEPROM_4232H is the structure for FT4232H devices."]
7247 #[doc = " @li PFT_EEPROM_232H is the structure for FT232H devices."]
7248 #[doc = " @li PFT_EEPROM_X_SERIES is the structure for FT2xxX devices."]
7249 #[doc = ""]
7250 #[doc = " The function does not perform any checks on buffer sizes, so the buffers passed in the eepromDATA"]
7251 #[doc = " structure must be big enough to accommodate their respective strings (including null terminators)."]
7252 #[doc = " The sizes shown in the following example are more than adequate and can be rounded down if necessary."]
7253 #[doc = " The restriction is that the Manufacturer string length plus the Description string length is less than or"]
7254 #[doc = " equal to 40 characters."]
7255 #[doc = " @note Note that the DLL must be informed which version of the eepromDATA structure is being used. This is"]
7256 #[doc = " done through the PFT_EEPROM_HEADER structure. The first element of this structure is deviceType and"]
7257 #[doc = " may be FT_DEVICE_BM, FT_DEVICE_AM, FT_DEVICE_2232C, FT_DEVICE_232R, FT_DEVICE_2232H,"]
7258 #[doc = " FT_DEVICE_4232H, FT_DEVICE_232H, or FT_DEVICE_X_SERIES as defined in FTD2XX.h."]
7259 pub fn FT_EEPROM_Read(
7260 ftHandle: FT_HANDLE,
7261 eepromData: *mut ::std::os::raw::c_void,
7262 eepromDataSize: DWORD,
7263 Manufacturer: *mut ::std::os::raw::c_char,
7264 ManufacturerId: *mut ::std::os::raw::c_char,
7265 Description: *mut ::std::os::raw::c_char,
7266 SerialNumber: *mut ::std::os::raw::c_char,
7267 ) -> FT_STATUS;
7268}
7269extern "C" {
7270 #[doc = " @noop FT_EEPROM_Program"]
7271 #[doc = " @par Supported Operating Systems"]
7272 #[doc = " Linux"]
7273 #[doc = " Mac OS X (10.4 and later)"]
7274 #[doc = " Windows (XP and later)"]
7275 #[doc = " @par Summary"]
7276 #[doc = " Write data into the EEPROM, this command will work for all existing FTDI chipset, and must be used for"]
7277 #[doc = " the FT-X series."]
7278 #[doc = " @param ftHandle Handle of the device."]
7279 #[doc = " @param *eepromData Pointer to a buffer that contains the data to be written."]
7280 #[doc = " Note: This structure is different for each device type."]
7281 #[doc = " @param eepromDataSize Size of the eepromData buffer that contains storage for the data to be written."]
7282 #[doc = " @param *Manufacturer Pointer to a null-terminated string containing the manufacturer name."]
7283 #[doc = " @param *ManufacturerId Pointer to a null-terminated string containing the manufacturer ID."]
7284 #[doc = " @param *Description Pointer to a null-terminated string containing the device description."]
7285 #[doc = " @param *SerialNumber Pointer to a null-terminated string containing the device serial number."]
7286 #[doc = " @returns"]
7287 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
7288 #[doc = " @remarks"]
7289 #[doc = " This function interprets the parameter *eepromDATA as a pointer to a structure matching the device"]
7290 #[doc = " type being accessed e.g."]
7291 #[doc = " @li PFT_EEPROM_232B is the structure for FT2xxB devices."]
7292 #[doc = " @li PFT_EEPROM_2232 is the structure for FT2232D devices."]
7293 #[doc = " @li PFT_EEPROM_232R is the structure for FT232R devices."]
7294 #[doc = " @li PFT_EEPROM_2232H is the structure for FT2232H devices."]
7295 #[doc = " @li PFT_EEPROM_4232H is the structure for FT4232H devices."]
7296 #[doc = " @li PFT_EEPROM_232H is the structure for FT232H devices."]
7297 #[doc = " @li PFT_EEPROM_X_SERIES is the structure for FT2xxX devices."]
7298 #[doc = ""]
7299 #[doc = " The function does not perform any checks on buffer sizes, so the buffers passed in the eepromDATA"]
7300 #[doc = " structure must be big enough to accommodate their respective strings (including null terminators)."]
7301 #[doc = " @n The sizes shown in the following example are more than adequate and can be rounded down if necessary."]
7302 #[doc = " The restriction is that the Manufacturer string length plus the Description string length is less than or"]
7303 #[doc = " equal to 40 characters."]
7304 #[doc = " @note Note that the DLL must be informed which version of the eepromDATA structure is being used. This is"]
7305 #[doc = " done through the PFT_EEPROM_HEADER structure. The first element of this structure is deviceType and"]
7306 #[doc = " may be FT_DEVICE_BM, FT_DEVICE_AM, FT_DEVICE_2232C, FT_DEVICE_232R, FT_DEVICE_2232H,"]
7307 #[doc = " FT_DEVICE_4232H, FT_DEVICE_232H, or FT_DEVICE_X_SERIES as defined in FTD2XX.h."]
7308 pub fn FT_EEPROM_Program(
7309 ftHandle: FT_HANDLE,
7310 eepromData: *mut ::std::os::raw::c_void,
7311 eepromDataSize: DWORD,
7312 Manufacturer: *mut ::std::os::raw::c_char,
7313 ManufacturerId: *mut ::std::os::raw::c_char,
7314 Description: *mut ::std::os::raw::c_char,
7315 SerialNumber: *mut ::std::os::raw::c_char,
7316 ) -> FT_STATUS;
7317}
7318extern "C" {
7319 #[doc = " @noop FT_SetLatencyTimer"]
7320 #[doc = " @par Supported Operating Systems"]
7321 #[doc = " Linux"]
7322 #[doc = " Mac OS X (10.4 and later)"]
7323 #[doc = " Windows (2000 and later)"]
7324 #[doc = " Windows CE (4.2 and later)"]
7325 #[doc = " @par Summary"]
7326 #[doc = " Set the latency timer value."]
7327 #[doc = " @param ftHandle Handle of the device."]
7328 #[doc = " @param ucLatency Required value, in milliseconds, of latency timer. Valid range is 2 - 255."]
7329 #[doc = " @returns"]
7330 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
7331 #[doc = " @remarks"]
7332 #[doc = " In the FT8U232AM and FT8U245AM devices, the receive buffer timeout that is used to flush remaining"]
7333 #[doc = " data from the receive buffer was fixed at 16 ms. In all other FTDI devices, this timeout is"]
7334 #[doc = " programmable and can be set at 1 ms intervals between 2ms and 255 ms. This allows the device to"]
7335 #[doc = " be better optimize for protocols requiring faster response times from short data packets."]
7336 pub fn FT_SetLatencyTimer(ftHandle: FT_HANDLE, ucLatency: UCHAR) -> FT_STATUS;
7337}
7338extern "C" {
7339 #[doc = " @noop FT_GetLatencyTimer"]
7340 #[doc = " @par Supported Operating Systems"]
7341 #[doc = " Linux"]
7342 #[doc = " Mac OS X (10.4 and later)"]
7343 #[doc = " Windows (2000 and later)"]
7344 #[doc = " Windows CE (4.2 and later)"]
7345 #[doc = " @par Summary"]
7346 #[doc = " Get the current value of the latency timer."]
7347 #[doc = " @param ftHandle Handle of the device."]
7348 #[doc = " @param pucLatency Pointer to unsigned char to store latency timer value."]
7349 #[doc = " @returns"]
7350 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
7351 #[doc = " @remarks"]
7352 #[doc = " In the FT8U232AM and FT8U245AM devices, the receive buffer timeout that is used to flush remaining"]
7353 #[doc = " data from the receive buffer was fixed at 16 ms. In all other FTDI devices, this timeout is"]
7354 #[doc = " programmable and can be set at 1 ms intervals between 2ms and 255 ms. This allows the device to"]
7355 #[doc = " be better optimized for protocols requiring faster response times from short data packets."]
7356 pub fn FT_GetLatencyTimer(ftHandle: FT_HANDLE, pucLatency: PUCHAR) -> FT_STATUS;
7357}
7358extern "C" {
7359 #[doc = " @noop FT_SetBitMode"]
7360 #[doc = " @par Supported Operating Systems"]
7361 #[doc = " Linux"]
7362 #[doc = " Mac OS X (10.4 and later)"]
7363 #[doc = " Windows (2000 and later)"]
7364 #[doc = " Windows CE (4.2 and later)"]
7365 #[doc = " @par Summary"]
7366 #[doc = " Enables different chip modes."]
7367 #[doc = " @param ftHandle Handle of the device."]
7368 #[doc = " @param ucMask Required value for bit mode mask. This sets up which bits are inputs and outputs."]
7369 #[doc = " A bit value of 0 sets the corresponding pin to an input, a bit value of 1 sets the corresponding"]
7370 #[doc = " pin to an output."]
7371 #[doc = " @n In the case of CBUS Bit Bang, the upper nibble of this value controls which pins are inputs"]
7372 #[doc = " and outputs,\twhile the lower nibble controls which of the outputs are high and low."]
7373 #[doc = " @param ucEnable Mode value. Can be one of the following:"]
7374 #[doc = " @li 0x0 = Reset"]
7375 #[doc = " @li 0x1 = Asynchronous Bit Bang"]
7376 #[doc = " @li 0x2 = MPSSE (FT2232, FT2232H, FT4232H and FT232H devices only)"]
7377 #[doc = " @li 0x4 = Synchronous Bit Bang (FT232R, FT245R, FT2232, FT2232H, FT4232H and FT232H devices only)"]
7378 #[doc = " @li 0x8 = MCU Host Bus Emulation Mode (FT2232, FT2232H, FT4232H and FT232H devices only)"]
7379 #[doc = " @li 0x10 = Fast Opto-Isolated Serial Mode (FT2232, FT2232H, FT4232H and FT232H devices only)"]
7380 #[doc = " @li 0x20 = CBUS Bit Bang Mode (FT232R and FT232H devices only)"]
7381 #[doc = " @li 0x40 = Single Channel Synchronous 245 FIFO Mode (FT2232H and FT232H devices only)"]
7382 #[doc = " @returns"]
7383 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
7384 #[doc = " @remarks"]
7385 #[doc = " For a description of available bit modes for the FT232R, see the application note \"Bit Bang Modes"]
7386 #[doc = " for the FT232R and FT245R\"."]
7387 #[doc = " @n For a description of available bit modes for the FT2232, see the application note \"Bit Mode"]
7388 #[doc = " Functions for the FT2232\"."]
7389 #[doc = " @n For a description of Bit Bang Mode for the FT232B and FT245B, see the application note"]
7390 #[doc = " \"FT232B/FT245B Bit Bang Mode\"."]
7391 #[doc = " @n Application notes are available for download from the FTDI website."]
7392 #[doc = " Note that to use CBUS Bit Bang for the FT232R, the CBUS must be configured for CBUS Bit Bang in the"]
7393 #[doc = " EEPROM."]
7394 #[doc = " @note Note that to use Single Channel Synchronous 245 FIFO mode for the FT2232H, channel A must be"]
7395 #[doc = " configured for FT245 FIFO mode in the EEPROM."]
7396 pub fn FT_SetBitMode(ftHandle: FT_HANDLE, ucMask: UCHAR, ucEnable: UCHAR) -> FT_STATUS;
7397}
7398extern "C" {
7399 #[doc = " @noop FT_GetBitMode"]
7400 #[doc = " @par Supported Operating Systems"]
7401 #[doc = " Linux"]
7402 #[doc = " Mac OS X (10.4 and later)"]
7403 #[doc = " Windows (2000 and later)"]
7404 #[doc = " Windows CE (4.2 and later)"]
7405 #[doc = " @par Summary"]
7406 #[doc = " Gets the instantaneous value of the data bus."]
7407 #[doc = " @param ftHandle Handle of the device."]
7408 #[doc = " @param pucMode Pointer to unsigned char to store the instantaneous data bus value."]
7409 #[doc = " @returns"]
7410 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
7411 #[doc = " @remarks"]
7412 #[doc = " For a description of available bit modes for the FT232R, see the application note \"Bit Bang Modes"]
7413 #[doc = " for the FT232R and FT245R\"."]
7414 #[doc = " @n For a description of available bit modes for the FT2232, see the application note \"Bit Mode"]
7415 #[doc = " Functions for the FT2232\"."]
7416 #[doc = " @n For a description of bit bang modes for the FT232B and FT245B, see the application note"]
7417 #[doc = " \"FT232B/FT245B Bit Bang Mode\"."]
7418 #[doc = " @n For a description of bit modes supported by the FT4232H and FT2232H devices, please see the"]
7419 #[doc = " IC data sheets."]
7420 #[doc = " @n These application notes are available for download from the FTDI website."]
7421 pub fn FT_GetBitMode(ftHandle: FT_HANDLE, pucMode: PUCHAR) -> FT_STATUS;
7422}
7423extern "C" {
7424 #[doc = " @noop FT_SetUSBParameters"]
7425 #[doc = " @par Supported Operating Systems"]
7426 #[doc = " Linux"]
7427 #[doc = " Mac OS X (10.4 and later)"]
7428 #[doc = " Windows (2000 and later)"]
7429 #[doc = " Windows CE (4.2 and later)"]
7430 #[doc = " @par Summary"]
7431 #[doc = " Set the USB request transfer size."]
7432 #[doc = " @param ftHandle Handle of the device."]
7433 #[doc = " @param ulInTransferSize Transfer size for USB IN request."]
7434 #[doc = " @param ulOutTransferSize Transfer size for USB OUT request."]
7435 #[doc = " @returns"]
7436 #[doc = " FT_OK if successful, otherwise the return value is an FT error code."]
7437 #[doc = " @remarks"]
7438 #[doc = " This function can be used to change the transfer sizes from the default transfer size of 4096"]
7439 #[doc = " bytes to\tbetter suit the application requirements. Transfer sizes must be set to a multiple"]
7440 #[doc = " of 64 bytes between 64 bytes and 64k bytes."]
7441 #[doc = " @n When FT_SetUSBParameters is called, the change comes into effect immediately and any data"]
7442 #[doc = " that was\theld in the driver at the time of the change is lost."]
7443 #[doc = " @note Note that, at present, only ulInTransferSize is supported."]
7444 pub fn FT_SetUSBParameters(
7445 ftHandle: FT_HANDLE,
7446 ulInTransferSize: ULONG,
7447 ulOutTransferSize: ULONG,
7448 ) -> FT_STATUS;
7449}
7450extern "C" {
7451 #[doc = " @noop FT_W32_CreateFile"]
7452 #[doc = " @par Supported Operating Systems"]
7453 #[doc = " Linux"]
7454 #[doc = " Mac OS X (10.4 and later)"]
7455 #[doc = " Windows (2000 and later)"]
7456 #[doc = " Windows CE (4.2 and later)"]
7457 #[doc = " @par Summary"]
7458 #[doc = " Opens the specified device and return a handle which will be used for subsequent accesses."]
7459 #[doc = " The device can be specified by its serial number, device description, or location."]
7460 #[doc = " @n This function must be used if overlapped I/O is required."]
7461 #[doc = " @param lpszName Meaning depends on the value of dwAttrsAndFlags. Can be a pointer to a null"]
7462 #[doc = " terminated string that contains the description or serial number of the device, or can be"]
7463 #[doc = " the location of the device. These values can be obtained from the FT_CreateDeviceInfoList,"]
7464 #[doc = " FT_GetDeviceInfoDetail or FT_ListDevices\tfunctions."]
7465 #[doc = " @param dwAccess Type of access to the device. Access can be GENERIC_READ,"]
7466 #[doc = " GENERIC_WRITE or both. Ignored in Linux."]
7467 #[doc = " @param dwShareMode How the device is shared. This value must be set to 0."]
7468 #[doc = " @param lpSecurityAttributes This parameter has no effect and should be set to NULL."]
7469 #[doc = " @param dwCreate This parameter must be set to OPEN_EXISTING. Ignored in Linux."]
7470 #[doc = " @param dwAttrsAndFlags File attributes and flags. This parameter is a combination of"]
7471 #[doc = " FILE_ATTRIBUTE_NORMAL, FILE_FLAG_OVERLAPPED if overlapped I/O is used,"]
7472 #[doc = " FT_OPEN_BY_SERIAL_NUMBER if lpszName is the device’s serial number, and"]
7473 #[doc = " FT_OPEN_BY_DESCRIPTION if lpszName is the device’s description."]
7474 #[doc = " @param hTemplate This parameter must be NULL."]
7475 #[doc = " @returns"]
7476 #[doc = " If the function is successful, the return value is a handle."]
7477 #[doc = " If the function is unsuccessful, the return value is the Win32 error code INVALID_HANDLE_VALUE."]
7478 #[doc = " @remarks"]
7479 #[doc = " The meaning of lpszName depends on dwAttrsAndFlags: if FT_OPEN_BY_SERIAL_NUMBER or"]
7480 #[doc = " FT_OPEN_BY_DESCRIPTION is set in dwAttrsAndFlags, lpszName contains a pointer to a null terminated"]
7481 #[doc = " string that contains the device's serial number or description; if FT_OPEN_BY_LOCATION is set in"]
7482 #[doc = " dwAttrsAndFlags, lpszName is interpreted as a value of type long that contains the location ID of"]
7483 #[doc = " the device. dwAccess can be GENERIC_READ, GENERIC_WRITE or both; dwShareMode must be set to 0;"]
7484 #[doc = " lpSecurityAttributes must be set to NULL; dwCreate must be set to OPEN_EXISTING; dwAttrsAndFlags"]
7485 #[doc = " is a combination of FILE_ATTRIBUTE_NORMAL, FILE_FLAG_OVERLAPPED if overlapped I/O is used,"]
7486 #[doc = " FT_OPEN_BY_SERIAL_NUMBER or FT_OPEN_BY_DESCRIPTION or FT_OPEN_BY_LOCATION; hTemplate"]
7487 #[doc = " must be NULL."]
7488 #[doc = " @note Note that Linux, Mac OS X and Windows CE do not support overlapped IO. Windows CE"]
7489 #[doc = " does not support location IDs."]
7490 pub fn FT_W32_CreateFile(
7491 lpszName: LPCTSTR,
7492 dwAccess: DWORD,
7493 dwShareMode: DWORD,
7494 lpSecurityAttributes: LPSECURITY_ATTRIBUTES,
7495 dwCreate: DWORD,
7496 dwAttrsAndFlags: DWORD,
7497 hTemplate: HANDLE,
7498 ) -> FT_HANDLE;
7499}
7500extern "C" {
7501 #[doc = " @noop FT_W32_CloseHandle"]
7502 #[doc = " @par Supported Operating Systems"]
7503 #[doc = " Linux"]
7504 #[doc = " Mac OS X (10.4 and later)"]
7505 #[doc = " Windows (2000 and later)"]
7506 #[doc = " Windows CE (4.2 and later)"]
7507 #[doc = " @par Summary"]
7508 #[doc = " Close the specified device handle."]
7509 #[doc = " @param ftHandle Handle of the device."]
7510 #[doc = " @returns"]
7511 #[doc = " If the function is successful, the return value is nonzero."]
7512 #[doc = " If the function is unsuccessful, the return value is zero."]
7513 pub fn FT_W32_CloseHandle(ftHandle: FT_HANDLE) -> BOOL;
7514}
7515extern "C" {
7516 #[doc = " @noop FT_W32_ReadFile"]
7517 #[doc = " @par Supported Operating Systems"]
7518 #[doc = " Linux"]
7519 #[doc = " Mac OS X (10.4 and later)"]
7520 #[doc = " Windows (2000 and later)"]
7521 #[doc = " Windows CE (4.2 and later)"]
7522 #[doc = " @par Summary"]
7523 #[doc = " Read data from the device."]
7524 #[doc = " @param ftHandle Handle of the device."]
7525 #[doc = " @param lpBuffer Pointer to a buffer that receives the data from the device."]
7526 #[doc = " @param nBufferSize Number of bytes to read from the device."]
7527 #[doc = " @param lpdwBytesReturned Pointer to a variable that receives the number of bytes read from"]
7528 #[doc = " the device."]
7529 #[doc = " @param lpOverlapped Pointer to an overlapped structure."]
7530 #[doc = " @returns"]
7531 #[doc = " If the function is successful, the return value is nonzero."]
7532 #[doc = " If the function is unsuccessful, the return value is zero."]
7533 #[doc = " @remarks"]
7534 #[doc = " This function supports both non-overlapped and overlapped I/O, except under Linux, Mac OS X"]
7535 #[doc = " and Windows CE where only non-overlapped IO is supported."]
7536 #[doc = " @n @b Non-overlapped @b I/O"]
7537 #[doc = " @n The parameter, lpOverlapped, must be NULL for non-overlapped I/O."]
7538 #[doc = " @n This function always returns the number of bytes read in lpdwBytesReturned."]
7539 #[doc = " This function does not return until dwBytesToRead have been read into the buffer. The number of"]
7540 #[doc = " bytes in the receive queue can be determined by calling FT_GetStatus or FT_GetQueueStatus, and"]
7541 #[doc = " passed as dwBytesToRead so that the function reads the device and returns immediately."]
7542 #[doc = " @n When a read timeout has been setup in a previous call to FT_W32_SetCommTimeouts, this function"]
7543 #[doc = " returns when the timer expires or dwBytesToRead have been read, whichever occurs first. If a"]
7544 #[doc = " timeout occurred, any available data is read into lpBuffer and the function returns a non-zero value."]
7545 #[doc = " @n An application should use the function return value and lpdwBytesReturned when processing the"]
7546 #[doc = " buffer. If the return value is non-zero and lpdwBytesReturned is equal to dwBytesToRead then the"]
7547 #[doc = " function has\tcompleted normally. If the return value is non-zero and lpdwBytesReturned is less"]
7548 #[doc = " then dwBytesToRead then a timeout has occurred, and the read request has been partially completed."]
7549 #[doc = " @note Note that if a timeout\toccurred and no data was read, the return value is still non-zero."]
7550 #[doc = " @n @b Overlapped @b I/O"]
7551 #[doc = " @n When the device has been opened for overlapped I/O, an application can issue a request and"]
7552 #[doc = " perform some additional work while the request is pending. This contrasts with the case"]
7553 #[doc = " of non-overlapped I/O in\twhich the application issues a request and receives control again only"]
7554 #[doc = " after the request has been completed."]
7555 #[doc = " @n The parameter, lpOverlapped, must point to an initialized OVERLAPPED structure. If there is"]
7556 #[doc = " enough data in the receive queue to satisfy the request, the request completes immediately and"]
7557 #[doc = " the return code is non-zero. The number of bytes read is returned in lpdwBytesReturned."]
7558 #[doc = " @n If there is not enough data in the receive queue to satisfy the request, the request completes"]
7559 #[doc = " immediately, and the return code is zero, signifying an error. An application should call"]
7560 #[doc = " FT_W32_GetLastError to get the cause of the error. If the error code is ERROR_IO_PENDING, the"]
7561 #[doc = " overlapped operation is still in progress, and the application can perform other processing."]
7562 #[doc = " Eventually, the application checks the result of the overlapped request by calling"]
7563 #[doc = " FT_W32_GetOverlappedResult."]
7564 #[doc = " @n If successful, the number of bytes read is returned in lpdwBytesReturned."]
7565 pub fn FT_W32_ReadFile(
7566 ftHandle: FT_HANDLE,
7567 lpBuffer: LPVOID,
7568 nBufferSize: DWORD,
7569 lpdwBytesReturned: LPDWORD,
7570 lpOverlapped: LPOVERLAPPED,
7571 ) -> BOOL;
7572}
7573extern "C" {
7574 #[doc = " @noop FT_W32_WriteFile"]
7575 #[doc = " @par Supported Operating Systems"]
7576 #[doc = " Linux"]
7577 #[doc = " Mac OS X (10.4 and later)"]
7578 #[doc = " Windows (2000 and later)"]
7579 #[doc = " Windows CE (4.2 and later)"]
7580 #[doc = " @par Summary"]
7581 #[doc = " Write data to the device."]
7582 #[doc = " @param ftHandle Handle of the device."]
7583 #[doc = " @param lpBuffer Pointer to the buffer that contains the data to write to the device."]
7584 #[doc = " @param nBufferSize Number of bytes to be written to the device."]
7585 #[doc = " @param lpdwBytesWritten Pointer to a variable that receives the number of bytes written to the device."]
7586 #[doc = " @param lpOverlapped Pointer to an overlapped structure."]
7587 #[doc = " @returns"]
7588 #[doc = " If the function is successful, the return value is nonzero."]
7589 #[doc = " If the function is unsuccessful, the return value is zero."]
7590 #[doc = " @remarks"]
7591 #[doc = " This function supports both non-overlapped and overlapped I/O, except under Linux, Mac OS X and"]
7592 #[doc = " Windows CE where only non-overlapped IO is supported."]
7593 #[doc = " @n @b Non-overlapped @b I/O"]
7594 #[doc = " @n The parameter, lpOverlapped, must be NULL for non-overlapped I/O."]
7595 #[doc = " @n This function always returns the number of bytes written in lpdwBytesWritten."]
7596 #[doc = " This function does not return until dwBytesToWrite have been written to the device."]
7597 #[doc = " When a write timeout has been setup in a previous call to FT_W32_SetCommTimeouts, this function"]
7598 #[doc = " returns when the timer expires or dwBytesToWrite have been written, whichever occurs first. If a"]
7599 #[doc = " timeout occurred, lpdwBytesWritten contains the number of bytes actually written, and the function"]
7600 #[doc = " returns a non-zero value."]
7601 #[doc = " @n An application should always use the function return value and lpdwBytesWritten. If the return"]
7602 #[doc = " value is\tnon-zero and lpdwBytesWritten is equal to dwBytesToWrite then the function has completed"]
7603 #[doc = " normally. If\tthe return value is non-zero and lpdwBytesWritten is less then dwBytesToWrite then a"]
7604 #[doc = " timeout has occurred, and the write request has been partially completed."]
7605 #[doc = " @note Note that if a timeout occurred and no data was written, the return value is still non-zero."]
7606 #[doc = " @n @b Overlapped @b I/O"]
7607 #[doc = " @n When the device has been opened for overlapped I/O, an application can issue a request and perform"]
7608 #[doc = " some additional work while the request is pending. This contrasts with the case of non-overlapped"]
7609 #[doc = " I/O in which the application issues a request and receives control again only after the request has"]
7610 #[doc = " been\tcompleted."]
7611 #[doc = " @n The parameter, lpOverlapped, must point to an initialized OVERLAPPED structure."]
7612 #[doc = " This function completes immediately, and the return code is zero, signifying an error. An application"]
7613 #[doc = " should call FT_W32_GetLastError to get the cause of the error. If the error code is ERROR_IO_PENDING,"]
7614 #[doc = " the overlapped operation is still in progress, and the application can perform other processing."]
7615 #[doc = " Eventually, the application checks the result of the overlapped request by calling"]
7616 #[doc = " FT_W32_GetOverlappedResult."]
7617 #[doc = " @n If successful, the number of bytes written is returned in lpdwBytesWritten."]
7618 pub fn FT_W32_WriteFile(
7619 ftHandle: FT_HANDLE,
7620 lpBuffer: LPVOID,
7621 nBufferSize: DWORD,
7622 lpdwBytesWritten: LPDWORD,
7623 lpOverlapped: LPOVERLAPPED,
7624 ) -> BOOL;
7625}
7626extern "C" {
7627 #[doc = " @noop FT_W32_GetOverlappedResult"]
7628 #[doc = " @par Supported Operating Systems"]
7629 #[doc = " Linux"]
7630 #[doc = " Mac OS X (10.4 and later)"]
7631 #[doc = " Windows (2000 and later)"]
7632 #[doc = " Windows CE (4.2 and later)"]
7633 #[doc = " @par Summary"]
7634 #[doc = " Gets the result of an overlapped operation."]
7635 #[doc = " @param ftHandle Handle of the device."]
7636 #[doc = " @param lpOverlapped Pointer to an overlapped structure."]
7637 #[doc = " @param lpdwBytesTransferred Pointer to a variable that receives the number of bytes transferred"]
7638 #[doc = " during the overlapped operation."]
7639 #[doc = " @param bWait Set to TRUE if the function does not return until the operation has been completed."]
7640 #[doc = " @returns"]
7641 #[doc = " If the function is successful, the return value is nonzero."]
7642 #[doc = " If the function is unsuccessful, the return value is zero."]
7643 #[doc = " @remarks"]
7644 #[doc = " This function is used with overlapped I/O and so is not supported in Linux, Mac OS X or Windows CE. For"]
7645 #[doc = " a description of its use, see FT_W32_ReadFile and FT_W32_WriteFile."]
7646 pub fn FT_W32_GetOverlappedResult(
7647 ftHandle: FT_HANDLE,
7648 lpOverlapped: LPOVERLAPPED,
7649 lpdwBytesTransferred: LPDWORD,
7650 bWait: BOOL,
7651 ) -> BOOL;
7652}
7653extern "C" {
7654 #[doc = " @noop FT_W32_EscapeCommFunction"]
7655 #[doc = " @par Supported Operating Systems"]
7656 #[doc = " Linux"]
7657 #[doc = " Mac OS X (10.4 and later)"]
7658 #[doc = " Windows (2000 and later)"]
7659 #[doc = " Windows CE (4.2 and later)"]
7660 #[doc = " @par Summary"]
7661 #[doc = " Perform an extended function."]
7662 #[doc = " @param ftHandle Handle of the device."]
7663 #[doc = " @param dwFunc The extended function to perform can be one of the following values:"]
7664 #[doc = " @li CLRDTR - Clear the DTR signal"]
7665 #[doc = " @li CLRRTS - Clear the RTS signal"]
7666 #[doc = " @li SETDTR - Set the DTR signal"]
7667 #[doc = " @li SETRTS - Set the RTS signal"]
7668 #[doc = " @li SETBREAK - Set the BREAK condition"]
7669 #[doc = " @li CLRBREAK - Clear the BREAK condition"]
7670 #[doc = " @returns"]
7671 #[doc = " If the function is successful, the return value is nonzero."]
7672 #[doc = " If the function is unsuccessful, the return value is zero."]
7673 pub fn FT_W32_EscapeCommFunction(ftHandle: FT_HANDLE, dwFunc: DWORD) -> BOOL;
7674}
7675extern "C" {
7676 #[doc = " @noop FT_W32_GetCommModemStatus"]
7677 #[doc = " @par Supported Operating Systems"]
7678 #[doc = " Linux"]
7679 #[doc = " Mac OS X (10.4 and later)"]
7680 #[doc = " Windows (2000 and later)"]
7681 #[doc = " Windows CE (4.2 and later)"]
7682 #[doc = " @par Summary"]
7683 #[doc = " This function gets the current modem control value."]
7684 #[doc = " @param ftHandle Handle of the device."]
7685 #[doc = " @param lpdwModemStatus Pointer to a variable to contain modem control value. The modem"]
7686 #[doc = " control value can be a combination of the following:"]
7687 #[doc = " @li MS_CTS_ON - Clear To Send (CTS) is on"]
7688 #[doc = " @li MS_DSR_ON - Data Set Ready (DSR) is on"]
7689 #[doc = " @li MS_RING_ON - Ring Indicator (RI) is on"]
7690 #[doc = " @li MS_RLSD_ON - Receive Line Signal Detect (RLSD) is on"]
7691 #[doc = " @returns"]
7692 #[doc = " If the function is successful, the return value is nonzero."]
7693 #[doc = " If the function is unsuccessful, the return value is zero."]
7694 pub fn FT_W32_GetCommModemStatus(ftHandle: FT_HANDLE, lpdwModemStatus: LPDWORD) -> BOOL;
7695}
7696extern "C" {
7697 #[doc = " @noop FT_W32_SetupComm"]
7698 #[doc = " @par Supported Operating Systems"]
7699 #[doc = " Linux"]
7700 #[doc = " Mac OS X (10.4 and later)"]
7701 #[doc = " Windows (2000 and later)"]
7702 #[doc = " Windows CE (4.2 and later)"]
7703 #[doc = " @par Summary"]
7704 #[doc = " This function sets the read and write buffers."]
7705 #[doc = " @param ftHandle Handle of the device."]
7706 #[doc = " @param dwReadBufferSize Length, in bytes, of the read buffer."]
7707 #[doc = " @param dwWriteBufferSize Length, in bytes, of the write buffer."]
7708 #[doc = " @returns"]
7709 #[doc = " If the function is successful, the return value is nonzero."]
7710 #[doc = " If the function is unsuccessful, the return value is zero."]
7711 #[doc = " @remarks"]
7712 #[doc = " This function has no effect. It is the responsibility of the driver to allocate sufficient"]
7713 #[doc = " storage for I/O requests."]
7714 pub fn FT_W32_SetupComm(
7715 ftHandle: FT_HANDLE,
7716 dwReadBufferSize: DWORD,
7717 dwWriteBufferSize: DWORD,
7718 ) -> BOOL;
7719}
7720#[doc = " Structure for FT_W32_ClearCommError lpftComstat parameter."]
7721#[doc = " @see FT_W32_ClearCommError"]
7722#[repr(C)]
7723#[derive(Debug, Copy, Clone)]
7724pub struct _FTCOMSTAT {
7725 pub _bitfield_align_1: [u32; 0],
7726 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
7727 pub cbInQue: DWORD,
7728 pub cbOutQue: DWORD,
7729}
7730#[test]
7731fn bindgen_test_layout__FTCOMSTAT() {
7732 assert_eq!(
7733 ::std::mem::size_of::<_FTCOMSTAT>(),
7734 12usize,
7735 concat!("Size of: ", stringify!(_FTCOMSTAT))
7736 );
7737 assert_eq!(
7738 ::std::mem::align_of::<_FTCOMSTAT>(),
7739 4usize,
7740 concat!("Alignment of ", stringify!(_FTCOMSTAT))
7741 );
7742 assert_eq!(
7743 unsafe { &(*(::std::ptr::null::<_FTCOMSTAT>())).cbInQue as *const _ as usize },
7744 4usize,
7745 concat!(
7746 "Offset of field: ",
7747 stringify!(_FTCOMSTAT),
7748 "::",
7749 stringify!(cbInQue)
7750 )
7751 );
7752 assert_eq!(
7753 unsafe { &(*(::std::ptr::null::<_FTCOMSTAT>())).cbOutQue as *const _ as usize },
7754 8usize,
7755 concat!(
7756 "Offset of field: ",
7757 stringify!(_FTCOMSTAT),
7758 "::",
7759 stringify!(cbOutQue)
7760 )
7761 );
7762}
7763impl _FTCOMSTAT {
7764 #[inline]
7765 pub fn fCtsHold(&self) -> DWORD {
7766 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
7767 }
7768 #[inline]
7769 pub fn set_fCtsHold(&mut self, val: DWORD) {
7770 unsafe {
7771 let val: u32 = ::std::mem::transmute(val);
7772 self._bitfield_1.set(0usize, 1u8, val as u64)
7773 }
7774 }
7775 #[inline]
7776 pub fn fDsrHold(&self) -> DWORD {
7777 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
7778 }
7779 #[inline]
7780 pub fn set_fDsrHold(&mut self, val: DWORD) {
7781 unsafe {
7782 let val: u32 = ::std::mem::transmute(val);
7783 self._bitfield_1.set(1usize, 1u8, val as u64)
7784 }
7785 }
7786 #[inline]
7787 pub fn fRlsdHold(&self) -> DWORD {
7788 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
7789 }
7790 #[inline]
7791 pub fn set_fRlsdHold(&mut self, val: DWORD) {
7792 unsafe {
7793 let val: u32 = ::std::mem::transmute(val);
7794 self._bitfield_1.set(2usize, 1u8, val as u64)
7795 }
7796 }
7797 #[inline]
7798 pub fn fXoffHold(&self) -> DWORD {
7799 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
7800 }
7801 #[inline]
7802 pub fn set_fXoffHold(&mut self, val: DWORD) {
7803 unsafe {
7804 let val: u32 = ::std::mem::transmute(val);
7805 self._bitfield_1.set(3usize, 1u8, val as u64)
7806 }
7807 }
7808 #[inline]
7809 pub fn fXoffSent(&self) -> DWORD {
7810 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
7811 }
7812 #[inline]
7813 pub fn set_fXoffSent(&mut self, val: DWORD) {
7814 unsafe {
7815 let val: u32 = ::std::mem::transmute(val);
7816 self._bitfield_1.set(4usize, 1u8, val as u64)
7817 }
7818 }
7819 #[inline]
7820 pub fn fEof(&self) -> DWORD {
7821 unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) }
7822 }
7823 #[inline]
7824 pub fn set_fEof(&mut self, val: DWORD) {
7825 unsafe {
7826 let val: u32 = ::std::mem::transmute(val);
7827 self._bitfield_1.set(5usize, 1u8, val as u64)
7828 }
7829 }
7830 #[inline]
7831 pub fn fTxim(&self) -> DWORD {
7832 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) }
7833 }
7834 #[inline]
7835 pub fn set_fTxim(&mut self, val: DWORD) {
7836 unsafe {
7837 let val: u32 = ::std::mem::transmute(val);
7838 self._bitfield_1.set(6usize, 1u8, val as u64)
7839 }
7840 }
7841 #[inline]
7842 pub fn fReserved(&self) -> DWORD {
7843 unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 25u8) as u32) }
7844 }
7845 #[inline]
7846 pub fn set_fReserved(&mut self, val: DWORD) {
7847 unsafe {
7848 let val: u32 = ::std::mem::transmute(val);
7849 self._bitfield_1.set(7usize, 25u8, val as u64)
7850 }
7851 }
7852 #[inline]
7853 pub fn new_bitfield_1(
7854 fCtsHold: DWORD,
7855 fDsrHold: DWORD,
7856 fRlsdHold: DWORD,
7857 fXoffHold: DWORD,
7858 fXoffSent: DWORD,
7859 fEof: DWORD,
7860 fTxim: DWORD,
7861 fReserved: DWORD,
7862 ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
7863 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
7864 __bindgen_bitfield_unit.set(0usize, 1u8, {
7865 let fCtsHold: u32 = unsafe { ::std::mem::transmute(fCtsHold) };
7866 fCtsHold as u64
7867 });
7868 __bindgen_bitfield_unit.set(1usize, 1u8, {
7869 let fDsrHold: u32 = unsafe { ::std::mem::transmute(fDsrHold) };
7870 fDsrHold as u64
7871 });
7872 __bindgen_bitfield_unit.set(2usize, 1u8, {
7873 let fRlsdHold: u32 = unsafe { ::std::mem::transmute(fRlsdHold) };
7874 fRlsdHold as u64
7875 });
7876 __bindgen_bitfield_unit.set(3usize, 1u8, {
7877 let fXoffHold: u32 = unsafe { ::std::mem::transmute(fXoffHold) };
7878 fXoffHold as u64
7879 });
7880 __bindgen_bitfield_unit.set(4usize, 1u8, {
7881 let fXoffSent: u32 = unsafe { ::std::mem::transmute(fXoffSent) };
7882 fXoffSent as u64
7883 });
7884 __bindgen_bitfield_unit.set(5usize, 1u8, {
7885 let fEof: u32 = unsafe { ::std::mem::transmute(fEof) };
7886 fEof as u64
7887 });
7888 __bindgen_bitfield_unit.set(6usize, 1u8, {
7889 let fTxim: u32 = unsafe { ::std::mem::transmute(fTxim) };
7890 fTxim as u64
7891 });
7892 __bindgen_bitfield_unit.set(7usize, 25u8, {
7893 let fReserved: u32 = unsafe { ::std::mem::transmute(fReserved) };
7894 fReserved as u64
7895 });
7896 __bindgen_bitfield_unit
7897 }
7898}
7899#[doc = " Structure for FT_W32_ClearCommError lpftComstat parameter."]
7900#[doc = " @see FT_W32_ClearCommError"]
7901pub type LPFTCOMSTAT = *mut _FTCOMSTAT;
7902#[doc = " Structure for FT_W32_SetCommState and FT_W32_GetCommState lpftDcb parameter."]
7903#[doc = " @see FT_W32_SetCommState"]
7904#[doc = " @see FT_W32_GetCommState"]
7905#[repr(C)]
7906#[derive(Debug, Copy, Clone)]
7907pub struct _FTDCB {
7908 pub DCBlength: DWORD,
7909 #[doc = " sizeof(FTDCB)"]
7910 pub BaudRate: DWORD,
7911 pub _bitfield_align_1: [u32; 0],
7912 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
7913 #[doc = " Reserved"]
7914 pub wReserved: WORD,
7915 #[doc = " Not currently used"]
7916 pub XonLim: WORD,
7917 #[doc = " Transmit X-ON threshold"]
7918 pub XoffLim: WORD,
7919 #[doc = " Transmit X-OFF threshold"]
7920 pub ByteSize: BYTE,
7921 #[doc = " Number of bits/byte, 4-8"]
7922 pub Parity: BYTE,
7923 #[doc = " 0-4=None,Odd,Even,Mark,Space"]
7924 pub StopBits: BYTE,
7925 #[doc = " FT_STOP_BITS_1 or FT_STOP_BITS_2"]
7926 pub XonChar: ::std::os::raw::c_char,
7927 #[doc = " Tx and Rx X-ON character"]
7928 pub XoffChar: ::std::os::raw::c_char,
7929 #[doc = " Tx and Rx X-OFF character"]
7930 pub ErrorChar: ::std::os::raw::c_char,
7931 #[doc = " Error replacement char"]
7932 pub EofChar: ::std::os::raw::c_char,
7933 #[doc = " End of Input character"]
7934 pub EvtChar: ::std::os::raw::c_char,
7935 #[doc = " Received Event character"]
7936 pub wReserved1: WORD,
7937}
7938#[test]
7939fn bindgen_test_layout__FTDCB() {
7940 assert_eq!(
7941 ::std::mem::size_of::<_FTDCB>(),
7942 28usize,
7943 concat!("Size of: ", stringify!(_FTDCB))
7944 );
7945 assert_eq!(
7946 ::std::mem::align_of::<_FTDCB>(),
7947 4usize,
7948 concat!("Alignment of ", stringify!(_FTDCB))
7949 );
7950 assert_eq!(
7951 unsafe { &(*(::std::ptr::null::<_FTDCB>())).DCBlength as *const _ as usize },
7952 0usize,
7953 concat!(
7954 "Offset of field: ",
7955 stringify!(_FTDCB),
7956 "::",
7957 stringify!(DCBlength)
7958 )
7959 );
7960 assert_eq!(
7961 unsafe { &(*(::std::ptr::null::<_FTDCB>())).BaudRate as *const _ as usize },
7962 4usize,
7963 concat!(
7964 "Offset of field: ",
7965 stringify!(_FTDCB),
7966 "::",
7967 stringify!(BaudRate)
7968 )
7969 );
7970 assert_eq!(
7971 unsafe { &(*(::std::ptr::null::<_FTDCB>())).wReserved as *const _ as usize },
7972 12usize,
7973 concat!(
7974 "Offset of field: ",
7975 stringify!(_FTDCB),
7976 "::",
7977 stringify!(wReserved)
7978 )
7979 );
7980 assert_eq!(
7981 unsafe { &(*(::std::ptr::null::<_FTDCB>())).XonLim as *const _ as usize },
7982 14usize,
7983 concat!(
7984 "Offset of field: ",
7985 stringify!(_FTDCB),
7986 "::",
7987 stringify!(XonLim)
7988 )
7989 );
7990 assert_eq!(
7991 unsafe { &(*(::std::ptr::null::<_FTDCB>())).XoffLim as *const _ as usize },
7992 16usize,
7993 concat!(
7994 "Offset of field: ",
7995 stringify!(_FTDCB),
7996 "::",
7997 stringify!(XoffLim)
7998 )
7999 );
8000 assert_eq!(
8001 unsafe { &(*(::std::ptr::null::<_FTDCB>())).ByteSize as *const _ as usize },
8002 18usize,
8003 concat!(
8004 "Offset of field: ",
8005 stringify!(_FTDCB),
8006 "::",
8007 stringify!(ByteSize)
8008 )
8009 );
8010 assert_eq!(
8011 unsafe { &(*(::std::ptr::null::<_FTDCB>())).Parity as *const _ as usize },
8012 19usize,
8013 concat!(
8014 "Offset of field: ",
8015 stringify!(_FTDCB),
8016 "::",
8017 stringify!(Parity)
8018 )
8019 );
8020 assert_eq!(
8021 unsafe { &(*(::std::ptr::null::<_FTDCB>())).StopBits as *const _ as usize },
8022 20usize,
8023 concat!(
8024 "Offset of field: ",
8025 stringify!(_FTDCB),
8026 "::",
8027 stringify!(StopBits)
8028 )
8029 );
8030 assert_eq!(
8031 unsafe { &(*(::std::ptr::null::<_FTDCB>())).XonChar as *const _ as usize },
8032 21usize,
8033 concat!(
8034 "Offset of field: ",
8035 stringify!(_FTDCB),
8036 "::",
8037 stringify!(XonChar)
8038 )
8039 );
8040 assert_eq!(
8041 unsafe { &(*(::std::ptr::null::<_FTDCB>())).XoffChar as *const _ as usize },
8042 22usize,
8043 concat!(
8044 "Offset of field: ",
8045 stringify!(_FTDCB),
8046 "::",
8047 stringify!(XoffChar)
8048 )
8049 );
8050 assert_eq!(
8051 unsafe { &(*(::std::ptr::null::<_FTDCB>())).ErrorChar as *const _ as usize },
8052 23usize,
8053 concat!(
8054 "Offset of field: ",
8055 stringify!(_FTDCB),
8056 "::",
8057 stringify!(ErrorChar)
8058 )
8059 );
8060 assert_eq!(
8061 unsafe { &(*(::std::ptr::null::<_FTDCB>())).EofChar as *const _ as usize },
8062 24usize,
8063 concat!(
8064 "Offset of field: ",
8065 stringify!(_FTDCB),
8066 "::",
8067 stringify!(EofChar)
8068 )
8069 );
8070 assert_eq!(
8071 unsafe { &(*(::std::ptr::null::<_FTDCB>())).EvtChar as *const _ as usize },
8072 25usize,
8073 concat!(
8074 "Offset of field: ",
8075 stringify!(_FTDCB),
8076 "::",
8077 stringify!(EvtChar)
8078 )
8079 );
8080 assert_eq!(
8081 unsafe { &(*(::std::ptr::null::<_FTDCB>())).wReserved1 as *const _ as usize },
8082 26usize,
8083 concat!(
8084 "Offset of field: ",
8085 stringify!(_FTDCB),
8086 "::",
8087 stringify!(wReserved1)
8088 )
8089 );
8090}
8091impl _FTDCB {
8092 #[inline]
8093 pub fn fBinary(&self) -> DWORD {
8094 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
8095 }
8096 #[inline]
8097 pub fn set_fBinary(&mut self, val: DWORD) {
8098 unsafe {
8099 let val: u32 = ::std::mem::transmute(val);
8100 self._bitfield_1.set(0usize, 1u8, val as u64)
8101 }
8102 }
8103 #[inline]
8104 pub fn fParity(&self) -> DWORD {
8105 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
8106 }
8107 #[inline]
8108 pub fn set_fParity(&mut self, val: DWORD) {
8109 unsafe {
8110 let val: u32 = ::std::mem::transmute(val);
8111 self._bitfield_1.set(1usize, 1u8, val as u64)
8112 }
8113 }
8114 #[inline]
8115 pub fn fOutxCtsFlow(&self) -> DWORD {
8116 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
8117 }
8118 #[inline]
8119 pub fn set_fOutxCtsFlow(&mut self, val: DWORD) {
8120 unsafe {
8121 let val: u32 = ::std::mem::transmute(val);
8122 self._bitfield_1.set(2usize, 1u8, val as u64)
8123 }
8124 }
8125 #[inline]
8126 pub fn fOutxDsrFlow(&self) -> DWORD {
8127 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
8128 }
8129 #[inline]
8130 pub fn set_fOutxDsrFlow(&mut self, val: DWORD) {
8131 unsafe {
8132 let val: u32 = ::std::mem::transmute(val);
8133 self._bitfield_1.set(3usize, 1u8, val as u64)
8134 }
8135 }
8136 #[inline]
8137 pub fn fDtrControl(&self) -> DWORD {
8138 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 2u8) as u32) }
8139 }
8140 #[inline]
8141 pub fn set_fDtrControl(&mut self, val: DWORD) {
8142 unsafe {
8143 let val: u32 = ::std::mem::transmute(val);
8144 self._bitfield_1.set(4usize, 2u8, val as u64)
8145 }
8146 }
8147 #[inline]
8148 pub fn fDsrSensitivity(&self) -> DWORD {
8149 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) }
8150 }
8151 #[inline]
8152 pub fn set_fDsrSensitivity(&mut self, val: DWORD) {
8153 unsafe {
8154 let val: u32 = ::std::mem::transmute(val);
8155 self._bitfield_1.set(6usize, 1u8, val as u64)
8156 }
8157 }
8158 #[inline]
8159 pub fn fTXContinueOnXoff(&self) -> DWORD {
8160 unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) }
8161 }
8162 #[inline]
8163 pub fn set_fTXContinueOnXoff(&mut self, val: DWORD) {
8164 unsafe {
8165 let val: u32 = ::std::mem::transmute(val);
8166 self._bitfield_1.set(7usize, 1u8, val as u64)
8167 }
8168 }
8169 #[inline]
8170 pub fn fOutX(&self) -> DWORD {
8171 unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) }
8172 }
8173 #[inline]
8174 pub fn set_fOutX(&mut self, val: DWORD) {
8175 unsafe {
8176 let val: u32 = ::std::mem::transmute(val);
8177 self._bitfield_1.set(8usize, 1u8, val as u64)
8178 }
8179 }
8180 #[inline]
8181 pub fn fInX(&self) -> DWORD {
8182 unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) }
8183 }
8184 #[inline]
8185 pub fn set_fInX(&mut self, val: DWORD) {
8186 unsafe {
8187 let val: u32 = ::std::mem::transmute(val);
8188 self._bitfield_1.set(9usize, 1u8, val as u64)
8189 }
8190 }
8191 #[inline]
8192 pub fn fErrorChar(&self) -> DWORD {
8193 unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) }
8194 }
8195 #[inline]
8196 pub fn set_fErrorChar(&mut self, val: DWORD) {
8197 unsafe {
8198 let val: u32 = ::std::mem::transmute(val);
8199 self._bitfield_1.set(10usize, 1u8, val as u64)
8200 }
8201 }
8202 #[inline]
8203 pub fn fNull(&self) -> DWORD {
8204 unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) }
8205 }
8206 #[inline]
8207 pub fn set_fNull(&mut self, val: DWORD) {
8208 unsafe {
8209 let val: u32 = ::std::mem::transmute(val);
8210 self._bitfield_1.set(11usize, 1u8, val as u64)
8211 }
8212 }
8213 #[inline]
8214 pub fn fRtsControl(&self) -> DWORD {
8215 unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 2u8) as u32) }
8216 }
8217 #[inline]
8218 pub fn set_fRtsControl(&mut self, val: DWORD) {
8219 unsafe {
8220 let val: u32 = ::std::mem::transmute(val);
8221 self._bitfield_1.set(12usize, 2u8, val as u64)
8222 }
8223 }
8224 #[inline]
8225 pub fn fAbortOnError(&self) -> DWORD {
8226 unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) }
8227 }
8228 #[inline]
8229 pub fn set_fAbortOnError(&mut self, val: DWORD) {
8230 unsafe {
8231 let val: u32 = ::std::mem::transmute(val);
8232 self._bitfield_1.set(14usize, 1u8, val as u64)
8233 }
8234 }
8235 #[inline]
8236 pub fn fDummy2(&self) -> DWORD {
8237 unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 17u8) as u32) }
8238 }
8239 #[inline]
8240 pub fn set_fDummy2(&mut self, val: DWORD) {
8241 unsafe {
8242 let val: u32 = ::std::mem::transmute(val);
8243 self._bitfield_1.set(15usize, 17u8, val as u64)
8244 }
8245 }
8246 #[inline]
8247 pub fn new_bitfield_1(
8248 fBinary: DWORD,
8249 fParity: DWORD,
8250 fOutxCtsFlow: DWORD,
8251 fOutxDsrFlow: DWORD,
8252 fDtrControl: DWORD,
8253 fDsrSensitivity: DWORD,
8254 fTXContinueOnXoff: DWORD,
8255 fOutX: DWORD,
8256 fInX: DWORD,
8257 fErrorChar: DWORD,
8258 fNull: DWORD,
8259 fRtsControl: DWORD,
8260 fAbortOnError: DWORD,
8261 fDummy2: DWORD,
8262 ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
8263 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
8264 __bindgen_bitfield_unit.set(0usize, 1u8, {
8265 let fBinary: u32 = unsafe { ::std::mem::transmute(fBinary) };
8266 fBinary as u64
8267 });
8268 __bindgen_bitfield_unit.set(1usize, 1u8, {
8269 let fParity: u32 = unsafe { ::std::mem::transmute(fParity) };
8270 fParity as u64
8271 });
8272 __bindgen_bitfield_unit.set(2usize, 1u8, {
8273 let fOutxCtsFlow: u32 = unsafe { ::std::mem::transmute(fOutxCtsFlow) };
8274 fOutxCtsFlow as u64
8275 });
8276 __bindgen_bitfield_unit.set(3usize, 1u8, {
8277 let fOutxDsrFlow: u32 = unsafe { ::std::mem::transmute(fOutxDsrFlow) };
8278 fOutxDsrFlow as u64
8279 });
8280 __bindgen_bitfield_unit.set(4usize, 2u8, {
8281 let fDtrControl: u32 = unsafe { ::std::mem::transmute(fDtrControl) };
8282 fDtrControl as u64
8283 });
8284 __bindgen_bitfield_unit.set(6usize, 1u8, {
8285 let fDsrSensitivity: u32 = unsafe { ::std::mem::transmute(fDsrSensitivity) };
8286 fDsrSensitivity as u64
8287 });
8288 __bindgen_bitfield_unit.set(7usize, 1u8, {
8289 let fTXContinueOnXoff: u32 = unsafe { ::std::mem::transmute(fTXContinueOnXoff) };
8290 fTXContinueOnXoff as u64
8291 });
8292 __bindgen_bitfield_unit.set(8usize, 1u8, {
8293 let fOutX: u32 = unsafe { ::std::mem::transmute(fOutX) };
8294 fOutX as u64
8295 });
8296 __bindgen_bitfield_unit.set(9usize, 1u8, {
8297 let fInX: u32 = unsafe { ::std::mem::transmute(fInX) };
8298 fInX as u64
8299 });
8300 __bindgen_bitfield_unit.set(10usize, 1u8, {
8301 let fErrorChar: u32 = unsafe { ::std::mem::transmute(fErrorChar) };
8302 fErrorChar as u64
8303 });
8304 __bindgen_bitfield_unit.set(11usize, 1u8, {
8305 let fNull: u32 = unsafe { ::std::mem::transmute(fNull) };
8306 fNull as u64
8307 });
8308 __bindgen_bitfield_unit.set(12usize, 2u8, {
8309 let fRtsControl: u32 = unsafe { ::std::mem::transmute(fRtsControl) };
8310 fRtsControl as u64
8311 });
8312 __bindgen_bitfield_unit.set(14usize, 1u8, {
8313 let fAbortOnError: u32 = unsafe { ::std::mem::transmute(fAbortOnError) };
8314 fAbortOnError as u64
8315 });
8316 __bindgen_bitfield_unit.set(15usize, 17u8, {
8317 let fDummy2: u32 = unsafe { ::std::mem::transmute(fDummy2) };
8318 fDummy2 as u64
8319 });
8320 __bindgen_bitfield_unit
8321 }
8322}
8323#[doc = " Structure for FT_W32_SetCommState and FT_W32_GetCommState lpftDcb parameter."]
8324#[doc = " @see FT_W32_SetCommState"]
8325#[doc = " @see FT_W32_GetCommState"]
8326pub type LPFTDCB = *mut _FTDCB;
8327#[doc = " Structure for FT_W32_SetCommTimeouts and FT_W32_GetCommTimeouts lpftTimeouts parameter."]
8328#[doc = " @see FT_W32_SetCommTimeouts"]
8329#[doc = " @see FT_W32_GetCommTimeouts"]
8330#[repr(C)]
8331#[derive(Debug, Copy, Clone)]
8332pub struct _FTTIMEOUTS {
8333 pub ReadIntervalTimeout: DWORD,
8334 #[doc = " Maximum time between read chars."]
8335 pub ReadTotalTimeoutMultiplier: DWORD,
8336 #[doc = " Multiplier of characters."]
8337 pub ReadTotalTimeoutConstant: DWORD,
8338 #[doc = " Constant in milliseconds."]
8339 pub WriteTotalTimeoutMultiplier: DWORD,
8340 #[doc = " Multiplier of characters."]
8341 pub WriteTotalTimeoutConstant: DWORD,
8342}
8343#[test]
8344fn bindgen_test_layout__FTTIMEOUTS() {
8345 assert_eq!(
8346 ::std::mem::size_of::<_FTTIMEOUTS>(),
8347 20usize,
8348 concat!("Size of: ", stringify!(_FTTIMEOUTS))
8349 );
8350 assert_eq!(
8351 ::std::mem::align_of::<_FTTIMEOUTS>(),
8352 4usize,
8353 concat!("Alignment of ", stringify!(_FTTIMEOUTS))
8354 );
8355 assert_eq!(
8356 unsafe { &(*(::std::ptr::null::<_FTTIMEOUTS>())).ReadIntervalTimeout as *const _ as usize },
8357 0usize,
8358 concat!(
8359 "Offset of field: ",
8360 stringify!(_FTTIMEOUTS),
8361 "::",
8362 stringify!(ReadIntervalTimeout)
8363 )
8364 );
8365 assert_eq!(
8366 unsafe {
8367 &(*(::std::ptr::null::<_FTTIMEOUTS>())).ReadTotalTimeoutMultiplier as *const _ as usize
8368 },
8369 4usize,
8370 concat!(
8371 "Offset of field: ",
8372 stringify!(_FTTIMEOUTS),
8373 "::",
8374 stringify!(ReadTotalTimeoutMultiplier)
8375 )
8376 );
8377 assert_eq!(
8378 unsafe {
8379 &(*(::std::ptr::null::<_FTTIMEOUTS>())).ReadTotalTimeoutConstant as *const _ as usize
8380 },
8381 8usize,
8382 concat!(
8383 "Offset of field: ",
8384 stringify!(_FTTIMEOUTS),
8385 "::",
8386 stringify!(ReadTotalTimeoutConstant)
8387 )
8388 );
8389 assert_eq!(
8390 unsafe {
8391 &(*(::std::ptr::null::<_FTTIMEOUTS>())).WriteTotalTimeoutMultiplier as *const _ as usize
8392 },
8393 12usize,
8394 concat!(
8395 "Offset of field: ",
8396 stringify!(_FTTIMEOUTS),
8397 "::",
8398 stringify!(WriteTotalTimeoutMultiplier)
8399 )
8400 );
8401 assert_eq!(
8402 unsafe {
8403 &(*(::std::ptr::null::<_FTTIMEOUTS>())).WriteTotalTimeoutConstant as *const _ as usize
8404 },
8405 16usize,
8406 concat!(
8407 "Offset of field: ",
8408 stringify!(_FTTIMEOUTS),
8409 "::",
8410 stringify!(WriteTotalTimeoutConstant)
8411 )
8412 );
8413}
8414#[doc = " Structure for FT_W32_SetCommTimeouts and FT_W32_GetCommTimeouts lpftTimeouts parameter."]
8415#[doc = " @see FT_W32_SetCommTimeouts"]
8416#[doc = " @see FT_W32_GetCommTimeouts"]
8417pub type FTTIMEOUTS = _FTTIMEOUTS;
8418extern "C" {
8419 #[doc = " @noop FT_W32_SetCommState"]
8420 #[doc = " @par Supported Operating Systems"]
8421 #[doc = " Linux"]
8422 #[doc = " Mac OS X (10.4 and later)"]
8423 #[doc = " Windows (2000 and later)"]
8424 #[doc = " Windows CE (4.2 and later)"]
8425 #[doc = " @par Summary"]
8426 #[doc = " This function sets the state of the device according to the contents of a device control block (DCB)."]
8427 #[doc = " @param ftHandle Handle of the device."]
8428 #[doc = " @param lpftDcb Pointer to an FTDCB structure."]
8429 #[doc = " @returns"]
8430 #[doc = " If the function is successful, the return value is nonzero."]
8431 #[doc = " If the function is unsuccessful, the return value is zero."]
8432 pub fn FT_W32_SetCommState(ftHandle: FT_HANDLE, lpftDcb: LPFTDCB) -> BOOL;
8433}
8434extern "C" {
8435 #[doc = " @noop FT_W32_GetCommState"]
8436 #[doc = " @par Supported Operating Systems"]
8437 #[doc = " Linux"]
8438 #[doc = " Mac OS X (10.4 and later)"]
8439 #[doc = " Windows (2000 and later)"]
8440 #[doc = " Windows CE (4.2 and later)"]
8441 #[doc = " @par Summary"]
8442 #[doc = " This function gets the current device state."]
8443 #[doc = " @param ftHandle Handle of the device."]
8444 #[doc = " @param lpftDcb Pointer to an FTDCB structure."]
8445 #[doc = " @returns"]
8446 #[doc = " If the function is successful, the return value is nonzero."]
8447 #[doc = " If the function is unsuccessful, the return value is zero."]
8448 #[doc = " @remarks"]
8449 #[doc = " The current state of the device is returned in a device control block."]
8450 pub fn FT_W32_GetCommState(ftHandle: FT_HANDLE, lpftDcb: LPFTDCB) -> BOOL;
8451}
8452extern "C" {
8453 #[doc = " @noop FT_W32_SetCommTimeouts"]
8454 #[doc = " @par Supported Operating Systems"]
8455 #[doc = " Linux"]
8456 #[doc = " Mac OS X (10.4 and later)"]
8457 #[doc = " Windows (2000 and later)"]
8458 #[doc = " Windows CE (4.2 and later)"]
8459 #[doc = " @par Summary"]
8460 #[doc = " This function sets the timeout parameters for I/O requests."]
8461 #[doc = " @param ftHandle Handle of the device."]
8462 #[doc = " @param pftTimeouts Pointer to an FTTIMEOUTS structure to store timeout information."]
8463 #[doc = " @returns"]
8464 #[doc = " If the function is unsuccessful, the return value is zero."]
8465 #[doc = " @remarks"]
8466 #[doc = " Timeouts are calculated using the information in the FTTIMEOUTS structure."]
8467 #[doc = " @n For read requests, the number of bytes to be read is multiplied by the total timeout"]
8468 #[doc = " multiplier, and added to the total timeout constant. So, if TS is an FTTIMEOUTS structure"]
8469 #[doc = " and the number of bytes to read is dwToRead, the read timeout, rdTO, is calculated as follows."]
8470 #[doc = " @n rdTO = (dwToRead * TS.ReadTotalTimeoutMultiplier) + TS.ReadTotalTimeoutConstant"]
8471 #[doc = " @n For write requests, the number of bytes to be written is multiplied by the total timeout"]
8472 #[doc = " multiplier, and added to the total timeout constant. So, if TS is an FTTIMEOUTS structure"]
8473 #[doc = " and the number of bytes to write is dwToWrite, the write timeout, wrTO, is calculated as follows."]
8474 #[doc = " @n wrTO = (dwToWrite * TS.WriteTotalTimeoutMultiplier) + TS.WriteTotalTimeoutConstant"]
8475 #[doc = " @n Linux and Mac OS X currently ignore the ReadIntervalTimeout, ReadTotalTimeoutMultiplier and"]
8476 #[doc = " WriteTotalTimeoutMultiplier."]
8477 pub fn FT_W32_SetCommTimeouts(ftHandle: FT_HANDLE, pftTimeouts: *mut FTTIMEOUTS) -> BOOL;
8478}
8479extern "C" {
8480 #[doc = " @noop FT_W32_GetCommTimeouts"]
8481 #[doc = " @par Supported Operating Systems"]
8482 #[doc = " Linux"]
8483 #[doc = " Mac OS X (10.4 and later)"]
8484 #[doc = " Windows (2000 and later)"]
8485 #[doc = " Windows CE (4.2 and later)"]
8486 #[doc = " @par Summary"]
8487 #[doc = " This function gets the current read and write request timeout parameters for the specified device."]
8488 #[doc = " @param ftHandle Handle of the device."]
8489 #[doc = " @param pftTimeouts Pointer to an FTTIMEOUTS structure to store timeout information."]
8490 #[doc = " @returns"]
8491 #[doc = " If the function is successful, the return value is nonzero."]
8492 #[doc = " If the function is unsuccessful, the return value is zero."]
8493 #[doc = " @remarks"]
8494 #[doc = " For an explanation of how timeouts are used, see FT_W32_SetCommTimeouts."]
8495 pub fn FT_W32_GetCommTimeouts(ftHandle: FT_HANDLE, pftTimeouts: *mut FTTIMEOUTS) -> BOOL;
8496}
8497extern "C" {
8498 #[doc = " @noop FT_W32_SetCommBreak"]
8499 #[doc = " @par Supported Operating Systems"]
8500 #[doc = " Linux"]
8501 #[doc = " Mac OS X (10.4 and later)"]
8502 #[doc = " Windows (2000 and later)"]
8503 #[doc = " Windows CE (4.2 and later)"]
8504 #[doc = " @par Summary"]
8505 #[doc = " Puts the communications line in the BREAK state."]
8506 #[doc = " @param ftHandle Handle of the device."]
8507 #[doc = " @returns"]
8508 #[doc = " If the function is successful, the return value is nonzero."]
8509 #[doc = " If the function is unsuccessful, the return value is zero."]
8510 pub fn FT_W32_SetCommBreak(ftHandle: FT_HANDLE) -> BOOL;
8511}
8512extern "C" {
8513 #[doc = " @noop FT_W32_ClearCommBreak"]
8514 #[doc = " @par Supported Operating Systems"]
8515 #[doc = " Linux"]
8516 #[doc = " Mac OS X (10.4 and later)"]
8517 #[doc = " Windows (2000 and later)"]
8518 #[doc = " Windows CE (4.2 and later)"]
8519 #[doc = " @par Summary"]
8520 #[doc = " Puts the communications line in the non-BREAK state."]
8521 #[doc = " @param ftHandle Handle of the device."]
8522 #[doc = " @returns"]
8523 #[doc = " If the function is successful, the return value is nonzero."]
8524 #[doc = " If the function is unsuccessful, the return value is zero."]
8525 pub fn FT_W32_ClearCommBreak(ftHandle: FT_HANDLE) -> BOOL;
8526}
8527extern "C" {
8528 #[doc = " @noop FT_W32_SetCommMask"]
8529 #[doc = " @par Supported Operating Systems"]
8530 #[doc = " Linux"]
8531 #[doc = " Mac OS X (10.4 and later)"]
8532 #[doc = " Windows (2000 and later)"]
8533 #[doc = " Windows CE (4.2 and later)"]
8534 #[doc = " @par Summary"]
8535 #[doc = " This function specifies events that the device has to monitor."]
8536 #[doc = " @param ftHandle Handle of the device."]
8537 #[doc = " @param ulEventMask Mask containing events that the device has to monitor. This can be a combination of"]
8538 #[doc = " the following:"]
8539 #[doc = " @li EV_BREAK - BREAK condition detected"]
8540 #[doc = " @li EV_CTS - Change in Clear To Send (CTS)"]
8541 #[doc = " @li EV_DSR - Change in Data Set Ready (DSR)"]
8542 #[doc = " @li EV_ERR - Error in line status"]
8543 #[doc = " @li EV_RING - Change in Ring Indicator (RI)"]
8544 #[doc = " @li EV_RLSD - Change in Receive Line Signal Detect (RLSD)"]
8545 #[doc = " @li EV_RXCHAR - Character received"]
8546 #[doc = " @li EV_RXFLAG - Event character received"]
8547 #[doc = " @li EV_TXEMPTY - Transmitter empty"]
8548 #[doc = " @returns"]
8549 #[doc = " If the function is successful, the return value is nonzero."]
8550 #[doc = " If the function is unsuccessful, the return value is zero."]
8551 #[doc = " @remarks"]
8552 #[doc = " This function specifies the events that the device should monitor. An application can call the"]
8553 #[doc = " function FT_W32_WaitCommEvent to wait for an event to occur."]
8554 pub fn FT_W32_SetCommMask(ftHandle: FT_HANDLE, ulEventMask: ULONG) -> BOOL;
8555}
8556extern "C" {
8557 #[doc = " @noop 6 FT_W32_GetCommMask"]
8558 #[doc = " @par Supported Operating Systems"]
8559 #[doc = " Windows (2000 and later)"]
8560 #[doc = " @par Summary"]
8561 #[doc = " Retrieves the events that are currently being monitored by a device."]
8562 #[doc = " @param ftHandle Handle of the device."]
8563 #[doc = " @param lpdwEventMask Pointer to a location that receives a mask that contains the events that are"]
8564 #[doc = " currently enabled. This parameter can be one or more of the following values:"]
8565 #[doc = " @li EV_BREAK - BREAK condition detected"]
8566 #[doc = " @li EV_CTS - Change in Clear To Send (CTS)"]
8567 #[doc = " @li EV_DSR - Change in Data Set Ready (DSR)"]
8568 #[doc = " @li EV_ERR - Error in line status"]
8569 #[doc = " @li EV_RING - Change in Ring Indicator (RI)"]
8570 #[doc = " @li EV_RLSD - Change in Receive Line Signal Detect (RLSD)"]
8571 #[doc = " @li EV_RXCHAR - Character received"]
8572 #[doc = " @li EV_RXFLAG - Event character received"]
8573 #[doc = " @li EV_TXEMPTY - Transmitter empty"]
8574 #[doc = " @returns"]
8575 #[doc = " If the function is successful, the return value is nonzero."]
8576 #[doc = " If the function is unsuccessful, the return value is zero."]
8577 #[doc = " @remarks"]
8578 #[doc = " This function returns events currently being monitored by the device. Event monitoring for these"]
8579 #[doc = " events is enabled by the FT_W32_SetCommMask function."]
8580 pub fn FT_W32_GetCommMask(ftHandle: FT_HANDLE, lpdwEventMask: LPDWORD) -> BOOL;
8581}
8582extern "C" {
8583 #[doc = " @noop FT_W32_WaitCommEvent"]
8584 #[doc = " @par Supported Operating Systems"]
8585 #[doc = " Linux"]
8586 #[doc = " Mac OS X (10.4 and later)"]
8587 #[doc = " Windows (2000 and later)"]
8588 #[doc = " Windows CE (4.2 and later)"]
8589 #[doc = " @par Summary"]
8590 #[doc = " This function waits for an event to occur."]
8591 #[doc = " @param ftHandle Handle of the device."]
8592 #[doc = " @param pulEvent Pointer to a location that receives a mask that contains the events that occurred."]
8593 #[doc = " @param lpOverlapped Pointer to an overlapped structure."]
8594 #[doc = " @returns"]
8595 #[doc = " If the function is successful, the return value is nonzero."]
8596 #[doc = " If the function is unsuccessful, the return value is zero."]
8597 #[doc = " @remarks"]
8598 #[doc = " This function supports both non-overlapped and overlapped I/O, except under Windows CE and Linux"]
8599 #[doc = " where only non-overlapped IO is supported."]
8600 #[doc = " @n @b Non-overlapped @b I/O"]
8601 #[doc = " The parameter, lpOverlapped, must be NULL for non-overlapped I/O."]
8602 #[doc = " @n This function does not return until an event that has been specified in a call to"]
8603 #[doc = " FT_W32_SetCommMask has occurred. The events that occurred and resulted in this function returning"]
8604 #[doc = " are stored in lpdwEvent."]
8605 #[doc = " @n @b Overlapped @b I/O"]
8606 #[doc = " @n When the device has been opened for overlapped I/O, an application can issue a request and perform"]
8607 #[doc = " some additional work while the request is pending. This contrasts with the case of non-overlapped"]
8608 #[doc = " I/O in which the application issues a request and receives control again only after the request has"]
8609 #[doc = " been\tcompleted."]
8610 #[doc = " @n The parameter, lpOverlapped, must point to an initialized OVERLAPPED structure."]
8611 #[doc = " This function does not return until an event that has been specified in a call to FT_W32_SetCommMask"]
8612 #[doc = " has occurred."]
8613 #[doc = " @n If an event has already occurred, the request completes immediately, and the return code is non-zero."]
8614 #[doc = " @n The events that occurred are stored in lpdwEvent."]
8615 #[doc = " @n If an event has not yet occurred, the request completes immediately, and the return code is zero,"]
8616 #[doc = " signifying an error. An application should call FT_W32_GetLastError to get the cause of the error. If"]
8617 #[doc = " the error code is ERROR_IO_PENDING, the overlapped operation is still in progress, and the application"]
8618 #[doc = " can perform other processing. Eventually, the application checks the result of the overlapped request"]
8619 #[doc = " by calling FT_W32_GetOverlappedResult. The events that occurred and resulted in this function"]
8620 #[doc = " returning are stored in lpdwEvent."]
8621 pub fn FT_W32_WaitCommEvent(
8622 ftHandle: FT_HANDLE,
8623 pulEvent: PULONG,
8624 lpOverlapped: LPOVERLAPPED,
8625 ) -> BOOL;
8626}
8627extern "C" {
8628 #[doc = " @noop FT_W32_PurgeComm"]
8629 #[doc = " @par Supported Operating Systems"]
8630 #[doc = " Linux"]
8631 #[doc = " Mac OS X (10.4 and later)"]
8632 #[doc = " Windows (2000 and later)"]
8633 #[doc = " Windows CE (4.2 and later)"]
8634 #[doc = " @par Summary"]
8635 #[doc = " This function purges the device."]
8636 #[doc = " @param ftHandle Handle of the device."]
8637 #[doc = " @param dwMask Specifies the action to take. The action can be a combination of the following:"]
8638 #[doc = " @li PURGE_TXABORT - Terminate outstanding overlapped writes"]
8639 #[doc = " @li PURGE_RXABORT - Terminate outstanding overlapped reads"]
8640 #[doc = " @li PURGE_TXCLEAR - Clear the transmit buffer"]
8641 #[doc = " @li PURGE_RXCLEAR - Clear the receive buffer"]
8642 #[doc = " @returns"]
8643 #[doc = " If the function is successful, the return value is nonzero."]
8644 #[doc = " If the function is unsuccessful, the return value is zero."]
8645 pub fn FT_W32_PurgeComm(ftHandle: FT_HANDLE, dwMask: DWORD) -> BOOL;
8646}
8647extern "C" {
8648 #[doc = " @noop FT_W32_GetLastError"]
8649 #[doc = " @par Supported Operating Systems"]
8650 #[doc = " Linux"]
8651 #[doc = " Mac OS X (10.4 and later)"]
8652 #[doc = " Windows (2000 and later)"]
8653 #[doc = " Windows CE (4.2 and later)"]
8654 #[doc = " @par Summary"]
8655 #[doc = " Gets the last error that occurred on the device."]
8656 #[doc = " @param ftHandle Handle of the device."]
8657 #[doc = " @returns"]
8658 #[doc = " If the function is successful, the return value is nonzero."]
8659 #[doc = " If the function is unsuccessful, the return value is zero."]
8660 #[doc = " @remarks"]
8661 #[doc = " This function is normally used with overlapped I/O and so is not supported in Windows CE. For a"]
8662 #[doc = " description of its use, see FT_W32_ReadFile and FT_W32_WriteFile."]
8663 #[doc = " @n In Linux and Mac OS X, this function returns a DWORD that directly maps to the FT Errors (for"]
8664 #[doc = " example the FT_INVALID_HANDLE error number)."]
8665 pub fn FT_W32_GetLastError(ftHandle: FT_HANDLE) -> DWORD;
8666}
8667extern "C" {
8668 #[doc = " @noop FT_W32_ClearCommError"]
8669 #[doc = " @par Supported Operating Systems"]
8670 #[doc = " Linux"]
8671 #[doc = " Mac OS X (10.4 and later)"]
8672 #[doc = " Windows (2000 and later)"]
8673 #[doc = " Windows CE (4.2 and later)"]
8674 #[doc = " @par Summary"]
8675 #[doc = " Gets information about a communications error and get current status of the device."]
8676 #[doc = " @param ftHandle Handle of the device."]
8677 #[doc = " @param lpdwErrors Variable that contains the error mask."]
8678 #[doc = " @param lpftComstat Pointer to FTCOMSTAT structure."]
8679 #[doc = " @returns"]
8680 #[doc = " If the function is successful, the return value is nonzero."]
8681 #[doc = " If the function is unsuccessful, the return value is zero."]
8682 pub fn FT_W32_ClearCommError(
8683 ftHandle: FT_HANDLE,
8684 lpdwErrors: LPDWORD,
8685 lpftComstat: LPFTCOMSTAT,
8686 ) -> BOOL;
8687}
8688extern "C" {
8689 #[doc = " @noop FT_W32_CancelIo"]
8690 #[doc = " Undocumented function."]
8691 pub fn FT_W32_CancelIo(ftHandle: FT_HANDLE) -> BOOL;
8692}
8693extern "C" {
8694 #[doc = " @noop FT_EE_ReadConfig"]
8695 #[doc = " Undocumented function."]
8696 pub fn FT_EE_ReadConfig(ftHandle: FT_HANDLE, ucAddress: UCHAR, pucValue: PUCHAR) -> FT_STATUS;
8697}
8698extern "C" {
8699 #[doc = " @noop FT_EE_WriteConfig"]
8700 #[doc = " Undocumented function."]
8701 pub fn FT_EE_WriteConfig(ftHandle: FT_HANDLE, ucAddress: UCHAR, ucValue: UCHAR) -> FT_STATUS;
8702}
8703extern "C" {
8704 #[doc = " @noop FT_EE_ReadECC"]
8705 #[doc = " Undocumented function."]
8706 pub fn FT_EE_ReadECC(ftHandle: FT_HANDLE, ucOption: UCHAR, lpwValue: LPWORD) -> FT_STATUS;
8707}
8708extern "C" {
8709 #[doc = " @noop FT_GetQueueStatusEx"]
8710 #[doc = " Undocumented function."]
8711 pub fn FT_GetQueueStatusEx(ftHandle: FT_HANDLE, dwRxBytes: *mut DWORD) -> FT_STATUS;
8712}
8713extern "C" {
8714 #[doc = " @noop FT_ComPortIdle"]
8715 #[doc = " Undocumented function."]
8716 pub fn FT_ComPortIdle(ftHandle: FT_HANDLE) -> FT_STATUS;
8717}
8718extern "C" {
8719 #[doc = " @noop FT_ComPortCancelIdle"]
8720 #[doc = " Undocumented function."]
8721 pub fn FT_ComPortCancelIdle(ftHandle: FT_HANDLE) -> FT_STATUS;
8722}
8723extern "C" {
8724 #[doc = " @noop FT_VendorCmdGet"]
8725 #[doc = " Undocumented function."]
8726 pub fn FT_VendorCmdGet(
8727 ftHandle: FT_HANDLE,
8728 Request: UCHAR,
8729 Buf: *mut UCHAR,
8730 Len: USHORT,
8731 ) -> FT_STATUS;
8732}
8733extern "C" {
8734 #[doc = " @noop FT_VendorCmdSet"]
8735 #[doc = " Undocumented function."]
8736 pub fn FT_VendorCmdSet(
8737 ftHandle: FT_HANDLE,
8738 Request: UCHAR,
8739 Buf: *mut UCHAR,
8740 Len: USHORT,
8741 ) -> FT_STATUS;
8742}
8743extern "C" {
8744 #[doc = " @noop FT_VendorCmdGetEx"]
8745 #[doc = " Undocumented function."]
8746 pub fn FT_VendorCmdGetEx(
8747 ftHandle: FT_HANDLE,
8748 wValue: USHORT,
8749 Buf: *mut UCHAR,
8750 Len: USHORT,
8751 ) -> FT_STATUS;
8752}
8753extern "C" {
8754 #[doc = " @noop FT_VendorCmdSetEx"]
8755 #[doc = " Undocumented function."]
8756 pub fn FT_VendorCmdSetEx(
8757 ftHandle: FT_HANDLE,
8758 wValue: USHORT,
8759 Buf: *mut UCHAR,
8760 Len: USHORT,
8761 ) -> FT_STATUS;
8762}