#include <sys/cdefs.h>
#include <sys/stdint.h>
#include <sys/stddef.h>
#include <sys/param.h>
#include <sys/queue.h>
#include <sys/types.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/bus.h>
#include <sys/module.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/condvar.h>
#include <sys/sysctl.h>
#include <sys/sx.h>
#include <sys/unistd.h>
#include <sys/callout.h>
#include <sys/malloc.h>
#include <sys/priv.h>
#include <dev/usb/usb.h>
#include <dev/usb/usbdi.h>
#include <dev/usb/usbdi_util.h>
#include <dev/usb/usb_cdc.h>
#include "usbdevs.h"
#include <dev/usb/usb_debug.h>
#include <dev/usb/usb_process.h>
#include <dev/usb/serial/usb_serial.h>
Go to the source code of this file.
|
| __FBSDID ("$FreeBSD$") |
|
static void | uipaq_free_softc (struct uipaq_softc *) |
|
static void | uipaq_free (struct ucom_softc *) |
|
static void | uipaq_start_read (struct ucom_softc *) |
|
static void | uipaq_stop_read (struct ucom_softc *) |
|
static void | uipaq_start_write (struct ucom_softc *) |
|
static void | uipaq_stop_write (struct ucom_softc *) |
|
static void | uipaq_cfg_set_dtr (struct ucom_softc *, uint8_t) |
|
static void | uipaq_cfg_set_rts (struct ucom_softc *, uint8_t) |
|
static void | uipaq_cfg_set_break (struct ucom_softc *, uint8_t) |
|
static void | uipaq_poll (struct ucom_softc *ucom) |
|
| DRIVER_MODULE (uipaq, uhub, uipaq_driver, uipaq_devclass, NULL, 0) |
|
| MODULE_DEPEND (uipaq, ucom, 1, 1, 1) |
|
| MODULE_DEPEND (uipaq, usb, 1, 1, 1) |
|
| MODULE_VERSION (uipaq, 1) |
|
| USB_PNP_HOST_INFO (uipaq_devs) |
|
static int | uipaq_probe (device_t dev) |
|
static int | uipaq_attach (device_t dev) |
|
int | uipaq_detach (device_t dev) |
|
| UCOM_UNLOAD_DRAIN (uipaq) |
|
static void | uipaq_write_callback (struct usb_xfer *xfer, usb_error_t error) |
|
static void | uipaq_read_callback (struct usb_xfer *xfer, usb_error_t error) |
|
◆ UIPAQ_BUF_SIZE
#define UIPAQ_BUF_SIZE 1024 |
◆ UIPAQ_CONFIG_INDEX
#define UIPAQ_CONFIG_INDEX 0 /* config number 1 */ |
◆ UIPAQ_IFACE_INDEX
#define UIPAQ_IFACE_INDEX 0 |
◆ USB_DEBUG_VAR
◆ anonymous enum
Enumerator |
---|
UIPAQ_BULK_DT_WR | |
UIPAQ_BULK_DT_RD | |
UIPAQ_N_TRANSFER | |
Definition at line 85 of file uipaq.c.
◆ __FBSDID()
◆ DRIVER_MODULE()
◆ MODULE_DEPEND() [1/2]
MODULE_DEPEND |
( |
uipaq |
, |
|
|
ucom |
, |
|
|
1 |
, |
|
|
1 |
, |
|
|
1 |
|
|
) |
| |
◆ MODULE_DEPEND() [2/2]
MODULE_DEPEND |
( |
uipaq |
, |
|
|
usb |
, |
|
|
1 |
, |
|
|
1 |
, |
|
|
1 |
|
|
) |
| |
◆ MODULE_VERSION()
MODULE_VERSION |
( |
uipaq |
, |
|
|
1 |
|
|
) |
| |
◆ UCOM_UNLOAD_DRAIN()
UCOM_UNLOAD_DRAIN |
( |
uipaq |
| ) |
|
◆ uipaq_attach()
static int uipaq_attach |
( |
device_t |
dev | ) |
|
|
static |
Definition at line 1116 of file uipaq.c.
References dev, usb_attach_arg::device, device_set_usb_desc(), error, req, uipaq_softc::sc_mtx, uipaq_softc::sc_super_ucom, uipaq_softc::sc_ucom, uipaq_softc::sc_udev, uipaq_softc::sc_xfer, UCDC_LINE_DTR, UCDC_SET_CONTROL_LINE_STATE, ucom_attach(), ucom_ref(), ucom_set_pnpinfo_usb(), UIPAQ_BULK_DT_RD, UIPAQ_BULK_DT_WR, uipaq_callback, uipaq_config_data, uipaq_detach, UIPAQ_IFACE_INDEX, UIPAQ_N_TRANSFER, usb_pause_mtx(), usbd_do_request_flags(), usbd_transfer_setup(), usbd_xfer_set_stall(), USETW, and UT_WRITE_CLASS_INTERFACE.
◆ uipaq_cfg_set_break()
static void uipaq_cfg_set_break |
( |
struct ucom_softc * |
ucom, |
|
|
uint8_t |
onoff |
|
) |
| |
|
static |
Definition at line 1293 of file uipaq.c.
References req, ucom_softc::sc_parent, uipaq_softc::sc_ucom, uipaq_softc::sc_udev, UCDC_BREAK_OFF, UCDC_BREAK_ON, UCDC_SEND_BREAK, ucom_cfg_do_request, UIPAQ_IFACE_INDEX, USETW, and UT_WRITE_CLASS_INTERFACE.
◆ uipaq_cfg_set_dtr()
static void uipaq_cfg_set_dtr |
( |
struct ucom_softc * |
ucom, |
|
|
uint8_t |
onoff |
|
) |
| |
|
static |
Definition at line 1245 of file uipaq.c.
References DPRINTF, req, uipaq_softc::sc_line, ucom_softc::sc_parent, uipaq_softc::sc_ucom, uipaq_softc::sc_udev, UCDC_LINE_DTR, UCDC_SET_CONTROL_LINE_STATE, ucom_cfg_do_request, UIPAQ_IFACE_INDEX, USETW, and UT_WRITE_CLASS_INTERFACE.
◆ uipaq_cfg_set_rts()
static void uipaq_cfg_set_rts |
( |
struct ucom_softc * |
ucom, |
|
|
uint8_t |
onoff |
|
) |
| |
|
static |
Definition at line 1269 of file uipaq.c.
References DPRINTF, req, uipaq_softc::sc_line, ucom_softc::sc_parent, uipaq_softc::sc_ucom, uipaq_softc::sc_udev, UCDC_LINE_RTS, UCDC_SET_CONTROL_LINE_STATE, ucom_cfg_do_request, UIPAQ_IFACE_INDEX, USETW, and UT_WRITE_CLASS_INTERFACE.
◆ uipaq_detach()
int uipaq_detach |
( |
device_t |
dev | ) |
|
◆ uipaq_free()
static void uipaq_free |
( |
struct ucom_softc * |
ucom | ) |
|
|
static |
◆ uipaq_free_softc()
static void uipaq_free_softc |
( |
struct uipaq_softc * |
sc | ) |
|
|
static |
◆ uipaq_poll()
static void uipaq_poll |
( |
struct ucom_softc * |
ucom | ) |
|
|
static |
◆ uipaq_probe()
static int uipaq_probe |
( |
device_t |
dev | ) |
|
|
static |
Definition at line 1095 of file uipaq.c.
References usbd_lookup_info::bConfigIndex, usbd_lookup_info::bIfaceIndex, usbd_lookup_info::bInterfaceClass, dev, DPRINTF, usb_attach_arg::info, UICLASS_IAD, UIPAQ_CONFIG_INDEX, uipaq_devs, UIPAQ_IFACE_INDEX, usb_attach_arg::usb_mode, USB_MODE_HOST, and usbd_lookup_id_by_uaa().
◆ uipaq_read_callback()
Definition at line 1342 of file uipaq.c.
References error, uipaq_softc::sc_ucom, ucom_put_data(), USB_ERR_CANCELLED, USB_GET_STATE, USB_ST_SETUP, USB_ST_TRANSFERRED, usbd_transfer_submit(), usbd_xfer_get_frame(), usbd_xfer_max_len(), usbd_xfer_set_frame_len(), usbd_xfer_set_stall(), usbd_xfer_softc(), and usbd_xfer_status().
◆ uipaq_start_read()
static void uipaq_start_read |
( |
struct ucom_softc * |
ucom | ) |
|
|
static |
◆ uipaq_start_write()
static void uipaq_start_write |
( |
struct ucom_softc * |
ucom | ) |
|
|
static |
◆ uipaq_stop_read()
static void uipaq_stop_read |
( |
struct ucom_softc * |
ucom | ) |
|
|
static |
◆ uipaq_stop_write()
static void uipaq_stop_write |
( |
struct ucom_softc * |
ucom | ) |
|
|
static |
◆ uipaq_write_callback()
Definition at line 1313 of file uipaq.c.
References error, uipaq_softc::sc_ucom, ucom_get_data(), UIPAQ_BUF_SIZE, USB_ERR_CANCELLED, USB_GET_STATE, USB_ST_SETUP, USB_ST_TRANSFERRED, usbd_transfer_submit(), usbd_xfer_get_frame(), usbd_xfer_set_frame_len(), usbd_xfer_set_stall(), and usbd_xfer_softc().
◆ USB_PNP_HOST_INFO()
◆ uipaq_attach
device_attach_t uipaq_attach |
|
static |
◆ uipaq_callback
Initial value:= {
}
static void uipaq_start_read(struct ucom_softc *)
static void uipaq_stop_write(struct ucom_softc *)
static void uipaq_free(struct ucom_softc *)
static void uipaq_poll(struct ucom_softc *ucom)
static void uipaq_cfg_set_break(struct ucom_softc *, uint8_t)
static void uipaq_stop_read(struct ucom_softc *)
static void uipaq_cfg_set_rts(struct ucom_softc *, uint8_t)
static void uipaq_start_write(struct ucom_softc *)
static void uipaq_cfg_set_dtr(struct ucom_softc *, uint8_t)
Definition at line 143 of file uipaq.c.
Referenced by uipaq_attach().
◆ uipaq_config_data
Initial value:= {
.flags = {.pipe_bof = 1,.force_short_xfer = 1,},
},
.flags = {.pipe_bof = 1,.short_xfer_ok = 1,},
},
}
static usb_callback_t uipaq_write_callback
static usb_callback_t uipaq_read_callback
Definition at line 123 of file uipaq.c.
Referenced by uipaq_attach().
◆ uipaq_detach
device_detach_t uipaq_detach |
|
static |
◆ uipaq_devclass
devclass_t uipaq_devclass |
|
static |
◆ uipaq_devs
◆ uipaq_driver
Initial value:= {
.name = "uipaq",
}
static device_method_t uipaq_methods[]
Definition at line 1082 of file uipaq.c.
◆ uipaq_methods
device_method_t uipaq_methods[] |
|
static |
Initial value:= {
DEVMETHOD_END
}
static device_attach_t uipaq_attach
static device_detach_t uipaq_detach
static device_probe_t uipaq_probe
Definition at line 1073 of file uipaq.c.
◆ uipaq_probe
device_probe_t uipaq_probe |
|
static |
◆ uipaq_read_callback
◆ uipaq_write_callback