usa90msg.h revision 60b08185ce63023f22fd6b2ed0db8c0d119b2023
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct keyspan_usa19hs_port_ctrl_msg keyspan_usa19hs_port_ctrl_msg_t;
typedef struct keyspan_usa19hs_port_status_msg
/*
*
* Copyright (c) 1998-2003 InnoSys Incorporated. All Rights Reserved
* This file is available under a BSD-style copyright
*
* Keyspan USB Async Firmware to run on xxxxx
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain this licence text
* without modification, this list of conditions, and the following
* disclaimer. The following copyright notice must appear immediately at
* the beginning of all source files:
*
* Copyright (c) 1998-2000 InnoSys Incorporated. All Rights Reserved
*
* This file is available under a BSD-style copyright
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
*
* 3. The name of InnoSys Incorprated may not be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY INNOSYS CORP. ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* Revisions:
*
*
*/
struct keyspan_usa19hs_port_ctrl_msg {
/*
* there are three types of "commands" sent in the control message:
*
* configuration changes which must be requested by setting
* the corresponding "set" flag (and should only be requested
* when necessary, to reduce overhead on the device):
*/
/* host requests tx flow control be set */
/* host requests rx flow control be set */
/*
* configuration data which is simply used as is
* and must be specified correctly in every host message.
*/
/* forward when this number of chars available */
/*
* Firmware states which cause actions if they change
* and must be specified correctly in every host message.
*/
/*
* commands which are flags only; these are processed in order
* (so that, e.g., if rxFlush and rxForward flags are set, the
* port will have no data to forward); any non-zero value
* is respected
*/
/* forward all inbound data, NOW (as if fwdLen==1) */
};
/* defines for bits in lcr */
#define USA_DATABITS_5 0x00
#define USA_DATABITS_6 0x01
#define USA_DATABITS_7 0x02
#define USA_DATABITS_8 0x03
#define USA_PARITY_NONE 0x00
#define USA_PARITY_ODD 0x08
#define USA_PARITY_EVEN 0x18
#define TXFLOW_CTS 0x04
#define TXFLOW_DSR 0x08
#define TXFLOW_XOFF 0x01
#define TXFLOW_XOFF_ANY 0x02
#define RXFLOW_XOFF 0x10
#define RXFLOW_RTS 0x20
#define RXFLOW_DTR 0x40
#define RXFLOW_DSR_SENSITIVITY 0x80
#define RXMODE_BYHAND 0x00
#define RXMODE_DMA 0x02
#define TXMODE_BYHAND 0x00
#define TXMODE_DMA 0x02
/* all things called "StatusMessage" are sent on the status endpoint */
struct keyspan_usa19hs_port_status_msg {
/* count of overrun errors (since last reported) */
/* count of parity errors (since last reported) */
/* count of frame errors (since last reported) */
/* (value = returnStatus) a control message has been processed */
};
/* bits in RX data message when STAT byte is included */
#define RXERROR_OVERRUN 0x02
#define RXERROR_PARITY 0x04
#define RXERROR_FRAMING 0x08
#define RXERROR_BREAK 0x10
#define PORTSTATE_ENABLED 0x80
#define PORTSTATE_TXFLUSH 0x01
#define PORTSTATE_TXBREAK 0x02
#define PORTSTATE_LOOPBACK 0x04
/* MSR bits */
/* CTS has changed since last report */
#define USA_MSR_dCTS 0x01
#define USA_MSR_dDSR 0x02
#define USA_MSR_dRI 0x04
#define USA_MSR_dDCD 0x08
#define USA_MSR_DSR 0x20
#define USA_USA_MSR_RI 0x40
#define MSR_DCD 0x80
/* ie: the maximum length of an endpoint buffer */
#define MAX_DATA_LEN 64
#ifdef __cplusplus
}
#endif
#endif /* _SYS_USB_USBSER_KEYSPAN_USA90MSG_H */