1 [CCode (cprefix = "ftdi_", lower_case_prefix = "ftdi_", cheader_filename = "ftdi.h,usb.h")]
3 [CCode (cprefix = "TYPE_")]
10 [CCode (cprefix = "")]
11 public enum ParityType {
19 [CCode (cprefix = "STOP_")]
20 public enum StopBitsType {
26 [CCode (cprefix = "")]
27 public enum BitsType {
32 [CCode (cprefix = "BITMODE_", cname = "ftdi_mpsse_mode")]
33 public enum MPSSEMode {
43 [CCode (cprefix = "INTERFACE_")]
44 public enum Interface {
50 [CCode (cprefix = "SIO_")]
51 public enum FlowControlType {
58 [CCode (cname = "struct ftdi_device_list", cheader_filename = "usb.h", free_function = "ftdi_list_free2")]
59 public class DeviceList {
60 public DeviceList next;
61 public USB.Device * dev;
64 [CCode (cname = "struct ftdi_eeprom")]
65 public struct EEPROM {
67 public int product_id;
68 public int self_powered;
69 public int remote_wakeup;
70 public int BM_type_chip;
71 public int in_is_isochronous;
72 public int out_is_isochronous;
73 public int suspend_pull_downs;
74 public int use_serial;
75 public int change_usb_version;
76 public int usb_version;
78 public string manufacturer;
79 public string product;
83 [CCode (cname = "struct ftdi_context", free_function = "ftdi_free", cprefix = "ftdi_")]
84 public class Context {
85 [CCode (cname = "ftdi_new")]
88 public void deinit ();
89 public int set_interface (Interface iface);
90 public void set_usbdev (USB.Device * usbdev);
91 public int usb_find_all (out DeviceList devlist, int vendor, int product);
92 public int usb_get_strings (USB.Device * usbdev, [CCode (array_length = false)] char[] manufacturer, int manufacturer_len, [CCode (array_length = false)] char[] description, int description_len, [CCode (array_length = false)] char[] serial, int serial_len);
93 public int usb_open_dev (USB.Device * usbdev);
94 public int usb_open (int vendor, int product);
95 public int usb_open_desc (int vendor, int product, string description, string serial);
96 public int usb_reset ();
97 public int usb_purge_buffers ();
98 public int usb_close ();
99 public int set_baudrate (int baudrate);
100 public int set_line_property (BitsType bits, StopBitsType sbit, ParityType parity);
101 public int write_data ([CCode (array_length = false)] uchar[] buf, int size);
102 public int write_data_set_chunksize (int chunksize);
103 public int write_data_get_chunksize (out int chunksize);
104 public int read_data ([CCode (array_length = false)] uchar[] buf, uint size);
105 public int read_data_set_chunksize (int chunksize);
106 public int read_data_get_chunksize (out int chunksize);
107 public int enable_bitbang (uchar bitmask);
108 public int disable_bitbang ();
109 public int set_bitmode (uchar bitmask, uchar mode);
110 public int read_pins (out uchar pins);
111 public int set_latency_timer (uchar latency);
112 public int get_latency_timer (out uchar latency);
113 public void eeprom_initdefaults (out EEPROM eeprom);
114 public weak string get_error_string ();
115 public int setflowctrl (FlowControlType flowctrl);
116 public int setdtr (int state);
117 public int setrts (int state);
119 public USB.DeviceHandle usb_dev;
120 public int usb_read_timeout;
121 public int usb_write_timeout;
122 public ChipType type;
124 public uchar bitbang_enabled;
125 [CCode (array_length = false)]
126 public uchar[] readbuffer;
127 public uint readbuffer_offset;
128 public uint readbuffer_remaining;
129 public uint readbuffer_chunksize;
130 public uint writebuffer_chunksize;
131 public int @interface;
135 public uchar bitbang_mode;
136 public string error_str;