uslcom.c (196219) | uslcom.c (197570) |
---|---|
1/* $OpenBSD: uslcom.c,v 1.17 2007/11/24 10:52:12 jsg Exp $ */ 2 3#include <sys/cdefs.h> | 1/* $OpenBSD: uslcom.c,v 1.17 2007/11/24 10:52:12 jsg Exp $ */ 2 3#include <sys/cdefs.h> |
4__FBSDID("$FreeBSD: head/sys/dev/usb/serial/uslcom.c 196219 2009-08-14 20:03:53Z jhb $"); | 4__FBSDID("$FreeBSD: head/sys/dev/usb/serial/uslcom.c 197570 2009-09-28 08:13:50Z thompsa $"); |
5 6/* 7 * Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org> 8 * 9 * Permission to use, copy, modify, and distribute this software for any 10 * purpose with or without fee is hereby granted, provided that the above 11 * copyright notice and this permission notice appear in all copies. 12 * --- 117 unchanged lines hidden (view full) --- 130static void uslcom_set_break(struct ucom_softc *, uint8_t); 131static int uslcom_pre_param(struct ucom_softc *, struct termios *); 132static void uslcom_param(struct ucom_softc *, struct termios *); 133static void uslcom_get_status(struct ucom_softc *, uint8_t *, uint8_t *); 134static void uslcom_start_read(struct ucom_softc *); 135static void uslcom_stop_read(struct ucom_softc *); 136static void uslcom_start_write(struct ucom_softc *); 137static void uslcom_stop_write(struct ucom_softc *); | 5 6/* 7 * Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org> 8 * 9 * Permission to use, copy, modify, and distribute this software for any 10 * purpose with or without fee is hereby granted, provided that the above 11 * copyright notice and this permission notice appear in all copies. 12 * --- 117 unchanged lines hidden (view full) --- 130static void uslcom_set_break(struct ucom_softc *, uint8_t); 131static int uslcom_pre_param(struct ucom_softc *, struct termios *); 132static void uslcom_param(struct ucom_softc *, struct termios *); 133static void uslcom_get_status(struct ucom_softc *, uint8_t *, uint8_t *); 134static void uslcom_start_read(struct ucom_softc *); 135static void uslcom_stop_read(struct ucom_softc *); 136static void uslcom_start_write(struct ucom_softc *); 137static void uslcom_stop_write(struct ucom_softc *); |
138static void uslcom_poll(struct ucom_softc *ucom); |
|
138 139static const struct usb_config uslcom_config[USLCOM_N_TRANSFER] = { 140 141 [USLCOM_BULK_DT_WR] = { 142 .type = UE_BULK, 143 .endpoint = UE_ADDR_ANY, 144 .direction = UE_DIR_OUT, 145 .bufsize = USLCOM_BULK_BUF_SIZE, --- 19 unchanged lines hidden (view full) --- 165 .ucom_cfg_set_rts = &uslcom_set_rts, 166 .ucom_cfg_set_break = &uslcom_set_break, 167 .ucom_cfg_param = &uslcom_param, 168 .ucom_pre_param = &uslcom_pre_param, 169 .ucom_start_read = &uslcom_start_read, 170 .ucom_stop_read = &uslcom_stop_read, 171 .ucom_start_write = &uslcom_start_write, 172 .ucom_stop_write = &uslcom_stop_write, | 139 140static const struct usb_config uslcom_config[USLCOM_N_TRANSFER] = { 141 142 [USLCOM_BULK_DT_WR] = { 143 .type = UE_BULK, 144 .endpoint = UE_ADDR_ANY, 145 .direction = UE_DIR_OUT, 146 .bufsize = USLCOM_BULK_BUF_SIZE, --- 19 unchanged lines hidden (view full) --- 166 .ucom_cfg_set_rts = &uslcom_set_rts, 167 .ucom_cfg_set_break = &uslcom_set_break, 168 .ucom_cfg_param = &uslcom_param, 169 .ucom_pre_param = &uslcom_pre_param, 170 .ucom_start_read = &uslcom_start_read, 171 .ucom_stop_read = &uslcom_stop_read, 172 .ucom_start_write = &uslcom_start_write, 173 .ucom_stop_write = &uslcom_stop_write, |
174 .ucom_poll = &uslcom_poll, |
|
173}; 174 175static const struct usb_device_id uslcom_devs[] = { 176 { USB_VPI(USB_VENDOR_BALTECH, USB_PRODUCT_BALTECH_CARDREADER, 0) }, 177 { USB_VPI(USB_VENDOR_DYNASTREAM, USB_PRODUCT_DYNASTREAM_ANTDEVBOARD, 0) }, 178 { USB_VPI(USB_VENDOR_JABLOTRON, USB_PRODUCT_JABLOTRON_PC60B, 0) }, 179 { USB_VPI(USB_VENDOR_SILABS, USB_PRODUCT_SILABS_ARGUSISP, 0) }, 180 { USB_VPI(USB_VENDOR_SILABS, USB_PRODUCT_SILABS_CRUMB128, 0) }, --- 376 unchanged lines hidden (view full) --- 557 558static void 559uslcom_stop_write(struct ucom_softc *ucom) 560{ 561 struct uslcom_softc *sc = ucom->sc_parent; 562 563 usbd_transfer_stop(sc->sc_xfer[USLCOM_BULK_DT_WR]); 564} | 175}; 176 177static const struct usb_device_id uslcom_devs[] = { 178 { USB_VPI(USB_VENDOR_BALTECH, USB_PRODUCT_BALTECH_CARDREADER, 0) }, 179 { USB_VPI(USB_VENDOR_DYNASTREAM, USB_PRODUCT_DYNASTREAM_ANTDEVBOARD, 0) }, 180 { USB_VPI(USB_VENDOR_JABLOTRON, USB_PRODUCT_JABLOTRON_PC60B, 0) }, 181 { USB_VPI(USB_VENDOR_SILABS, USB_PRODUCT_SILABS_ARGUSISP, 0) }, 182 { USB_VPI(USB_VENDOR_SILABS, USB_PRODUCT_SILABS_CRUMB128, 0) }, --- 376 unchanged lines hidden (view full) --- 559 560static void 561uslcom_stop_write(struct ucom_softc *ucom) 562{ 563 struct uslcom_softc *sc = ucom->sc_parent; 564 565 usbd_transfer_stop(sc->sc_xfer[USLCOM_BULK_DT_WR]); 566} |
567 568static void 569uslcom_poll(struct ucom_softc *ucom) 570{ 571 struct uslcom_softc *sc = ucom->sc_parent; 572 usbd_transfer_poll(sc->sc_xfer, USLCOM_N_TRANSFER); 573} |
|