usr/src/uts/common/sys/usb/clients/usbser/usbsacm/usbsacm.h
author yq193411
Tue, 12 Dec 2006 23:36:51 -0800
changeset 3227 9602d8b74112
child 7492 2387323b838f
permissions -rw-r--r--
6428204 CDC ACM class driver and devices with modem function need to be supported
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3227
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
     1
/*
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
     2
 * CDDL HEADER START
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
     3
 *
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
     4
 * The contents of this file are subject to the terms of the
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
     5
 * Common Development and Distribution License (the "License").
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
     6
 * You may not use this file except in compliance with the License.
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
     7
 *
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
     8
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
     9
 * or http://www.opensolaris.org/os/licensing.
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    10
 * See the License for the specific language governing permissions
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    11
 * and limitations under the License.
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    12
 *
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    13
 * When distributing Covered Code, include this CDDL HEADER in each
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    14
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    15
 * If applicable, add the following below this CDDL HEADER, with the
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    16
 * fields enclosed by brackets "[]" replaced with your own identifying
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    17
 * information: Portions Copyright [yyyy] [name of copyright owner]
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    18
 *
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    19
 * CDDL HEADER END
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    20
 */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    21
/*
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    22
 * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    23
 * Use is subject to license terms.
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    24
 */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    25
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    26
#ifndef _SYS_USB_USBSACM_H
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    27
#define	_SYS_USB_USBSACM_H
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    28
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    29
#pragma ident	"%Z%%M%	%I%	%E% SMI"
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    30
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    31
#include <sys/types.h>
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    32
#include <sys/dditypes.h>
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    33
#include <sys/note.h>
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    34
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    35
#include <sys/usb/clients/usbser/usbser_dsdi.h>
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    36
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    37
#ifdef	__cplusplus
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    38
extern "C" {
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    39
#endif
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    40
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    41
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    42
typedef struct usbsacm_port usbsacm_port_t;
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    43
typedef struct usbsacm_state usbsacm_state_t;
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    44
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    45
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    46
/*
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    47
 * PM support
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    48
 */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    49
typedef struct usbsacm_power {
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    50
	uint8_t		pm_wakeup_enabled;	/* remote wakeup enabled */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    51
	uint8_t		pm_pwr_states;	/* bit mask of power states */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    52
	boolean_t	pm_raise_power;	/* driver is about to raise power */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    53
	uint8_t		pm_cur_power;	/* current power level */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    54
	uint_t		pm_busy_cnt;	/* number of set_busy requests */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    55
} usbsacm_pm_t;
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    56
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    57
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    58
/*
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    59
 * per bulk in/out structure
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    60
 */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    61
struct usbsacm_port {
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    62
	kmutex_t		acm_port_mutex;		/* structure lock */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    63
	usbsacm_state_t		*acm_device;		/* back pointer */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    64
	usb_pipe_handle_t	acm_bulkin_ph;		/* in pipe hdl */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    65
	int			acm_bulkin_state;	/* in pipe state */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    66
	usb_pipe_handle_t	acm_bulkout_ph;		/* out pipe hdl */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    67
	int			acm_bulkout_state;	/* out pipe state */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    68
	usb_pipe_handle_t	acm_intr_ph;		/* intr pipe hdl */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    69
	int			acm_intr_state;		/* intr pipe state */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    70
	usb_ep_descr_t		acm_intr_ep_descr;	/* ep descriptor */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    71
	int			acm_ctrl_if_no;		/* control interface */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    72
	int			acm_data_if_no;		/* data interface */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    73
	int			acm_data_port_no;	/* which data port */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    74
	ds_cb_t			acm_cb;			/* DSD callbacks */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    75
	mblk_t			*acm_rx_mp;		/* rx data */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    76
	mblk_t			*acm_tx_mp;		/* tx data */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    77
	kcondvar_t		acm_tx_cv;		/* tx completion */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    78
	uint8_t			acm_mctlout;		/* controls out */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    79
	uint8_t			acm_mctlin;		/* controls in */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    80
	int			acm_cap;		/* port capabilities */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    81
	usb_cdc_line_coding_t	acm_line_coding;	/* port line coding */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    82
	int			acm_port_state;		/* port state */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    83
	size_t			acm_bulkin_size;	/* bulkin xfer size */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    84
};
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    85
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    86
_NOTE(MUTEX_PROTECTS_DATA(usbsacm_port::acm_port_mutex, usbsacm_port))
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    87
_NOTE(DATA_READABLE_WITHOUT_LOCK(usbsacm_port::{
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    88
	acm_device
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    89
	acm_cb.cb_rx
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    90
	acm_cb.cb_tx
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    91
	acm_cb.cb_arg
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    92
	acm_bulkin_ph
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    93
	acm_bulkout_ph
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    94
	acm_intr_ph
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    95
	acm_ctrl_if_no
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    96
	acm_data_if_no
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    97
	acm_data_port_no
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    98
	acm_port_state
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
    99
}))
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   100
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   101
struct usbsacm_state {
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   102
	kmutex_t		acm_mutex;		/* structure lock */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   103
	dev_info_t		*acm_dip;		/* device info */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   104
	usb_client_dev_data_t	*acm_dev_data;		/* registration data */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   105
	usb_event_t		*acm_usb_events;	/* usb events */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   106
	usb_pipe_handle_t	acm_def_ph;		/* default pipe hdl */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   107
	usb_log_handle_t	acm_lh;			/* USBA log handle */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   108
	int			acm_dev_state;		/* USB device state */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   109
	size_t			acm_xfer_sz;		/* bulk xfer size */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   110
	boolean_t		acm_compatibility;	/* if conform to spec */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   111
	usbsacm_port_t		*acm_ports;		/* per port structs */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   112
	int			acm_port_cnt;		/* port number */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   113
	usbsacm_pm_t		*acm_pm;		/* PM support */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   114
};
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   115
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   116
_NOTE(MUTEX_PROTECTS_DATA(usbsacm_state::acm_mutex, usbsacm_state))
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   117
_NOTE(DATA_READABLE_WITHOUT_LOCK(usbsacm_state::{
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   118
	acm_dip
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   119
	acm_dev_data
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   120
	acm_usb_events
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   121
	acm_def_ph
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   122
	acm_lh
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   123
	acm_dev_state
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   124
	acm_xfer_sz
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   125
	acm_compatibility
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   126
	acm_ports
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   127
	acm_port_cnt
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   128
	acm_pm
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   129
}))
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   130
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   131
/* port state */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   132
enum {
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   133
	USBSACM_PORT_CLOSED,			/* port is closed */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   134
	USBSACM_PORT_OPEN,			/* port is open */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   135
	USBSACM_PORT_CLOSING
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   136
};
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   137
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   138
/* pipe state */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   139
enum {
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   140
	USBSACM_PIPE_CLOSED,			/* pipe is closed */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   141
	USBSACM_PIPE_IDLE,			/* open but no requests */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   142
	USBSACM_PIPE_BUSY,			/* servicing request */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   143
	USBSACM_PIPE_CLOSING			/* pipe is closing */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   144
};
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   145
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   146
/* various tunables */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   147
enum {
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   148
	USBSACM_BULKOUT_TIMEOUT		= 15,	/* bulkout timeout */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   149
	USBSACM_BULKIN_TIMEOUT		= 0	/* bulkin timeout */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   150
};
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   151
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   152
/* hardware definitions */
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   153
enum {
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   154
	USBSACM_REQ_OUT	= USB_DEV_REQ_TYPE_CLASS| USB_DEV_REQ_HOST_TO_DEV,
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   155
	USBSACM_REQ_IN	= USB_DEV_REQ_TYPE_CLASS | USB_DEV_REQ_DEV_TO_HOST,
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   156
	USBSACM_REQ_WRITE_IF		= USBSACM_REQ_OUT | USB_DEV_REQ_RCPT_IF,
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   157
	USBSACM_REQ_READ_IF		= USBSACM_REQ_IN | USB_DEV_REQ_RCPT_IF
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   158
};
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   159
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   160
#define	PRINT_MASK_ATTA		0x00000001
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   161
#define	PRINT_MASK_CLOSE	0x00000002
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   162
#define	PRINT_MASK_OPEN		0x00000004
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   163
#define	PRINT_MASK_EVENTS	0x00000008
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   164
#define	PRINT_MASK_PM		0x00000010
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   165
#define	PRINT_MASK_CB		0x00000020
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   166
#define	PRINT_MASK_ALL		0xFFFFFFFF
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   167
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   168
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   169
#define	NELEM(a)	(sizeof (a) / sizeof (*(a)))
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   170
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   171
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   172
#ifdef	__cplusplus
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   173
}
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   174
#endif
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   175
9602d8b74112 6428204 CDC ACM class driver and devices with modem function need to be supported
yq193411
parents:
diff changeset
   176
#endif	/* _SYS_USB_USBSACM_H */