FreeCalypso > hg > fc-usbser-tools
annotate libftmini/ftdi_defs.h @ 43:dbaf239436cf
doc/DUART28-EEPROM-config: update for fc-duart28-conf
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 11 Sep 2023 01:06:03 +0000 |
parents | c53dee063cdd |
children |
rev | line source |
---|---|
13
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * This header file contains definitions for various bits that are fixed |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * in FTDI chips themselves. These definitions have been lifted from |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 * libftdi-0.20 by Intra2net AG. |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 /** MPSSE bitbang modes */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 enum ftdi_mpsse_mode |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 { |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 BITMODE_RESET = 0x00, /**< switch off bitbang mode, back to regular serial/FIFO */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 BITMODE_BITBANG= 0x01, /**< classical asynchronous bitbang mode, introduced with B-type chips */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 BITMODE_MPSSE = 0x02, /**< MPSSE mode, available on 2232x chips */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 BITMODE_SYNCBB = 0x04, /**< synchronous bitbang mode, available on 2232x and R-type chips */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 BITMODE_MCU = 0x08, /**< MCU Host Bus Emulation mode, available on 2232x chips */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 /* CPU-style fifo mode gets set via EEPROM */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 BITMODE_OPTO = 0x10, /**< Fast Opto-Isolated Serial Interface Mode, available on 2232x chips */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 BITMODE_CBUS = 0x20, /**< Bitbang on CBUS pins of R-type chips, configure in EEPROM before */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 BITMODE_SYNCFF = 0x40, /**< Single Channel Synchronous FIFO mode, available on 2232H chips */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 }; |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 /** Port interface for chips with multiple interfaces */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 enum ftdi_interface |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 { |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 INTERFACE_ANY = 0, |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 INTERFACE_A = 1, |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 INTERFACE_B = 2, |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 INTERFACE_C = 3, |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 INTERFACE_D = 4 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 }; |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 /* Shifting commands IN MPSSE Mode*/ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 #define MPSSE_WRITE_NEG 0x01 /* Write TDI/DO on negative TCK/SK edge*/ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 #define MPSSE_BITMODE 0x02 /* Write bits, not bytes */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 #define MPSSE_READ_NEG 0x04 /* Sample TDO/DI on negative TCK/SK edge */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 #define MPSSE_LSB 0x08 /* LSB first */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 #define MPSSE_DO_WRITE 0x10 /* Write TDI/DO */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 #define MPSSE_DO_READ 0x20 /* Read TDO/DI */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 #define MPSSE_WRITE_TMS 0x40 /* Write TMS/CS */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 /* FTDI MPSSE commands */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 #define SET_BITS_LOW 0x80 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 /*BYTE DATA*/ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 /*BYTE Direction*/ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 #define SET_BITS_HIGH 0x82 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 /*BYTE DATA*/ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 /*BYTE Direction*/ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 #define GET_BITS_LOW 0x81 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 #define GET_BITS_HIGH 0x83 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 #define LOOPBACK_START 0x84 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 #define LOOPBACK_END 0x85 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 #define TCK_DIVISOR 0x86 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 /* H Type specific commands */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 #define DIS_DIV_5 0x8a |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 #define EN_DIV_5 0x8b |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 #define EN_3_PHASE 0x8c |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 #define DIS_3_PHASE 0x8d |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 #define CLK_BITS 0x8e |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 #define CLK_BYTES 0x8f |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 #define CLK_WAIT_HIGH 0x94 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 #define CLK_WAIT_LOW 0x95 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 #define EN_ADAPTIVE 0x96 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 #define DIS_ADAPTIVE 0x97 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 #define CLK_BYTES_OR_HIGH 0x9c |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 #define CLK_BYTES_OR_LOW 0x0d |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 /*FT232H specific commands */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 #define DRIVE_OPEN_COLLECTOR 0x9e |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 /* Value Low */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 /* Value HIGH */ /*rate is 12000000/((1+value)*2) */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 #define DIV_VALUE(rate) (rate > 6000000)?0:((6000000/rate -1) > 0xffff)? 0xffff: (6000000/rate -1) |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 /* Commands in MPSSE and Host Emulation Mode */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 #define SEND_IMMEDIATE 0x87 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 #define WAIT_ON_HIGH 0x88 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 #define WAIT_ON_LOW 0x89 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 /* Commands in Host Emulation Mode */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 #define READ_SHORT 0x90 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 /* Address_Low */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 #define READ_EXTENDED 0x91 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 /* Address High */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 /* Address Low */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 #define WRITE_SHORT 0x92 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 /* Address_Low */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 #define WRITE_EXTENDED 0x93 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 /* Address High */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 /* Address Low */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 /* Definitions for flow control */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 #define SIO_RESET 0 /* Reset the port */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 #define SIO_MODEM_CTRL 1 /* Set the modem control register */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 #define SIO_SET_FLOW_CTRL 2 /* Set flow control register */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 #define SIO_SET_BAUD_RATE 3 /* Set baud rate */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 #define SIO_SET_DATA 4 /* Set the data characteristics of the port */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 #define FTDI_DEVICE_OUT_REQTYPE (USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_ENDPOINT_OUT) |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 #define FTDI_DEVICE_IN_REQTYPE (USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_ENDPOINT_IN) |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 /* Requests */ |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 #define SIO_RESET_REQUEST SIO_RESET |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 #define SIO_SET_BAUDRATE_REQUEST SIO_SET_BAUD_RATE |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 #define SIO_SET_DATA_REQUEST SIO_SET_DATA |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 #define SIO_SET_FLOW_CTRL_REQUEST SIO_SET_FLOW_CTRL |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 #define SIO_SET_MODEM_CTRL_REQUEST SIO_MODEM_CTRL |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 #define SIO_POLL_MODEM_STATUS_REQUEST 0x05 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 #define SIO_SET_EVENT_CHAR_REQUEST 0x06 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 #define SIO_SET_ERROR_CHAR_REQUEST 0x07 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 #define SIO_SET_LATENCY_TIMER_REQUEST 0x09 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 #define SIO_GET_LATENCY_TIMER_REQUEST 0x0A |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 #define SIO_SET_BITMODE_REQUEST 0x0B |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 #define SIO_READ_PINS_REQUEST 0x0C |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 #define SIO_READ_EEPROM_REQUEST 0x90 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 #define SIO_WRITE_EEPROM_REQUEST 0x91 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 #define SIO_ERASE_EEPROM_REQUEST 0x92 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 #define SIO_RESET_SIO 0 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 #define SIO_RESET_PURGE_RX 1 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 #define SIO_RESET_PURGE_TX 2 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 #define SIO_DISABLE_FLOW_CTRL 0x0 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 #define SIO_RTS_CTS_HS (0x1 << 8) |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 #define SIO_DTR_DSR_HS (0x2 << 8) |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 #define SIO_XON_XOFF_HS (0x4 << 8) |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 #define SIO_SET_DTR_MASK 0x1 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 #define SIO_SET_DTR_HIGH ( 1 | ( SIO_SET_DTR_MASK << 8)) |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 #define SIO_SET_DTR_LOW ( 0 | ( SIO_SET_DTR_MASK << 8)) |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 #define SIO_SET_RTS_MASK 0x2 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 #define SIO_SET_RTS_HIGH ( 2 | ( SIO_SET_RTS_MASK << 8 )) |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 #define SIO_SET_RTS_LOW ( 0 | ( SIO_SET_RTS_MASK << 8 )) |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 |
c53dee063cdd
libftmini/ftdi_defs.h: extract from libftdi-0.20/src/ftdi.h
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 #define SIO_RTS_CTS_HS (0x1 << 8) |