3 %module(docstring="Python interface to libftdi") ftdi
9 %typemap(in) unsigned char* = char*;
11 %ignore ftdi_write_data_async;
12 %ignore ftdi_async_complete;
14 %immutable ftdi_version_info::version_str;
15 %immutable ftdi_version_info::snapshot_str;
17 %rename("%(strip:[ftdi_])s") "";
19 %apply char *OUTPUT { char * manufacturer };
20 %apply char *OUTPUT { char * description };
21 %apply char *OUTPUT { char * serial };
22 %cstring_bounded_output( char * manufacturer, 256 );
23 %cstring_bounded_output( char * description, 256 );
24 %cstring_bounded_output( char * serial, 256 );
25 int ftdi_usb_get_strings(struct ftdi_context *ftdi, struct libusb_device *dev,
26 char * manufacturer, int mnf_len,
27 char * description, int desc_len,
28 char * serial, int serial_len);
29 %clear char * manufacturer;
30 %clear char * description;
33 %apply char *OUTPUT { unsigned char *buf };
34 int ftdi_read_data(struct ftdi_context *ftdi, unsigned char *buf, int size);
35 %clear unsigned char *buf;
37 %apply int *OUTPUT { unsigned int *chunksize };
38 int ftdi_read_data_get_chunksize(struct ftdi_context *ftdi, unsigned int *chunksize);
39 int ftdi_write_data_get_chunksize(struct ftdi_context *ftdi, unsigned int *chunksize);
40 %clear unsigned int *chunksize;
42 %apply char *OUTPUT { unsigned char *pins };
43 int ftdi_read_pins(struct ftdi_context *ftdi, unsigned char *pins);
44 %clear unsigned char *pins;
46 %apply char *OUTPUT { unsigned char *latency };
47 int ftdi_get_latency_timer(struct ftdi_context *ftdi, unsigned char *latency);
48 %clear unsigned char *latency;
50 %apply short *OUTPUT { unsigned short *status };
51 int ftdi_poll_modem_status(struct ftdi_context *ftdi, unsigned short *status);
52 %clear unsigned short *status;
54 %apply int *OUTPUT { int* value };
55 int ftdi_get_eeprom_value(struct ftdi_context *ftdi, enum ftdi_eeprom_value value_name, int* value);
58 %apply short *OUTPUT { unsigned short *eeprom_val };
59 int ftdi_read_eeprom_location (struct ftdi_context *ftdi, int eeprom_addr, unsigned short *eeprom_val);
60 %clear unsigned short *eeprom_val;
62 %apply int *OUTPUT { unsigned int *chipid };
63 int ftdi_read_chipid(struct ftdi_context *ftdi, unsigned int *chipid);
64 %clear unsigned int *chipid;
76 %pointer_functions(struct ftdi_device_list *, device_listpp)