usbsacm.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.
*/
#ifndef _SYS_USB_USBSACM_H
#define _SYS_USB_USBSACM_H
#include <sys/dditypes.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct usbsacm_port usbsacm_port_t;
typedef struct usbsacm_state usbsacm_state_t;
/*
* PM support
*/
typedef struct usbsacm_power {
} usbsacm_pm_t;
/*
*/
struct usbsacm_port {
int acm_bulkin_state; /* in pipe state */
int acm_bulkout_state; /* out pipe state */
int acm_intr_state; /* intr pipe state */
int acm_ctrl_if_no; /* control interface */
int acm_data_if_no; /* data interface */
int acm_data_port_no; /* which data port */
int acm_cap; /* port capabilities */
int acm_port_state; /* port state */
};
}))
struct usbsacm_state {
int acm_dev_state; /* USB device state */
int acm_port_cnt; /* port number */
};
}))
/* port state */
enum {
USBSACM_PORT_CLOSED, /* port is closed */
USBSACM_PORT_OPEN, /* port is open */
};
/* pipe state */
enum {
USBSACM_PIPE_CLOSED, /* pipe is closed */
USBSACM_PIPE_IDLE, /* open but no requests */
USBSACM_PIPE_BUSY, /* servicing request */
USBSACM_PIPE_CLOSING /* pipe is closing */
};
/* various tunables */
enum {
USBSACM_BULKIN_TIMEOUT = 0 /* bulkin timeout */
};
/* hardware definitions */
enum {
};
#define PRINT_MASK_ATTA 0x00000001
#define PRINT_MASK_CLOSE 0x00000002
#define PRINT_MASK_OPEN 0x00000004
#define PRINT_MASK_EVENTS 0x00000008
#define PRINT_MASK_PM 0x00000010
#define PRINT_MASK_CB 0x00000020
#define PRINT_MASK_ALL 0xFFFFFFFF
#define NELEM(a) (sizeof (a) / sizeof (*(a)))
#ifdef __cplusplus
}
#endif
#endif /* _SYS_USB_USBSACM_H */