1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 /* 22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26 #ifndef _SYS_USB_USBSER_PL2303_VENDOR_H 27 #define _SYS_USB_USBSER_PL2303_VENDOR_H 28 29 30 /* 31 * Prolific PL2303 vendor-specific variables 32 */ 33 34 #ifdef __cplusplus 35 extern "C" { 36 #endif 37 38 39 /* 40 * Prolific PL2303 Revision Numbers 41 */ 42 43 #define PROLIFIC_REV_H 0x0202 44 #define PROLIFIC_REV_X 0x0300 45 #define PROLIFIC_REV_HX_CHIP_D 0x0400 46 #define PROLIFIC_REV_1 0x0001 47 48 /* 49 * Vendor-specific Requests 50 */ 51 #define PL2303_SET_LINE_CODING_REQUEST_TYPE 0x21 52 #define PL2303_SET_LINE_CODING_REQUEST 0x20 53 #define PL2303_SET_LINE_CODING_LENGTH 0x07 54 55 #define PL2303_GET_LINE_CODING_REQUEST_TYPE 0xa1 56 #define PL2303_GET_LINE_CODING_REQUEST 0x21 57 #define PL2303_GET_LINE_CODING_LENGTH 0x07 58 59 #define PL2303_SET_CONTROL_REQUEST_TYPE 0x21 60 #define PL2303_SET_CONTROL_REQUEST 0x22 61 #define PL2303_SET_CONTROL_LENGTH 0x00 62 #define PL2303_CONTROL_DTR 0x01 63 #define PL2303_CONTROL_RTS 0x02 64 65 #define PL2303_BREAK_REQUEST_TYPE 0x21 66 #define PL2303_BREAK_REQUEST 0x23 67 #define PL2303_BREAK_LENGTH 0X00 68 #define PL2303_BREAK_ON 0xffff 69 #define PL2303_BREAK_OFF 0x0000 70 71 #define PL2303_VENDOR_WRITE_REQUEST_TYPE 0x40 72 #define PL2303_VENDOR_WRITE_REQUEST 0x01 73 #define PL2303_VENDOR_WRITE_LENGTH 0x00 74 75 #define PL2303_VENDOR_READ_REQUEST_TYPE 0xc0 76 #define PL2303_VENDOR_READ_REQUEST 0x01 77 #define PL2303_VENDOR_READ_LENGTH 0x01 78 79 /* 80 * Cmds of setting XON/XOFF symbol 81 */ 82 #define SET_XONXOFF 0x05 83 84 /* 85 * Device Configuration Registers (DCR0, DCR1, DCR2) 86 */ 87 #define SET_DCR0 0x00 88 #define GET_DCR0 0x80 89 #define DCR0_INIT 0x01 90 #define DCR0_INIT_H 0x41 91 #define DCR0_INIT_X 0x61 92 93 #define SET_DCR1 0x01 94 #define GET_DCR1 0x81 95 #define DCR1_INIT_H 0x80 96 #define DCR1_INIT_X 0x00 97 98 #define SET_DCR2 0x02 99 #define GET_DCR2 0x82 100 #define DCR2_INIT_H 0x24 101 #define DCR2_INIT_X 0x44 102 103 /* 104 * On-chip Date Buffers: 105 */ 106 #define RESET_DOWNSTREAM_DATA_PIPE 0x08 107 #define RESET_UPSTREAM_DATA_PIPE 0x09 108 109 110 #ifdef __cplusplus 111 } 112 #endif 113 114 #endif /* _SYS_USB_USBSER_PL2303_VENDOR_H */ 115