ftdi.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568
  1. enum {
  2. /* used by devices which don't provide their own Vid */
  3. FTVid = 0x0403,
  4. FTOpenrdDid = 0x9E90,
  5. FTSheevaVid = 0x9E88,
  6. FTSheevaDid = 0x9E8F,
  7. FTSIODid = 0x8372, /* Product Id SIO appl'n of 8U100AX */
  8. FT8U232AMDid = 0x6001, /* Similar device to SIO above */
  9. FT8U232AMALTDid = 0x6006, /* FT's alternate Did for above*/
  10. FT8U2232CDid = 0x6010, /* Dual channel device */
  11. FTRELAISDid = 0xFA10, /* Relais device */
  12. /* NF reader */
  13. FTNFRICVid = 0x0DCD,
  14. FTNFRICDid = 0x0001,
  15. FTACTZWAVEDid = 0xF2D0, /* www.irtrans.de device */
  16. /*
  17. * ACT Solutions HomePro ZWave interface
  18. * http://www.act-solutions.com/HomePro.htm)
  19. */
  20. FTIRTRANSDid = 0xFC60,
  21. /*
  22. * www.thoughttechnology.com/ TT-USB
  23. */
  24. FTTTUSBDid = 0xFF20,
  25. /* iPlus device */
  26. FTIPLUSDid = 0xD070,
  27. /* www.crystalfontz.com devices */
  28. FTXF632Did = 0xFC08, /* 632: 16x2 Character Display */
  29. FTXF634Did = 0xFC09, /* 634: 20x4 Character Display */
  30. FTXF547Did = 0xFC0A, /* 547: Two line Display */
  31. FTXF633Did = 0xFC0B, /* 633: 16x2 Character Display with Keys */
  32. FTXF631Did = 0xFC0C, /* 631: 20x2 Character Display */
  33. FTXF635Did = 0xFC0D, /* 635: 20x4 Character Display */
  34. FTXF640Did = 0xFC0E, /* 640: Two line Display */
  35. FTXF642Did = 0xFC0F, /* 642: Two line Display */
  36. /*
  37. * Video Networks Limited / Homechoice in the UK
  38. * use an ftdi-based device for their 1Mb broadband
  39. */
  40. FTVNHCPCUSBDDid = 0xfe38,
  41. /*
  42. * PCDJ use ftdi based dj-controllers
  43. * DAC-2 device http://www.pcdjhardware.com/DAC2.asp
  44. */
  45. FTPCDJDAC2Did = 0xFA88,
  46. /*
  47. * Matrix Orbital LCD displays,
  48. * which are the FT232BM (similar to the 8U232AM)
  49. */
  50. FTMTXORB0Did = 0xFA00,
  51. FTMTXORB1Did = 0xFA01,
  52. FTMTXORB2Did = 0xFA02,
  53. FTMTXORB3Did = 0xFA03,
  54. FTMTXORB4Did = 0xFA04,
  55. FTMTXORB5Did = 0xFA05,
  56. FTMTXORB6Did = 0xFA06,
  57. /* Interbiometrics USB I/O Board */
  58. INTERBIOMVid = 0x1209,
  59. INTERBIOMIOBRDDid = 0x1002,
  60. INTERBIOMMINIIOBRDDid = 0x1006,
  61. /*
  62. * The following are the values for the Perle Systems
  63. * UltraPort USB serial converters
  64. */
  65. FTPERLEULTRAPORTDid = 0xF0C0,
  66. /*
  67. * Sealevel SeaLINK+ adapters.
  68. */
  69. SEALEVELVid = 0x0c52,
  70. SEALEVEL2101Did = 0x2101, /* SeaLINK+232 (2101/2105) */
  71. SEALEVEL2102Did = 0x2102, /* SeaLINK+485 (2102) */
  72. SEALEVEL2103Did = 0x2103, /* SeaLINK+232I (2103) */
  73. SEALEVEL2104Did = 0x2104, /* SeaLINK+485I (2104) */
  74. SEALEVEL22011Did = 0x2211, /* SeaPORT+2/232 (2201) Port 1 */
  75. SEALEVEL22012Did = 0x2221, /* SeaPORT+2/232 (2201) Port 2 */
  76. SEALEVEL22021Did = 0x2212, /* SeaPORT+2/485 (2202) Port 1 */
  77. SEALEVEL22022Did = 0x2222, /* SeaPORT+2/485 (2202) Port 2 */
  78. SEALEVEL22031Did = 0x2213, /* SeaPORT+2 (2203) Port 1 */
  79. SEALEVEL22032Did = 0x2223, /* SeaPORT+2 (2203) Port 2 */
  80. SEALEVEL24011Did = 0x2411, /* SeaPORT+4/232 (2401) Port 1 */
  81. SEALEVEL24012Did = 0x2421, /* SeaPORT+4/232 (2401) Port 2 */
  82. SEALEVEL24013Did = 0x2431, /* SeaPORT+4/232 (2401) Port 3 */
  83. SEALEVEL24014Did = 0x2441, /* SeaPORT+4/232 (2401) Port 4 */
  84. SEALEVEL24021Did = 0x2412, /* SeaPORT+4/485 (2402) Port 1 */
  85. SEALEVEL24022Did = 0x2422, /* SeaPORT+4/485 (2402) Port 2 */
  86. SEALEVEL24023Did = 0x2432, /* SeaPORT+4/485 (2402) Port 3 */
  87. SEALEVEL24024Did = 0x2442, /* SeaPORT+4/485 (2402) Port 4 */
  88. SEALEVEL24031Did = 0x2413, /* SeaPORT+4 (2403) Port 1 */
  89. SEALEVEL24032Did = 0x2423, /* SeaPORT+4 (2403) Port 2 */
  90. SEALEVEL24033Did = 0x2433, /* SeaPORT+4 (2403) Port 3 */
  91. SEALEVEL24034Did = 0x2443, /* SeaPORT+4 (2403) Port 4 */
  92. SEALEVEL28011Did = 0x2811, /* SeaLINK+8/232 (2801) Port 1 */
  93. SEALEVEL28012Did = 0x2821, /* SeaLINK+8/232 (2801) Port 2 */
  94. SEALEVEL28013Did = 0x2831, /* SeaLINK+8/232 (2801) Port 3 */
  95. SEALEVEL28014Did = 0x2841, /* SeaLINK+8/232 (2801) Port 4 */
  96. SEALEVEL28015Did = 0x2851, /* SeaLINK+8/232 (2801) Port 5 */
  97. SEALEVEL28016Did = 0x2861, /* SeaLINK+8/232 (2801) Port 6 */
  98. SEALEVEL28017Did = 0x2871, /* SeaLINK+8/232 (2801) Port 7 */
  99. SEALEVEL28018Did = 0x2881, /* SeaLINK+8/232 (2801) Port 8 */
  100. SEALEVEL28021Did = 0x2812, /* SeaLINK+8/485 (2802) Port 1 */
  101. SEALEVEL28022Did = 0x2822, /* SeaLINK+8/485 (2802) Port 2 */
  102. SEALEVEL28023Did = 0x2832, /* SeaLINK+8/485 (2802) Port 3 */
  103. SEALEVEL28024Did = 0x2842, /* SeaLINK+8/485 (2802) Port 4 */
  104. SEALEVEL28025Did = 0x2852, /* SeaLINK+8/485 (2802) Port 5 */
  105. SEALEVEL28026Did = 0x2862, /* SeaLINK+8/485 (2802) Port 6 */
  106. SEALEVEL28027Did = 0x2872, /* SeaLINK+8/485 (2802) Port 7 */
  107. SEALEVEL28028Did = 0x2882, /* SeaLINK+8/485 (2802) Port 8 */
  108. SEALEVEL28031Did = 0x2813, /* SeaLINK+8 (2803) Port 1 */
  109. SEALEVEL28032Did = 0x2823, /* SeaLINK+8 (2803) Port 2 */
  110. SEALEVEL28033Did = 0x2833, /* SeaLINK+8 (2803) Port 3 */
  111. SEALEVEL28034Did = 0x2843, /* SeaLINK+8 (2803) Port 4 */
  112. SEALEVEL28035Did = 0x2853, /* SeaLINK+8 (2803) Port 5 */
  113. SEALEVEL28036Did = 0x2863, /* SeaLINK+8 (2803) Port 6 */
  114. SEALEVEL28037Did = 0x2873, /* SeaLINK+8 (2803) Port 7 */
  115. SEALEVEL28038Did = 0x2883, /* SeaLINK+8 (2803) Port 8 */
  116. /* KOBIL Vendor ID chipcard terminals */
  117. KOBILVid = 0x0d46,
  118. KOBILCONVB1Did = 0x2020, /* KOBIL Konverter for B1 */
  119. KOBILCONVKAANDid = 0x2021, /* KOBILKonverter for KAAN */
  120. /* Icom ID-1 digital transceiver */
  121. ICOMID1Vid = 0x0C26,
  122. ICOMID1Did = 0x0004,
  123. FTASKRDR400Did = 0xC991, /* ASK RDR 400 series card reader */
  124. FTDSS20Did = 0xFC82, /* DSS-20 Sync Station for Sony Ericsson P800 */
  125. /*
  126. * Home Electronics (www.home-electro.com) USB gadgets
  127. */
  128. FTHETIRA1Did = 0xFA78, /* Tira-1 IR transceiver */
  129. /*
  130. * An infrared receiver and transmitter using the 8U232AM chip
  131. * http://www.usbuirt.com
  132. */
  133. FTUSBUIRTDid = 0xF850,
  134. FTELVUR100Did = 0xFB58, /* USB-RS232-Umsetzer (UR 100) */
  135. FTELVUM100Did = 0xFB5A, /* USB-Modul UM 100 */
  136. FTELVUO100Did = 0xFB5B, /* USB-Modul UO 100 */
  137. FTELVALC8500Did = 0xF06E, /* ALC 8500 Expert */
  138. FTELVCLI7000Did = 0xFB59, /* Computer-Light-Interface */
  139. FTELVPPS7330Did = 0xFB5C, /* Processor-Power-Supply (PPS 7330) */
  140. FTELVTFM100Did = 0xFB5D, /* Temperartur-Feuchte Messgeraet (TFM 100) */
  141. FTELVUDF77Did = 0xFB5E, /* USB DCF Funkurh (UDF 77) */
  142. FTELVUIO88Did = 0xFB5F, /* USB-I/O Interface (UIO 88) */
  143. FTELVUAD8Did = 0xF068, /* USB-AD-Wandler (UAD 8) */
  144. FTELVUDA7Did = 0xF069, /* USB-DA-Wandler (UDA 7) */
  145. FTELVUSI2Did = 0xF06A, /* USB-Schrittmotoren-Interface (USI 2) */
  146. FTELVT1100Did = 0xF06B, /* Thermometer (T 1100) */
  147. FTELVPCD200Did = 0xF06C, /* PC-Datenlogger (PCD 200) */
  148. FTELVULA200Did = 0xF06D, /* USB-LCD-Ansteuerung (ULA 200) */
  149. FTELVFHZ1000PCDid= 0xF06F, /* FHZ 1000 PC */
  150. FTELVCSI8Did = 0xE0F0, /* Computer-Schalt-Interface (CSI 8) */
  151. FTELVEM1000DLDid= 0xE0F1, /* PC-Datenlogger fuer Energiemonitor (EM 1000 DL) */
  152. FTELVPCK100Did = 0xE0F2, /* PC-Kabeltester (PCK 100) */
  153. FTELVRFP500Did = 0xE0F3, /* HF-Leistungsmesser (RFP 500) */
  154. FTELVFS20SIGDid = 0xE0F4, /* Signalgeber (FS 20 SIG) */
  155. FTELVWS300PCDid = 0xE0F6, /* PC-Wetterstation (WS 300 PC) */
  156. FTELVFHZ1300PCDid= 0xE0E8, /* FHZ 1300 PC */
  157. FTELVWS500Did = 0xE0E9, /* PC-Wetterstation (WS 500) */
  158. /*
  159. * Definitions for ID TECH (http://www.idt-net.com) devices
  160. */
  161. IDTECHVid = 0x0ACD, /* ID TECH Vendor ID */
  162. IDTECHIDT1221UDid= 0x0300, /* IDT1221U USB to RS-232 */
  163. /*
  164. * Definitions for Omnidirectional Control Technology, Inc. devices
  165. */
  166. OCTVid = 0x0B39, /* OCT vendor ID */
  167. /*
  168. * Note: OCT US101 is also rebadged as Dick Smith Electronics
  169. * (NZ) XH6381, Dick Smith Electronics (Aus) XH6451, and SIIG
  170. * Inc. model US2308 hardware version 1.
  171. */
  172. OCTUS101Did = 0x0421, /* OCT US101 USB to RS-232 */
  173. /*
  174. * infrared receiver for access control with IR tags
  175. */
  176. FTPIEGROUPDid = 0xF208,
  177. /*
  178. * Definitions for Artemis astronomical USB based cameras
  179. * http://www.artemisccd.co.uk/
  180. */
  181. FTARTEMISDid = 0xDF28, /* All Artemis Cameras */
  182. FTATIKATK16Did = 0xDF30, /* ATIK ATK-16 Grayscale Camera */
  183. FTATIKATK16CDid = 0xDF32, /* ATIK ATK-16C Colour Camera */
  184. FTATIKATK16HRDid= 0xDF31, /* ATIK ATK-16HR Grayscale */
  185. FTATIKATK16HRCDid= 0xDF33, /* ATIK ATK-16HRC Colour Camera */
  186. /*
  187. * Protego products
  188. */
  189. PROTEGOSPECIAL1 = 0xFC70, /* special/unknown device */
  190. PROTEGOR2X0 = 0xFC71, /* R200-USB TRNG unit (R210, R220, and R230) */
  191. PROTEGOSPECIAL3 = 0xFC72, /* special/unknown device */
  192. PROTEGOSPECIAL4 = 0xFC73, /* special/unknown device */
  193. /*
  194. * Gude Analog- und Digitalsysteme GmbH
  195. */
  196. FTGUDEADSE808Did = 0xE808,
  197. FTGUDEADSE809Did = 0xE809,
  198. FTGUDEADSE80ADid = 0xE80A,
  199. FTGUDEADSE80BDid = 0xE80B,
  200. FTGUDEADSE80CDid = 0xE80C,
  201. FTGUDEADSE80DDid = 0xE80D,
  202. FTGUDEADSE80EDid = 0xE80E,
  203. FTGUDEADSE80FDid = 0xE80F,
  204. FTGUDEADSE888Did = 0xE888, /* Expert ISDN Control USB */
  205. FTGUDEADSE889Did = 0xE889, /* USB RS-232 OptoBridge */
  206. FTGUDEADSE88ADid = 0xE88A,
  207. FTGUDEADSE88BDid = 0xE88B,
  208. FTGUDEADSE88CDid = 0xE88C,
  209. FTGUDEADSE88DDid = 0xE88D,
  210. FTGUDEADSE88EDid = 0xE88E,
  211. FTGUDEADSE88FDid = 0xE88F,
  212. /*
  213. * Linx Technologies
  214. */
  215. LINXSDMUSBQSSDid= 0xF448, /* Linx SDM-USB-QS-S */
  216. LINXMASTERDEVEL2Did= 0xF449, /* Linx Master Development.0 */
  217. LINXFUTURE0Did = 0xF44A, /* Linx future device */
  218. LINXFUTURE1Did = 0xF44B, /* Linx future device */
  219. LINXFUTURE2Did = 0xF44C, /* Linx future device */
  220. /*
  221. * CCS Inc. ICDU/ICDU40 - the FT232BM used in a in-circuit-debugger
  222. * unit for PIC16's/PIC18's
  223. */
  224. FTCCSICDU200Did = 0xF9D0,
  225. FTCCSICDU401Did = 0xF9D1,
  226. /* Inside Accesso contactless reader (http://www.insidefr.com) */
  227. INSIDEACCESSO = 0xFAD0,
  228. /*
  229. * Intrepid Control Systems (http://www.intrepidcs.com/)
  230. * ValueCAN and NeoVI
  231. */
  232. INTREDidVid = 0x093C,
  233. INTREDidVALUECANDid= 0x0601,
  234. INTREDidNEOVIDid= 0x0701,
  235. /*
  236. * Falcom Wireless Communications GmbH
  237. */
  238. FALCOMVid = 0x0F94,
  239. FALCOMTWISTDid = 0x0001, /* Falcom Twist USB GPRS modem */
  240. FALCOMSAMBADid = 0x0005, /* Falcom Samba USB GPRS modem */
  241. /*
  242. * SUUNTO
  243. */
  244. FTSUUNTOSPORTSDid= 0xF680, /* Suunto Sports instrument */
  245. /*
  246. * B&B Electronics
  247. */
  248. BANDBVid = 0x0856, /* B&B Electronics Vendor ID */
  249. BANDBUSOTL4Did = 0xAC01, /* USOTL4 Isolated RS-485 */
  250. BANDBUSTL4Did = 0xAC02, /* USTL4 RS-485 Converter */
  251. BANDBUSO9ML2Did = 0xAC03, /* USO9ML2 Isolated RS-232 */
  252. /*
  253. * RM Michaelides CANview USB (http://www.rmcan.com)
  254. * CAN fieldbus interface adapter
  255. */
  256. FTRMCANVIEWDid = 0xfd60,
  257. /*
  258. * EVER Eco Pro UPS (http://www.ever.com.pl/)
  259. */
  260. EVERECOPROCDSDid = 0xe520, /* RS-232 converter */
  261. /*
  262. * 4N-GALAXY.DE PIDs for CAN-USB, USB-RS232, USB-RS422, USB-RS485,
  263. * USB-TTY activ, USB-TTY passiv. Some PIDs are used by several devices
  264. */
  265. FT4NGALAXYDE0Did = 0x8372,
  266. FT4NGALAXYDE1Did = 0xF3C0,
  267. FT4NGALAXYDE2Did = 0xF3C1,
  268. /*
  269. * Mobility Electronics products.
  270. */
  271. MOBILITYVid = 0x1342,
  272. MOBILITYUSBSERIALDid= 0x0202, /* EasiDock USB 200 serial */
  273. /*
  274. * microHAM product IDs (http://www.microham.com)
  275. */
  276. FTMHAMKWDid = 0xEEE8, /* USB-KW interface */
  277. FTMHAMYSDid = 0xEEE9, /* USB-YS interface */
  278. FTMHAMY6Did = 0xEEEA, /* USB-Y6 interface */
  279. FTMHAMY8Did = 0xEEEB, /* USB-Y8 interface */
  280. FTMHAMICDid = 0xEEEC, /* USB-IC interface */
  281. FTMHAMDB9Did = 0xEEED, /* USB-DB9 interface */
  282. FTMHAMRS232Did = 0xEEEE, /* USB-RS232 interface */
  283. FTMHAMY9Did = 0xEEEF, /* USB-Y9 interface */
  284. /*
  285. * Active Robots product ids.
  286. */
  287. FTACTIVEROBOTSDid = 0xE548, /* USB comms board */
  288. XSENSCONVERTER0Did = 0xD388,
  289. XSENSCONVERTER1Did = 0xD389,
  290. XSENSCONVERTER2Did = 0xD38A,
  291. XSENSCONVERTER3Did = 0xD38B,
  292. XSENSCONVERTER4Did = 0xD38C,
  293. XSENSCONVERTER5Did = 0xD38D,
  294. XSENSCONVERTER6Did = 0xD38E,
  295. XSENSCONVERTER7Did = 0xD38F,
  296. /*
  297. * Xsens Technologies BV products (http://www.xsens.com).
  298. */
  299. FTTERATRONIKVCPDid = 0xEC88, /* Teratronik device */
  300. FTTERATRONIKD2XXDid = 0xEC89, /* Teratronik device */
  301. /*
  302. * Evolution Robotics products (http://www.evolution.com/).
  303. */
  304. EVOLUTIONVid = 0xDEEE,
  305. EVOLUTIONER1Did = 0x0300, /* ER1 Control Module */
  306. /* Pyramid Computer GmbH */
  307. FTPYRAMIDDid = 0xE6C8, /* Pyramid Appliance Display */
  308. /*
  309. * Posiflex inc retail equipment (http://www.posiflex.com.tw)
  310. */
  311. POSIFLEXVid = 0x0d3a,
  312. POSIFLEXPP7000Did= 0x0300, /* PP-7000II thermal printer */
  313. /*
  314. * Westrex International devices
  315. */
  316. FTWESTREXMODEL777Did = 0xDC00, /* Model 777 */
  317. FTWESTREXMODEL8900FDid = 0xDC01, /* Model 8900F */
  318. /*
  319. * RR-CirKits LocoBuffer USB (http://www.rr-cirkits.com)
  320. */
  321. FTRRCIRKITSLOCOBUFFERDid= 0xc7d0, /* LocoBuffer USB */
  322. FTECLOCOM1WIREDid = 0xEA90, /* COM to 1-Wire USB */
  323. /*
  324. * Papouch products (http://www.papouch.com/)
  325. */
  326. PAPOUCHVid = 0x5050,
  327. PAPOUCHTMUDid = 0x0400, /* TMU USB Thermometer */
  328. /*
  329. * ACG Identification Technologies GmbH products http://www.acg.de/
  330. */
  331. FTACGHFDUALDid = 0xDD20, /* HF Dual ISO Reader (RFID) */
  332. };
  333. /* Commands */
  334. enum {
  335. FTRESET = 0, /* Reset the port */
  336. FTSETMODEMCTRL, /* Set the modem control register */
  337. FTSETFLOWCTRL, /* Set flow control register */
  338. FTSETBaudRate, /* Set baud rate */
  339. FTSETDATA, /* Set the parameters, parity */
  340. FTGETMODEMSTATUS, /* Retrieve current value of modem ctl */
  341. FTSETEVENTCHAR, /* Set the event character */
  342. FTSETERRORCHAR, /* Set the error character */
  343. FTSETLATENCYTIMER, /* Set the latency timer */
  344. FTGETLATENCYTIMER, /* Get the latency timer */
  345. FTGETE2READ = 0x90, /* Read an address */
  346. };
  347. enum {
  348. Rftdireq = 1<<6, /* bit for type of request */
  349. };
  350. /*
  351. * Commands Data size
  352. * Sets have wLength = 0
  353. * Gets have wValue = 0
  354. */
  355. enum {
  356. FTGETMODEMSTATUSSZ = 1,
  357. FTGETLATENCYTIMERSZ = 0, /* Get the latency timer */
  358. FTGETE2READSZ = 2, /* Read an address */
  359. };
  360. /*
  361. * bRequest: FTGETE2READ
  362. * wIndex: Address of word to read
  363. * Data: Will return a word of data from E2Address
  364. */
  365. /* Port Identifier Table */
  366. enum {
  367. PITDEFAULT = 0, /* SIOA */
  368. PITA, /* SIOA */
  369. };
  370. /*
  371. * bRequest: FTRESET
  372. * wValue: Ctl Val
  373. * wIndex: Port
  374. */
  375. enum {
  376. FTRESETCTLVAL = 0,
  377. FTRESETCTLVALPURGERX = 1,
  378. FTRESETCTLVALPURGETX = 2,
  379. };
  380. /*
  381. * BmRequestType: SET
  382. * bRequest: FTSETBaudRate
  383. * wValue: BaudDivisor value - see below
  384. * Bits 15 to 0 of the 17-bit divisor are placed in the request value.
  385. * Bit 16 is placed in bit 0 of the request index.
  386. */
  387. /* chip type */
  388. enum {
  389. SIO = 1,
  390. FT8U232AM= 2,
  391. FT232BM = 3,
  392. FT2232C = 4,
  393. };
  394. enum {
  395. FTb300 = 0,
  396. FTb600 = 1,
  397. FTb1200 = 2,
  398. FTb2400 = 3,
  399. FTb4800 = 4,
  400. FTb9600 = 5,
  401. FTb19200 = 6,
  402. FTb38400 = 7,
  403. FTb57600 = 8,
  404. FTb115200 = 9,
  405. };
  406. /*
  407. * bRequest: FTSETDATA
  408. * wValue: Data characteristics
  409. * wIndex: Port
  410. */
  411. enum {
  412. FTSETDATAParNONE = 0 << 8,
  413. FTSETDATAParODD = 1 << 8,
  414. FTSETDATAParEVEN = 2 << 8,
  415. FTSETDATAParMARK = 3 << 8,
  416. FTSETDATAParSPACE = 4 << 8,
  417. FTSETDATASTOPBITS1 = 0 << 11,
  418. FTSETDATASTOPBITS15 = 1 << 11,
  419. FTSETDATASTOPBITS2 = 2 << 11,
  420. FTSETBREAK = 1 << 14,
  421. };
  422. /*
  423. * bRequest: FTSETMODEMCTRL
  424. * wValue: ControlValue (see below)
  425. * wIndex: Port
  426. */
  427. /*
  428. * bRequest: FTSETFLOWCTRL
  429. * wValue: Xoff/Xon
  430. * wIndex: Protocol/Port - hIndex is protocl / lIndex is port
  431. */
  432. enum {
  433. FTDISABLEFLOWCTRL= 0,
  434. FTRTSCTSHS = 1 << 8,
  435. FTDTRDSRHS = 2 << 8,
  436. FTXONXOFFHS = 4 << 8,
  437. };
  438. /*
  439. * bRequest: FTGETLATENCYTIMER
  440. * wIndex: Port
  441. * wLength: 0
  442. * Data: latency (on return)
  443. */
  444. /*
  445. * bRequest: FTSETLATENCYTIMER
  446. * wValue: Latency (milliseconds)
  447. * wIndex: Port
  448. */
  449. /*
  450. * BmRequestType: SET
  451. * bRequest: FTSETEVENTCHAR
  452. * wValue: EventChar
  453. * wIndex: Port
  454. */
  455. /*
  456. * BmRequestType: SET
  457. * bRequest: FTSETERRORCHAR
  458. * wValue: Error Char
  459. * wIndex: Port
  460. */
  461. /*
  462. * BmRequestType: GET
  463. * bRequest: FTGETMODEMSTATUS
  464. * wIndex: Port
  465. * wLength: 1
  466. * Data: Status
  467. */
  468. enum {
  469. FTCTSMASK = 0x10,
  470. FTDSRMASK = 0x20,
  471. FTRIMASK = 0x40,
  472. FTRLSDMASK = 0x80,
  473. };
  474. enum {
  475. /* byte 0 of in data hdr */
  476. FTICTS = 1 << 4,
  477. FTIDSR = 1 << 5,
  478. FTIRI = 1 << 6,
  479. FTIRLSD = 1 << 7, /* receive line signal detect */
  480. /* byte 1 of in data hdr */
  481. FTIDR = 1<<0, /* data ready */
  482. FTIOE = 1<<1, /* overrun error */
  483. FTIPE = 1<<2, /* parity error */
  484. FTIFE = 1<<3, /* framing error */
  485. FTIBI = 1<<4, /* break interrupt */
  486. FTITHRE = 1<<5, /* xmitter holding register */
  487. FTITEMT = 1<<6, /* xmitter empty */
  488. FTIFIFO = 1<<7, /* error in rcv fifo */
  489. /* byte 0 of out data hdr len does not include byte 0 */
  490. FTOLENMSK= 0x3F,
  491. FTOPORT = 0x80, /* must be set */
  492. };
  493. extern Serialops ftops;
  494. int ftmatch(Serial *ser, char *info);