Use a private header for the private EEPROM structures
[libftdi] / bindings / ftdi.i
CommitLineData
05c0dae8
TH
1/* File: example.i */
2%module ftdi
3%include "typemaps.i"
4%include "cpointer.i"
f5b59bd6 5%pointer_functions(unsigned int, uintp);
442f0164
CZ
6%pointer_functions(unsigned char *, ucharp);
7%pointer_functions(char *, charp);
f5b59bd6 8
05c0dae8
TH
9%typemap(in) unsigned char* = char*;
10%ignore ftdi_write_data_async;
11%ignore ftdi_async_complete;
12
13%include ftdi.h
14%{
15#include <ftdi.h>
16%}
17
b790d38e
UB
18%include ftdi_i.h
19%{
20#include <ftdi_i.h>
21%}
22
05c0dae8
TH
23extern "C" {
24
25%apply char *OUTPUT { unsigned char *buf };
26 int ftdi_read_data(struct ftdi_context *ftdi, unsigned char *buf, int size);
27%clear unsigned char *buf;
f0005c33 28
05c0dae8
TH
29%apply int *OUTPUT { unsigned int *chunksize };
30 int ftdi_read_data_get_chunksize(struct ftdi_context *ftdi, unsigned int *chunksize);
31 int ftdi_write_data_get_chunksize(struct ftdi_context *ftdi, unsigned int *chunksize);
32%clear unsigned int *chunksize;
f0005c33 33
05c0dae8
TH
34 //int ftdi_write_data_async(struct ftdi_context *ftdi, unsigned char *buf, int size);
35 //void ftdi_async_complete(struct ftdi_context *ftdi, int wait_for_more);
36%apply char *OUTPUT { unsigned char *pins };
37 int ftdi_read_pins(struct ftdi_context *ftdi, unsigned char *pins);
38%clear unsigned char *pins;
f0005c33 39
05c0dae8
TH
40%apply char *OUTPUT { unsigned char *latency };
41 int ftdi_get_latency_timer(struct ftdi_context *ftdi, unsigned char *latency);
f0005c33
TJ
42%clear unsigned char *latency;
43
44%apply char *OUTPUT { unsigned short *status };
05c0dae8 45 int ftdi_poll_modem_status(struct ftdi_context *ftdi, unsigned short *status);
f0005c33
TJ
46%clear unsigned short *status;
47
05c0dae8 48%apply char *OUTPUT { unsigned char *output };
a35aa9bd 49 int ftdi_eeprom_build(struct ftdi_context *ftdi);
05c0dae8 50%clear unsigned char *output;
f0005c33 51
05c0dae8 52%apply char *OUTPUT { unsigned char *eeprom };
a35aa9bd
UB
53 int ftdi_read_eeprom(struct ftdi_context *ftdi);
54 int ftdi_write_eeprom(struct ftdi_context *ftdi);
05c0dae8 55%clear unsigned char *eeprom;
f0005c33 56
05c0dae8
TH
57%apply int *OUTPUT { unsigned int *chipid };
58 int ftdi_read_chipid(struct ftdi_context *ftdi, unsigned int *chipid);
59%clear unsigned int *chipid;
60
61}