usa90msg.h revision d29f5a711240f866521445b1656d114da090335e
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#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
*
* Keyspan USB Async Firmware to run on xxxxx
*
*
* 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 */