Back to home page

Quest Cross Reference

 
 

    


Warning, cross-references for /kernel/include/drivers/usb/ftdi.h need to be fixed.

0001 /*                    The Quest Operating System
0002  *  Copyright (C) 2005-2010  Richard West, Boston University
0003  *
0004  *  This program is free software: you can redistribute it and/or modify
0005  *  it under the terms of the GNU General Public License as published by
0006  *  the Free Software Foundation, either version 3 of the License, or
0007  *  (at your option) any later version.
0008  *
0009  *  This program is distributed in the hope that it will be useful,
0010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
0011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0012  *  GNU General Public License for more details.
0013  *
0014  *  You should have received a copy of the GNU General Public License
0015  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
0016  */
0017 
0018 #ifndef _FTDI_H_
0019 #define _FTDI_H_
0020 
0021 #include <types.h>
0022 
0023 /* FTDI Commands */
0024 #define USB_FTDI_RESET                  0x00
0025 #define USB_FTDI_MODEM_CTRL             0x01
0026 #define USB_FTDI_SET_FLOW_CTRL          0x02
0027 #define USB_FTDI_SET_BAUD_RATE          0x03
0028 #define USB_FTDI_SET_DATA               0x04
0029 #define USB_FTDI_GET_MODEM_STATUS       0x05
0030 #define USB_FTDI_SET_EVENT_CHAR         0x06
0031 #define USB_FTDI_SET_ERROR_CHAR         0x07
0032 #define USB_FTDI_SET_LATENCY_TIMER      0x09
0033 #define USB_FTDI_GET_LATENCY_TIMER      0x0A
0034 
0035 #define USB_FTDI_NO_FLOW_CTRL           0x00
0036 #define USB_FTDI_RTS_CTS                (0x01 << 8)
0037 #define USB_FTDI_DTR_DSR                (0x02 << 8)
0038 
0039 #define USB_FTDI_DTR_HIGH               (1 | (0x01 << 8))
0040 #define USB_FTDI_DTR_LOW                (0 | (0x01 << 8))
0041 #define USB_FTDI_RTS_HIGH               (2 | (0x02 << 8))
0042 #define USB_FTDI_RTS_LOW                (0 | (0x02 << 8))
0043 
0044 extern bool usb_ftdi_driver_init (void);
0045 extern void usb_ftdi_putc (char);
0046 extern char usb_ftdi_getc (void);
0047 
0048 #endif
0049 
0050 /*
0051  * Local Variables:
0052  * indent-tabs-mode: nil
0053  * mode: C
0054  * c-file-style: "gnu"
0055  * c-basic-offset: 2
0056  * End:
0057  */
0058 
0059 /* vi: set et sw=2 sts=2: */