diff options
author | Alan Cox <alan@redhat.com> | 2008-07-22 06:11:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-22 16:03:23 -0400 |
commit | 464cbb24698ddb7bf24b2b73204e3dc121886211 (patch) | |
tree | 71fc92f99eba715d0c8ffd6d7fe725858c6d69ca /drivers/usb/serial/ftdi_sio.h | |
parent | 93c467952ff6b5c3d92fddf4b1a609e68f6d08d1 (diff) |
ftdi_sio: Coding style
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/usb/serial/ftdi_sio.h')
-rw-r--r-- | drivers/usb/serial/ftdi_sio.h | 126 |
1 files changed, 63 insertions, 63 deletions
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h index 8302eca893ea..a577ea44dcf9 100644 --- a/drivers/usb/serial/ftdi_sio.h +++ b/drivers/usb/serial/ftdi_sio.h | |||
@@ -1,20 +1,20 @@ | |||
1 | /* | 1 | /* |
2 | * Definitions for the FTDI USB Single Port Serial Converter - | 2 | * Definitions for the FTDI USB Single Port Serial Converter - |
3 | * known as FTDI_SIO (Serial Input/Output application of the chipset) | 3 | * known as FTDI_SIO (Serial Input/Output application of the chipset) |
4 | * | 4 | * |
5 | * The example I have is known as the USC-1000 which is available from | 5 | * The example I have is known as the USC-1000 which is available from |
6 | * http://www.dse.co.nz - cat no XH4214 It looks similar to this: | 6 | * http://www.dse.co.nz - cat no XH4214 It looks similar to this: |
7 | * http://www.dansdata.com/usbser.htm but I can't be sure There are other | 7 | * http://www.dansdata.com/usbser.htm but I can't be sure There are other |
8 | * USC-1000s which don't look like my device though so beware! | 8 | * USC-1000s which don't look like my device though so beware! |
9 | * | 9 | * |
10 | * The device is based on the FTDI FT8U100AX chip. It has a DB25 on one side, | 10 | * The device is based on the FTDI FT8U100AX chip. It has a DB25 on one side, |
11 | * USB on the other. | 11 | * USB on the other. |
12 | * | 12 | * |
13 | * Thanx to FTDI (http://www.ftdi.co.uk) for so kindly providing details | 13 | * Thanx to FTDI (http://www.ftdi.co.uk) for so kindly providing details |
14 | * of the protocol required to talk to the device and ongoing assistence | 14 | * of the protocol required to talk to the device and ongoing assistence |
15 | * during development. | 15 | * during development. |
16 | * | 16 | * |
17 | * Bill Ryder - bryder@sgi.com formerly of Silicon Graphics, Inc.- wrote the | 17 | * Bill Ryder - bryder@sgi.com formerly of Silicon Graphics, Inc.- wrote the |
18 | * FTDI_SIO implementation. | 18 | * FTDI_SIO implementation. |
19 | * | 19 | * |
20 | * Philipp Gühring - pg@futureware.at - added the Device ID of the USB relais | 20 | * Philipp Gühring - pg@futureware.at - added the Device ID of the USB relais |
@@ -472,7 +472,7 @@ | |||
472 | /* | 472 | /* |
473 | * DSS-20 Sync Station for Sony Ericsson P800 | 473 | * DSS-20 Sync Station for Sony Ericsson P800 |
474 | */ | 474 | */ |
475 | #define FTDI_DSS20_PID 0xFC82 | 475 | #define FTDI_DSS20_PID 0xFC82 |
476 | 476 | ||
477 | /* | 477 | /* |
478 | * Home Electronics (www.home-electro.com) USB gadgets | 478 | * Home Electronics (www.home-electro.com) USB gadgets |
@@ -884,7 +884,7 @@ | |||
884 | /* | 884 | /* |
885 | * BmRequestType: 0100 0000B | 885 | * BmRequestType: 0100 0000B |
886 | * bRequest: FTDI_SIO_RESET | 886 | * bRequest: FTDI_SIO_RESET |
887 | * wValue: Control Value | 887 | * wValue: Control Value |
888 | * 0 = Reset SIO | 888 | * 0 = Reset SIO |
889 | * 1 = Purge RX buffer | 889 | * 1 = Purge RX buffer |
890 | * 2 = Purge TX buffer | 890 | * 2 = Purge TX buffer |
@@ -952,7 +952,7 @@ | |||
952 | * 101 - add .625 to divisor | 952 | * 101 - add .625 to divisor |
953 | * 110 - add .750 to divisor | 953 | * 110 - add .750 to divisor |
954 | * 111 - add .875 to divisor | 954 | * 111 - add .875 to divisor |
955 | * Bits 15 to 0 of the 17-bit divisor are placed in the urb value. Bit 16 is | 955 | * Bits 15 to 0 of the 17-bit divisor are placed in the urb value. Bit 16 is |
956 | * placed in bit 0 of the urb index. | 956 | * placed in bit 0 of the urb index. |
957 | * | 957 | * |
958 | * Note that there are a couple of special cases to support the highest baud | 958 | * Note that there are a couple of special cases to support the highest baud |
@@ -971,8 +971,8 @@ typedef enum { | |||
971 | } ftdi_chip_type_t; | 971 | } ftdi_chip_type_t; |
972 | 972 | ||
973 | typedef enum { | 973 | typedef enum { |
974 | ftdi_sio_b300 = 0, | 974 | ftdi_sio_b300 = 0, |
975 | ftdi_sio_b600 = 1, | 975 | ftdi_sio_b600 = 1, |
976 | ftdi_sio_b1200 = 2, | 976 | ftdi_sio_b1200 = 2, |
977 | ftdi_sio_b2400 = 3, | 977 | ftdi_sio_b2400 = 3, |
978 | ftdi_sio_b4800 = 4, | 978 | ftdi_sio_b4800 = 4, |
@@ -981,7 +981,7 @@ typedef enum { | |||
981 | ftdi_sio_b38400 = 7, | 981 | ftdi_sio_b38400 = 7, |
982 | ftdi_sio_b57600 = 8, | 982 | ftdi_sio_b57600 = 8, |
983 | ftdi_sio_b115200 = 9 | 983 | ftdi_sio_b115200 = 9 |
984 | } FTDI_SIO_baudrate_t ; | 984 | } FTDI_SIO_baudrate_t; |
985 | 985 | ||
986 | /* | 986 | /* |
987 | * The ftdi_8U232AM_xxMHz_byyy constants have been removed. The encoded divisor values | 987 | * The ftdi_8U232AM_xxMHz_byyy constants have been removed. The encoded divisor values |
@@ -990,19 +990,19 @@ typedef enum { | |||
990 | 990 | ||
991 | #define FTDI_SIO_SET_DATA_REQUEST FTDI_SIO_SET_DATA | 991 | #define FTDI_SIO_SET_DATA_REQUEST FTDI_SIO_SET_DATA |
992 | #define FTDI_SIO_SET_DATA_REQUEST_TYPE 0x40 | 992 | #define FTDI_SIO_SET_DATA_REQUEST_TYPE 0x40 |
993 | #define FTDI_SIO_SET_DATA_PARITY_NONE (0x0 << 8 ) | 993 | #define FTDI_SIO_SET_DATA_PARITY_NONE (0x0 << 8) |
994 | #define FTDI_SIO_SET_DATA_PARITY_ODD (0x1 << 8 ) | 994 | #define FTDI_SIO_SET_DATA_PARITY_ODD (0x1 << 8) |
995 | #define FTDI_SIO_SET_DATA_PARITY_EVEN (0x2 << 8 ) | 995 | #define FTDI_SIO_SET_DATA_PARITY_EVEN (0x2 << 8) |
996 | #define FTDI_SIO_SET_DATA_PARITY_MARK (0x3 << 8 ) | 996 | #define FTDI_SIO_SET_DATA_PARITY_MARK (0x3 << 8) |
997 | #define FTDI_SIO_SET_DATA_PARITY_SPACE (0x4 << 8 ) | 997 | #define FTDI_SIO_SET_DATA_PARITY_SPACE (0x4 << 8) |
998 | #define FTDI_SIO_SET_DATA_STOP_BITS_1 (0x0 << 11 ) | 998 | #define FTDI_SIO_SET_DATA_STOP_BITS_1 (0x0 << 11) |
999 | #define FTDI_SIO_SET_DATA_STOP_BITS_15 (0x1 << 11 ) | 999 | #define FTDI_SIO_SET_DATA_STOP_BITS_15 (0x1 << 11) |
1000 | #define FTDI_SIO_SET_DATA_STOP_BITS_2 (0x2 << 11 ) | 1000 | #define FTDI_SIO_SET_DATA_STOP_BITS_2 (0x2 << 11) |
1001 | #define FTDI_SIO_SET_BREAK (0x1 << 14) | 1001 | #define FTDI_SIO_SET_BREAK (0x1 << 14) |
1002 | /* FTDI_SIO_SET_DATA */ | 1002 | /* FTDI_SIO_SET_DATA */ |
1003 | 1003 | ||
1004 | /* | 1004 | /* |
1005 | * BmRequestType: 0100 0000B | 1005 | * BmRequestType: 0100 0000B |
1006 | * bRequest: FTDI_SIO_SET_DATA | 1006 | * bRequest: FTDI_SIO_SET_DATA |
1007 | * wValue: Data characteristics (see below) | 1007 | * wValue: Data characteristics (see below) |
1008 | * wIndex: Port | 1008 | * wIndex: Port |
@@ -1035,7 +1035,7 @@ typedef enum { | |||
1035 | #define FTDI_SIO_SET_MODEM_CTRL_REQUEST_TYPE 0x40 | 1035 | #define FTDI_SIO_SET_MODEM_CTRL_REQUEST_TYPE 0x40 |
1036 | #define FTDI_SIO_SET_MODEM_CTRL_REQUEST FTDI_SIO_MODEM_CTRL | 1036 | #define FTDI_SIO_SET_MODEM_CTRL_REQUEST FTDI_SIO_MODEM_CTRL |
1037 | 1037 | ||
1038 | /* | 1038 | /* |
1039 | * BmRequestType: 0100 0000B | 1039 | * BmRequestType: 0100 0000B |
1040 | * bRequest: FTDI_SIO_MODEM_CTRL | 1040 | * bRequest: FTDI_SIO_MODEM_CTRL |
1041 | * wValue: ControlValue (see below) | 1041 | * wValue: ControlValue (see below) |
@@ -1049,11 +1049,11 @@ typedef enum { | |||
1049 | */ | 1049 | */ |
1050 | 1050 | ||
1051 | #define FTDI_SIO_SET_DTR_MASK 0x1 | 1051 | #define FTDI_SIO_SET_DTR_MASK 0x1 |
1052 | #define FTDI_SIO_SET_DTR_HIGH ( 1 | ( FTDI_SIO_SET_DTR_MASK << 8)) | 1052 | #define FTDI_SIO_SET_DTR_HIGH (1 | (FTDI_SIO_SET_DTR_MASK << 8)) |
1053 | #define FTDI_SIO_SET_DTR_LOW ( 0 | ( FTDI_SIO_SET_DTR_MASK << 8)) | 1053 | #define FTDI_SIO_SET_DTR_LOW (0 | (FTDI_SIO_SET_DTR_MASK << 8)) |
1054 | #define FTDI_SIO_SET_RTS_MASK 0x2 | 1054 | #define FTDI_SIO_SET_RTS_MASK 0x2 |
1055 | #define FTDI_SIO_SET_RTS_HIGH ( 2 | ( FTDI_SIO_SET_RTS_MASK << 8 )) | 1055 | #define FTDI_SIO_SET_RTS_HIGH (2 | (FTDI_SIO_SET_RTS_MASK << 8)) |
1056 | #define FTDI_SIO_SET_RTS_LOW ( 0 | ( FTDI_SIO_SET_RTS_MASK << 8 )) | 1056 | #define FTDI_SIO_SET_RTS_LOW (0 | (FTDI_SIO_SET_RTS_MASK << 8)) |
1057 | 1057 | ||
1058 | /* | 1058 | /* |
1059 | * ControlValue | 1059 | * ControlValue |
@@ -1076,7 +1076,7 @@ typedef enum { | |||
1076 | /* FTDI_SIO_SET_FLOW_CTRL */ | 1076 | /* FTDI_SIO_SET_FLOW_CTRL */ |
1077 | #define FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE 0x40 | 1077 | #define FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE 0x40 |
1078 | #define FTDI_SIO_SET_FLOW_CTRL_REQUEST FTDI_SIO_SET_FLOW_CTRL | 1078 | #define FTDI_SIO_SET_FLOW_CTRL_REQUEST FTDI_SIO_SET_FLOW_CTRL |
1079 | #define FTDI_SIO_DISABLE_FLOW_CTRL 0x0 | 1079 | #define FTDI_SIO_DISABLE_FLOW_CTRL 0x0 |
1080 | #define FTDI_SIO_RTS_CTS_HS (0x1 << 8) | 1080 | #define FTDI_SIO_RTS_CTS_HS (0x1 << 8) |
1081 | #define FTDI_SIO_DTR_DSR_HS (0x2 << 8) | 1081 | #define FTDI_SIO_DTR_DSR_HS (0x2 << 8) |
1082 | #define FTDI_SIO_XON_XOFF_HS (0x4 << 8) | 1082 | #define FTDI_SIO_XON_XOFF_HS (0x4 << 8) |
@@ -1085,7 +1085,7 @@ typedef enum { | |||
1085 | * bRequest: FTDI_SIO_SET_FLOW_CTRL | 1085 | * bRequest: FTDI_SIO_SET_FLOW_CTRL |
1086 | * wValue: Xoff/Xon | 1086 | * wValue: Xoff/Xon |
1087 | * wIndex: Protocol/Port - hIndex is protocl / lIndex is port | 1087 | * wIndex: Protocol/Port - hIndex is protocl / lIndex is port |
1088 | * wLength: 0 | 1088 | * wLength: 0 |
1089 | * Data: None | 1089 | * Data: None |
1090 | * | 1090 | * |
1091 | * hIndex protocol is: | 1091 | * hIndex protocol is: |
@@ -1101,10 +1101,10 @@ typedef enum { | |||
1101 | * | 1101 | * |
1102 | * A value of zero in the hIndex field disables handshaking | 1102 | * A value of zero in the hIndex field disables handshaking |
1103 | * | 1103 | * |
1104 | * If Xon/Xoff handshaking is specified, the hValue field should contain the XOFF character | 1104 | * If Xon/Xoff handshaking is specified, the hValue field should contain the XOFF character |
1105 | * and the lValue field contains the XON character. | 1105 | * and the lValue field contains the XON character. |
1106 | */ | 1106 | */ |
1107 | 1107 | ||
1108 | /* | 1108 | /* |
1109 | * FTDI_SIO_GET_LATENCY_TIMER | 1109 | * FTDI_SIO_GET_LATENCY_TIMER |
1110 | * | 1110 | * |
@@ -1118,7 +1118,7 @@ typedef enum { | |||
1118 | #define FTDI_SIO_GET_LATENCY_TIMER_REQUEST FTDI_SIO_GET_LATENCY_TIMER | 1118 | #define FTDI_SIO_GET_LATENCY_TIMER_REQUEST FTDI_SIO_GET_LATENCY_TIMER |
1119 | #define FTDI_SIO_GET_LATENCY_TIMER_REQUEST_TYPE 0xC0 | 1119 | #define FTDI_SIO_GET_LATENCY_TIMER_REQUEST_TYPE 0xC0 |
1120 | 1120 | ||
1121 | /* | 1121 | /* |
1122 | * BmRequestType: 1100 0000b | 1122 | * BmRequestType: 1100 0000b |
1123 | * bRequest: FTDI_SIO_GET_LATENCY_TIMER | 1123 | * bRequest: FTDI_SIO_GET_LATENCY_TIMER |
1124 | * wValue: 0 | 1124 | * wValue: 0 |
@@ -1127,7 +1127,7 @@ typedef enum { | |||
1127 | * Data: latency (on return) | 1127 | * Data: latency (on return) |
1128 | */ | 1128 | */ |
1129 | 1129 | ||
1130 | /* | 1130 | /* |
1131 | * FTDI_SIO_SET_LATENCY_TIMER | 1131 | * FTDI_SIO_SET_LATENCY_TIMER |
1132 | * | 1132 | * |
1133 | * Set the timeout interval. The FTDI collects data from the slave | 1133 | * Set the timeout interval. The FTDI collects data from the slave |
@@ -1140,7 +1140,7 @@ typedef enum { | |||
1140 | #define FTDI_SIO_SET_LATENCY_TIMER_REQUEST FTDI_SIO_SET_LATENCY_TIMER | 1140 | #define FTDI_SIO_SET_LATENCY_TIMER_REQUEST FTDI_SIO_SET_LATENCY_TIMER |
1141 | #define FTDI_SIO_SET_LATENCY_TIMER_REQUEST_TYPE 0x40 | 1141 | #define FTDI_SIO_SET_LATENCY_TIMER_REQUEST_TYPE 0x40 |
1142 | 1142 | ||
1143 | /* | 1143 | /* |
1144 | * BmRequestType: 0100 0000b | 1144 | * BmRequestType: 0100 0000b |
1145 | * bRequest: FTDI_SIO_SET_LATENCY_TIMER | 1145 | * bRequest: FTDI_SIO_SET_LATENCY_TIMER |
1146 | * wValue: Latency (milliseconds) | 1146 | * wValue: Latency (milliseconds) |
@@ -1155,7 +1155,7 @@ typedef enum { | |||
1155 | */ | 1155 | */ |
1156 | 1156 | ||
1157 | /* | 1157 | /* |
1158 | * FTDI_SIO_SET_EVENT_CHAR | 1158 | * FTDI_SIO_SET_EVENT_CHAR |
1159 | * | 1159 | * |
1160 | * Set the special event character for the specified communications port. | 1160 | * Set the special event character for the specified communications port. |
1161 | * If the device sees this character it will immediately return the | 1161 | * If the device sees this character it will immediately return the |
@@ -1168,7 +1168,7 @@ typedef enum { | |||
1168 | #define FTDI_SIO_SET_EVENT_CHAR_REQUEST_TYPE 0x40 | 1168 | #define FTDI_SIO_SET_EVENT_CHAR_REQUEST_TYPE 0x40 |
1169 | 1169 | ||
1170 | 1170 | ||
1171 | /* | 1171 | /* |
1172 | * BmRequestType: 0100 0000b | 1172 | * BmRequestType: 0100 0000b |
1173 | * bRequest: FTDI_SIO_SET_EVENT_CHAR | 1173 | * bRequest: FTDI_SIO_SET_EVENT_CHAR |
1174 | * wValue: EventChar | 1174 | * wValue: EventChar |
@@ -1184,12 +1184,12 @@ typedef enum { | |||
1184 | * B9..15 Reserved | 1184 | * B9..15 Reserved |
1185 | * | 1185 | * |
1186 | */ | 1186 | */ |
1187 | 1187 | ||
1188 | /* FTDI_SIO_SET_ERROR_CHAR */ | 1188 | /* FTDI_SIO_SET_ERROR_CHAR */ |
1189 | 1189 | ||
1190 | /* Set the parity error replacement character for the specified communications port */ | 1190 | /* Set the parity error replacement character for the specified communications port */ |
1191 | 1191 | ||
1192 | /* | 1192 | /* |
1193 | * BmRequestType: 0100 0000b | 1193 | * BmRequestType: 0100 0000b |
1194 | * bRequest: FTDI_SIO_SET_EVENT_CHAR | 1194 | * bRequest: FTDI_SIO_SET_EVENT_CHAR |
1195 | * wValue: Error Char | 1195 | * wValue: Error Char |
@@ -1215,15 +1215,15 @@ typedef enum { | |||
1215 | #define FTDI_SIO_DSR_MASK 0x20 | 1215 | #define FTDI_SIO_DSR_MASK 0x20 |
1216 | #define FTDI_SIO_RI_MASK 0x40 | 1216 | #define FTDI_SIO_RI_MASK 0x40 |
1217 | #define FTDI_SIO_RLSD_MASK 0x80 | 1217 | #define FTDI_SIO_RLSD_MASK 0x80 |
1218 | /* | 1218 | /* |
1219 | * BmRequestType: 1100 0000b | 1219 | * BmRequestType: 1100 0000b |
1220 | * bRequest: FTDI_SIO_GET_MODEM_STATUS | 1220 | * bRequest: FTDI_SIO_GET_MODEM_STATUS |
1221 | * wValue: zero | 1221 | * wValue: zero |
1222 | * wIndex: Port | 1222 | * wIndex: Port |
1223 | * wLength: 1 | 1223 | * wLength: 1 |
1224 | * Data: Status | 1224 | * Data: Status |
1225 | * | 1225 | * |
1226 | * One byte of data is returned | 1226 | * One byte of data is returned |
1227 | * B0..3 0 | 1227 | * B0..3 0 |
1228 | * B4 CTS | 1228 | * B4 CTS |
1229 | * 0 = inactive | 1229 | * 0 = inactive |
@@ -1236,15 +1236,15 @@ typedef enum { | |||
1236 | * 1 = active | 1236 | * 1 = active |
1237 | * B7 Receive Line Signal Detect (RLSD) | 1237 | * B7 Receive Line Signal Detect (RLSD) |
1238 | * 0 = inactive | 1238 | * 0 = inactive |
1239 | * 1 = active | 1239 | * 1 = active |
1240 | */ | 1240 | */ |
1241 | 1241 | ||
1242 | 1242 | ||
1243 | 1243 | ||
1244 | /* Descriptors returned by the device | 1244 | /* Descriptors returned by the device |
1245 | * | 1245 | * |
1246 | * Device Descriptor | 1246 | * Device Descriptor |
1247 | * | 1247 | * |
1248 | * Offset Field Size Value Description | 1248 | * Offset Field Size Value Description |
1249 | * 0 bLength 1 0x12 Size of descriptor in bytes | 1249 | * 0 bLength 1 0x12 Size of descriptor in bytes |
1250 | * 1 bDescriptorType 1 0x01 DEVICE Descriptor Type | 1250 | * 1 bDescriptorType 1 0x01 DEVICE Descriptor Type |
@@ -1260,9 +1260,9 @@ typedef enum { | |||
1260 | * 15 iProduct 1 0x02 Index of prod string desc | 1260 | * 15 iProduct 1 0x02 Index of prod string desc |
1261 | * 16 iSerialNumber 1 0x02 Index of serial nmr string desc | 1261 | * 16 iSerialNumber 1 0x02 Index of serial nmr string desc |
1262 | * 17 bNumConfigurations 1 0x01 Number of possible configurations | 1262 | * 17 bNumConfigurations 1 0x01 Number of possible configurations |
1263 | * | 1263 | * |
1264 | * Configuration Descriptor | 1264 | * Configuration Descriptor |
1265 | * | 1265 | * |
1266 | * Offset Field Size Value | 1266 | * Offset Field Size Value |
1267 | * 0 bLength 1 0x09 Size of descriptor in bytes | 1267 | * 0 bLength 1 0x09 Size of descriptor in bytes |
1268 | * 1 bDescriptorType 1 0x02 CONFIGURATION Descriptor Type | 1268 | * 1 bDescriptorType 1 0x02 CONFIGURATION Descriptor Type |
@@ -1272,9 +1272,9 @@ typedef enum { | |||
1272 | * 6 iConfiguration 1 0x02 Index of config string descriptor | 1272 | * 6 iConfiguration 1 0x02 Index of config string descriptor |
1273 | * 7 bmAttributes 1 0x20 Config characteristics Remote Wakeup | 1273 | * 7 bmAttributes 1 0x20 Config characteristics Remote Wakeup |
1274 | * 8 MaxPower 1 0x1E Max power consumption | 1274 | * 8 MaxPower 1 0x1E Max power consumption |
1275 | * | 1275 | * |
1276 | * Interface Descriptor | 1276 | * Interface Descriptor |
1277 | * | 1277 | * |
1278 | * Offset Field Size Value | 1278 | * Offset Field Size Value |
1279 | * 0 bLength 1 0x09 Size of descriptor in bytes | 1279 | * 0 bLength 1 0x09 Size of descriptor in bytes |
1280 | * 1 bDescriptorType 1 0x04 INTERFACE Descriptor Type | 1280 | * 1 bDescriptorType 1 0x04 INTERFACE Descriptor Type |
@@ -1285,9 +1285,9 @@ typedef enum { | |||
1285 | * 6 bInterfaceSubClass 1 0xFF Subclass Code | 1285 | * 6 bInterfaceSubClass 1 0xFF Subclass Code |
1286 | * 7 bInterfaceProtocol 1 0xFF Protocol Code | 1286 | * 7 bInterfaceProtocol 1 0xFF Protocol Code |
1287 | * 8 iInterface 1 0x02 Index of interface string description | 1287 | * 8 iInterface 1 0x02 Index of interface string description |
1288 | * | 1288 | * |
1289 | * IN Endpoint Descriptor | 1289 | * IN Endpoint Descriptor |
1290 | * | 1290 | * |
1291 | * Offset Field Size Value | 1291 | * Offset Field Size Value |
1292 | * 0 bLength 1 0x07 Size of descriptor in bytes | 1292 | * 0 bLength 1 0x07 Size of descriptor in bytes |
1293 | * 1 bDescriptorType 1 0x05 ENDPOINT descriptor type | 1293 | * 1 bDescriptorType 1 0x05 ENDPOINT descriptor type |
@@ -1295,9 +1295,9 @@ typedef enum { | |||
1295 | * 3 bmAttributes 1 0x02 Endpoint attributes - Bulk | 1295 | * 3 bmAttributes 1 0x02 Endpoint attributes - Bulk |
1296 | * 4 bNumEndpoints 2 0x0040 maximum packet size | 1296 | * 4 bNumEndpoints 2 0x0040 maximum packet size |
1297 | * 5 bInterval 1 0x00 Interval for polling endpoint | 1297 | * 5 bInterval 1 0x00 Interval for polling endpoint |
1298 | * | 1298 | * |
1299 | * OUT Endpoint Descriptor | 1299 | * OUT Endpoint Descriptor |
1300 | * | 1300 | * |
1301 | * Offset Field Size Value | 1301 | * Offset Field Size Value |
1302 | * 0 bLength 1 0x07 Size of descriptor in bytes | 1302 | * 0 bLength 1 0x07 Size of descriptor in bytes |
1303 | * 1 bDescriptorType 1 0x05 ENDPOINT descriptor type | 1303 | * 1 bDescriptorType 1 0x05 ENDPOINT descriptor type |
@@ -1305,17 +1305,17 @@ typedef enum { | |||
1305 | * 3 bmAttributes 1 0x02 Endpoint attributes - Bulk | 1305 | * 3 bmAttributes 1 0x02 Endpoint attributes - Bulk |
1306 | * 4 bNumEndpoints 2 0x0040 maximum packet size | 1306 | * 4 bNumEndpoints 2 0x0040 maximum packet size |
1307 | * 5 bInterval 1 0x00 Interval for polling endpoint | 1307 | * 5 bInterval 1 0x00 Interval for polling endpoint |
1308 | * | 1308 | * |
1309 | * DATA FORMAT | 1309 | * DATA FORMAT |
1310 | * | 1310 | * |
1311 | * IN Endpoint | 1311 | * IN Endpoint |
1312 | * | 1312 | * |
1313 | * The device reserves the first two bytes of data on this endpoint to contain the current | 1313 | * The device reserves the first two bytes of data on this endpoint to contain the current |
1314 | * values of the modem and line status registers. In the absence of data, the device | 1314 | * values of the modem and line status registers. In the absence of data, the device |
1315 | * generates a message consisting of these two status bytes every 40 ms | 1315 | * generates a message consisting of these two status bytes every 40 ms |
1316 | * | 1316 | * |
1317 | * Byte 0: Modem Status | 1317 | * Byte 0: Modem Status |
1318 | * | 1318 | * |
1319 | * Offset Description | 1319 | * Offset Description |
1320 | * B0 Reserved - must be 1 | 1320 | * B0 Reserved - must be 1 |
1321 | * B1 Reserved - must be 0 | 1321 | * B1 Reserved - must be 0 |
@@ -1325,9 +1325,9 @@ typedef enum { | |||
1325 | * B5 Data Set Ready (DSR) | 1325 | * B5 Data Set Ready (DSR) |
1326 | * B6 Ring Indicator (RI) | 1326 | * B6 Ring Indicator (RI) |
1327 | * B7 Receive Line Signal Detect (RLSD) | 1327 | * B7 Receive Line Signal Detect (RLSD) |
1328 | * | 1328 | * |
1329 | * Byte 1: Line Status | 1329 | * Byte 1: Line Status |
1330 | * | 1330 | * |
1331 | * Offset Description | 1331 | * Offset Description |
1332 | * B0 Data Ready (DR) | 1332 | * B0 Data Ready (DR) |
1333 | * B1 Overrun Error (OE) | 1333 | * B1 Overrun Error (OE) |
@@ -1337,7 +1337,7 @@ typedef enum { | |||
1337 | * B5 Transmitter Holding Register (THRE) | 1337 | * B5 Transmitter Holding Register (THRE) |
1338 | * B6 Transmitter Empty (TEMT) | 1338 | * B6 Transmitter Empty (TEMT) |
1339 | * B7 Error in RCVR FIFO | 1339 | * B7 Error in RCVR FIFO |
1340 | * | 1340 | * |
1341 | */ | 1341 | */ |
1342 | #define FTDI_RS0_CTS (1 << 4) | 1342 | #define FTDI_RS0_CTS (1 << 4) |
1343 | #define FTDI_RS0_DSR (1 << 5) | 1343 | #define FTDI_RS0_DSR (1 << 5) |
@@ -1355,17 +1355,17 @@ typedef enum { | |||
1355 | 1355 | ||
1356 | /* | 1356 | /* |
1357 | * OUT Endpoint | 1357 | * OUT Endpoint |
1358 | * | 1358 | * |
1359 | * This device reserves the first bytes of data on this endpoint contain the length | 1359 | * This device reserves the first bytes of data on this endpoint contain the length |
1360 | * and port identifier of the message. For the FTDI USB Serial converter the port | 1360 | * and port identifier of the message. For the FTDI USB Serial converter the port |
1361 | * identifier is always 1. | 1361 | * identifier is always 1. |
1362 | * | 1362 | * |
1363 | * Byte 0: Line Status | 1363 | * Byte 0: Line Status |
1364 | * | 1364 | * |
1365 | * Offset Description | 1365 | * Offset Description |
1366 | * B0 Reserved - must be 1 | 1366 | * B0 Reserved - must be 1 |
1367 | * B1 Reserved - must be 0 | 1367 | * B1 Reserved - must be 0 |
1368 | * B2..7 Length of message - (not including Byte 0) | 1368 | * B2..7 Length of message - (not including Byte 0) |
1369 | * | 1369 | * |
1370 | */ | 1370 | */ |
1371 | 1371 | ||