1 typedef struct Serial Serial;
2 typedef struct Serialops Serialops;
3 typedef struct Serialport Serialport;
6 int (*seteps)(Serialport*);
7 int (*init)(Serialport*);
8 int (*getparam)(Serialport*);
9 int (*setparam)(Serialport*);
10 int (*clearpipes)(Serialport*);
11 int (*reset)(Serial*, Serialport*);
12 int (*sendlines)(Serialport*);
13 int (*modemctl)(Serialport*, int);
14 int (*setbreak)(Serialport*, int);
15 int (*readstatus)(Serialport*);
16 int (*wait4data)(Serialport*, uchar *, int);
17 int (*wait4write)(Serialport*, uchar *, int);
27 Serial *s; /* device we belong to */
30 Dev *epintr; /* may not exist */
37 /* serial parameters */
53 int blocked; /* for sw flow ctl. BUG: not implemented yet */
61 int interfc; /* interfc on the device for ftdi */
66 uchar data[DataBufSz];
74 Dev *dev; /* usb device*/
76 int type; /* serial model subtype */
77 int recover; /* # of non-fatal recovery tries */
82 int jtag; /* index of jtag interface, -1 none */
83 int nifcs; /* # of serial interfaces, including JTAG */
93 int baudbase; /* for special baud base settings, see ftdi */
97 /* soft flow control chars */
105 * !hget http://lxr.linux.no/source/drivers/usb/serial/pl2303.h|htmlfmt
106 * !hget http://lxr.linux.no/source/drivers/usb/serial/pl2303.c|htmlfmt
109 typedef struct Cinfo Cinfo;
111 int vid; /* usb vendor id */
112 int did; /* usb device/product id */
114 int cid; /* assigned for us */
117 extern int serialdebug;
119 #define dsprint if(serialdebug)fprint
121 int serialrecover(Serial *ser, Serialport *p, Dev *ep, char *err);
122 int serialreset(Serial *ser);
123 char *serdumpst(Serialport *p, char *buf, int bufsz);
124 Cinfo *matchid(Cinfo *tab, int vid, int did);