uark.c (184736) | uark.c (185948) |
---|---|
1/* $OpenBSD: uark.c,v 1.1 2006/08/14 08:30:22 jsg Exp $ */ 2 3/* 4 * Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org> 5 * 6 * Permission to use, copy, modify, and distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 * | 1/* $OpenBSD: uark.c,v 1.1 2006/08/14 08:30:22 jsg Exp $ */ 2 3/* 4 * Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org> 5 * 6 * Permission to use, copy, modify, and distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 * |
18 * $FreeBSD: head/sys/dev/usb2/serial/uark2.c 184736 2008-11-06 17:26:12Z imp $ | 18 * $FreeBSD: head/sys/dev/usb2/serial/uark2.c 185948 2008-12-11 23:13:02Z thompsa $ |
19 */ 20 21/* 22 * NOTE: all function names beginning like "uark_cfg_" can only 23 * be called from within the config thread function ! 24 */ 25 26#include <dev/usb2/include/usb2_devid.h> --- 57 unchanged lines hidden (view full) --- 84static device_attach_t uark_attach; 85static device_detach_t uark_detach; 86 87static usb2_callback_t uark_bulk_write_callback; 88static usb2_callback_t uark_bulk_write_clear_stall_callback; 89static usb2_callback_t uark_bulk_read_callback; 90static usb2_callback_t uark_bulk_read_clear_stall_callback; 91 | 19 */ 20 21/* 22 * NOTE: all function names beginning like "uark_cfg_" can only 23 * be called from within the config thread function ! 24 */ 25 26#include <dev/usb2/include/usb2_devid.h> --- 57 unchanged lines hidden (view full) --- 84static device_attach_t uark_attach; 85static device_detach_t uark_detach; 86 87static usb2_callback_t uark_bulk_write_callback; 88static usb2_callback_t uark_bulk_write_clear_stall_callback; 89static usb2_callback_t uark_bulk_read_callback; 90static usb2_callback_t uark_bulk_read_clear_stall_callback; 91 |
92static void uark_start_read(struct usb2_com_softc *ucom); 93static void uark_stop_read(struct usb2_com_softc *ucom); 94static void uark_start_write(struct usb2_com_softc *ucom); 95static void uark_stop_write(struct usb2_com_softc *ucom); | 92static void uark_start_read(struct usb2_com_softc *); 93static void uark_stop_read(struct usb2_com_softc *); 94static void uark_start_write(struct usb2_com_softc *); 95static void uark_stop_write(struct usb2_com_softc *); 96static int uark_pre_param(struct usb2_com_softc *, struct termios *); 97static void uark_cfg_param(struct usb2_com_softc *, struct termios *); 98static void uark_cfg_get_status(struct usb2_com_softc *, uint8_t *, 99 uint8_t *); 100static void uark_cfg_set_break(struct usb2_com_softc *, uint8_t); 101static void uark_cfg_write(struct uark_softc *, uint16_t, uint16_t); |
96 | 102 |
97static int uark_pre_param(struct usb2_com_softc *ucom, struct termios *t); 98static void uark_cfg_param(struct usb2_com_softc *ucom, struct termios *t); 99static void uark_cfg_get_status(struct usb2_com_softc *ucom, uint8_t *lsr, uint8_t *msr); 100static void uark_cfg_set_break(struct usb2_com_softc *ucom, uint8_t onoff); 101static void uark_cfg_write(struct uark_softc *sc, uint16_t index, uint16_t value); 102 | |
103static const struct usb2_config 104 uark_xfer_config[UARK_N_TRANSFER] = { 105 106 [0] = { 107 .type = UE_BULK, 108 .endpoint = UE_ADDR_ANY, 109 .direction = UE_DIR_OUT, 110 .mh.bufsize = UARK_BUF_SIZE, --- 371 unchanged lines hidden --- | 103static const struct usb2_config 104 uark_xfer_config[UARK_N_TRANSFER] = { 105 106 [0] = { 107 .type = UE_BULK, 108 .endpoint = UE_ADDR_ANY, 109 .direction = UE_DIR_OUT, 110 .mh.bufsize = UARK_BUF_SIZE, --- 371 unchanged lines hidden --- |