Deleted Added
sdiff udiff text old ( 185948 ) new ( 187176 )
full compact
1/* $NetBSD: ucomvar.h,v 1.9 2001/01/23 21:56:17 augustss Exp $ */
2/* $FreeBSD: head/sys/dev/usb2/serial/usb2_serial.h 185948 2008-12-11 23:13:02Z thompsa $ */
3
4/*-
5 * Copyright (c) 2001-2002, Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:

--- 103 unchanged lines hidden (view full) ---

114#define ULSR_TXRDY 0x20 /* Transmitter buffer empty */
115#define ULSR_BI 0x10 /* Break detected */
116#define ULSR_FE 0x08 /* Framing error: bad stop bit */
117#define ULSR_PE 0x04 /* Parity error */
118#define ULSR_OE 0x02 /* Overrun, lost incoming byte */
119#define ULSR_RXRDY 0x01 /* Byte ready in Receive Buffer */
120#define ULSR_RCV_MASK 0x1f /* Mask for incoming data or error */
121
122struct usb2_com_super_softc {
123 struct usb2_config_td sc_config_td;
124};
125
126struct usb2_com_softc {
127 struct termios sc_termios_copy;
128 struct cv sc_cv;
129 const struct usb2_com_callback *sc_callback;
130 struct usb2_com_super_softc *sc_super;
131 struct tty *sc_tty;
132 struct mtx *sc_parent_mtx;
133 void *sc_parent;
134 uint32_t sc_unit;

--- 6 unchanged lines hidden (view full) ---

141#define UCOM_FLAG_GP_DATA 0x08 /* set if get and put data is possible */
142#define UCOM_FLAG_WR_START 0x10 /* set if write start was issued */
143#define UCOM_FLAG_LL_READY 0x20 /* set if low layer is ready */
144#define UCOM_FLAG_HL_READY 0x40 /* set if high layer is ready */
145 uint8_t sc_lsr;
146 uint8_t sc_msr;
147 uint8_t sc_mcr;
148 uint8_t sc_ttyfreed; /* set when TTY has been freed */
149};
150
151int usb2_com_attach(struct usb2_com_super_softc *ssc,
152 struct usb2_com_softc *sc, uint32_t sub_units, void *parent,
153 const struct usb2_com_callback *callback, struct mtx *p_mtx);
154void usb2_com_detach(struct usb2_com_super_softc *ssc,
155 struct usb2_com_softc *sc, uint32_t sub_units);
156void usb2_com_status_change(struct usb2_com_softc *);
157uint8_t usb2_com_get_data(struct usb2_com_softc *sc, struct usb2_page_cache *pc,
158 uint32_t offset, uint32_t len, uint32_t *actlen);
159void usb2_com_put_data(struct usb2_com_softc *sc, struct usb2_page_cache *pc,
160 uint32_t offset, uint32_t len);
161uint8_t usb2_com_cfg_sleep(struct usb2_com_softc *sc, uint32_t timeout);
162uint8_t usb2_com_cfg_is_gone(struct usb2_com_softc *sc);
163
164#endif /* _USB2_SERIAL_H_ */