uftdi_var.h revision de81e71e031139a0a7f13b7bf64152c3faa76698
/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _USBSER_USBFTDI_UFTDI_VAR_H
#define _USBSER_USBFTDI_UFTDI_VAR_H
/*
* USB UFTDI definitions
*/
#include <sys/dditypes.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* PM support
*/
typedef struct uftdi_pm {
} uftdi_pm_t;
typedef struct uftdi_regs {
} uftdi_regs_t;
/*
* per device state structure
*/
typedef struct uftdi_state {
int uf_dev_flags; /* device flags */
int uf_port_state; /* port state */
int uf_port_flags; /* port flags */
/*
* USBA
*/
int uf_bulkin_state; /* in pipe state */
int uf_bulkout_state; /* out pipe state */
int uf_dev_state; /* USB device state */
/*
* data receive and transmit
*/
/*
* soft registers
*/
}))
/* port state */
enum {
UFTDI_PORT_CLOSED, /* port is closed */
UFTDI_PORT_OPEN, /* port is open */
};
/* port flags */
enum {
};
/* pipe state */
enum {
UFTDI_PIPE_CLOSED, /* pipe is closed */
UFTDI_PIPE_IDLE, /* open but no requests */
UFTDI_PIPE_BUSY /* servicing request */
};
/* various numbers */
enum {
};
/*
* debug printing masks
*/
#define DPRINT_ATTACH 0x00000001
#define DPRINT_OPEN 0x00000002
#define DPRINT_CLOSE 0x00000004
#define DPRINT_DEF_PIPE 0x00000010
#define DPRINT_IN_PIPE 0x00000020
#define DPRINT_OUT_PIPE 0x00000040
#define DPRINT_IN_DATA 0x00000400
#define DPRINT_OUT_DATA 0x00000800
#define DPRINT_CTLOP 0x00001000
#define DPRINT_HOTPLUG 0x00002000
#define DPRINT_PM 0x00004000
#define DPRINT_MASK_ALL 0xFFFFFFFF
#ifdef __cplusplus
}
#endif
#endif /* _USBSER_USBFTDI_UFTDI_VAR_H */