Date: Wed, 26 Nov 2008 15:09:50 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 153611 for review Message-ID: <200811261509.mAQF9oV4094180@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=153611 Change 153611 by hselasky@hselasky_laptop001 on 2008/11/26 15:09:34 Add a new USB API function that can return the number of Isochronous frames transferred per second: "usb2_get_isoc_fps" Affected files ... .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_core.h#27 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_device.c#35 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb2/core/usb2_core.h#27 (text+ko) ==== @@ -434,6 +434,7 @@ uint8_t usb2_get_interface_altindex(struct usb2_interface *iface); usb2_error_t usb2_set_alt_interface_index(struct usb2_device *udev, uint8_t iface_index, uint8_t alt_index); uint8_t usb2_get_speed(struct usb2_device *udev); +uint32_t usb2_get_isoc_fps(struct usb2_device *udev); usb2_error_t usb2_transfer_setup(struct usb2_device *udev, const uint8_t *ifaces, struct usb2_xfer **pxfer, const struct usb2_config *setup_start, uint16_t n_setup, void *priv_sc, struct mtx *priv_mtx); void usb2_set_frame_data(struct usb2_xfer *xfer, void *ptr, uint32_t frindex); void usb2_set_frame_offset(struct usb2_xfer *xfer, uint32_t offset, uint32_t frindex); ==== //depot/projects/usb/src/sys/dev/usb2/core/usb2_device.c#35 (text+ko) ==== @@ -1945,6 +1945,19 @@ return (udev->speed); } +uint32_t +usb2_get_isoc_fps(struct usb2_device *udev) +{ + ; /* indent fix */ + switch (udev->speed) { + case USB_SPEED_LOW: + case USB_SPEED_FULL: + return (1000); + default: + return (8000); + } +} + struct usb2_device_descriptor * usb2_get_device_descriptor(struct usb2_device *udev) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811261509.mAQF9oV4094180>