Back to home page

Quest Cross Reference

 
 

    


Warning, cross-references for /kernel/include/drivers/usb/pl2303.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 _PL2303_H_
0019 #define _PL2303_H_
0020 
0021 #include <types.h>
0022 
0023 #define USB_PL2303_SET_LINE                0x20
0024 #define USB_PL2303_SET_CONTROL             0x22
0025 #define USB_PL2303_CONTROL_DTR             0x01
0026 #define USB_PL2303_CONTROL_RTS             0x02
0027 #define USB_PL2303_BREAK                   0x23
0028 #define USB_PL2303_BREAK_ON                0xFFFF
0029 #define USB_PL2303_BREAK_OFF               0x0000
0030 #define USB_PL2303_GET_LINE                0x21
0031 
0032 /* PL2303 configuration structure */
0033 struct pl2303_config
0034 {
0035   uint32_t baud_rate;
0036   uint8_t stop_bits; /* Stop Bits, 0 = 1, 1 = 1.5, 2 = 2 */
0037   uint8_t parity; /* 0 = none, 1 = odd, 2 = even, 3 = mark, 4 = space */
0038   uint8_t data_bits; /* Data Bits, 5, 6, 7 or 8 */
0039 } __attribute__ ((packed));
0040 
0041 typedef struct pl2303_config PL2303_CONFIG;
0042 
0043 extern char getc (void);
0044 extern void putc (char);
0045 
0046 #endif
0047 
0048 /*
0049  * Local Variables:
0050  * indent-tabs-mode: nil
0051  * mode: C
0052  * c-file-style: "gnu"
0053  * c-basic-offset: 2
0054  * End:
0055  */
0056 
0057 /* vi: set et sw=2 sts=2: */