OSDN Git Service

FX2/FX2.h: WAKEUPCS; FX2: PORTxCFG moved to FX2.h
[stock/stock.osdn.git] / FTDI / FTDI.h
1 // FTDI class, header file
2
3 #ifndef _FTDI_H
4 #define _FTDI_H
5
6 enum { // FTDI MPSSE commands
7    MPSSE_SET_BITS_LOW  = 0x80, /*BYTE DATA*/ /*BYTE Direction*/
8    MPSSE_SET_BITS_HIGH = 0x82, /*BYTE DATA*/ /*BYTE Direction*/
9    MPSSE_GET_BITS_LOW  = 0x81,
10    MPSSE_GET_BITS_HIGH = 0x83,
11    MPSSE_TCK_DIVISOR   = 0x86,
12 };
13
14 enum { // FTDI Modem Status flags
15    FT_MS_CTS = 1<<4, // CTS
16    FT_MS_DSR = 1<<5, // DSR
17    FT_MS_RI  = 1<<6, // RI
18    FT_MS_DCD = 1<<7, // DCD
19    FT_MS_DR  = 1<<8,  // Data ready
20    FT_MS_OE  = 1<<9,  // Overrun error
21    FT_MS_PE  = 1<<10, // Parity error
22    FT_MS_FE  = 1<<11, // Framing error
23    FT_MS_BI  = 1<<12, // Break interrupt
24    FT_MS_TH  = 1<<13, // Transmitter holding register
25    FT_MS_TE  = 1<<14, // Transmitter empty
26    FT_MS_RF  = 1<<15, // Error in RCVR FIFO
27 };
28
29 #ifdef __linux__
30 #include "FTDI_linux.h"
31 #else
32 #include "FTDI_win.h"
33 #endif
34
35 #endif // _FTDI_H