PERFORCE change 130432 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Fri Dec 7 14:49:17 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=130432
Change 130432 by hselasky at hselasky_laptop001 on 2007/12/07 22:49:14
This commit is part of USB device side support.
o Add C-routines that build up the real USB descriptors
from the USB template descriptors.
Affected files ...
.. //depot/projects/usb/src/sys/dev/usb/usb.h#22 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_template.c#1 add
.. //depot/projects/usb/src/sys/dev/usb/usb_template.h#2 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/usb/usb.h#22 (text+ko) ====
@@ -274,6 +274,7 @@
#define UE_ISO_SYNC 0x0c
#define UE_GET_ISO_TYPE(a) ((a) & UE_ISO_TYPE)
uWord wMaxPacketSize;
+#define UE_ZERO_MPS 0xFFFF /* for internal use only */
uByte bInterval;
} __packed usb_endpoint_descriptor_t;
==== //depot/projects/usb/src/sys/dev/usb/usb_template.h#2 (text+ko) ====
@@ -31,6 +31,8 @@
#ifndef _USB_TEMPLATE_H_
#define _USB_TEMPLATE_H_
+typedef const uint8_t * (usbd_temp_get_string_desc_t)(struct usbd_device *udev, uint16_t langid, uint8_t index);
+
struct usb_temp_packet_size {
uint16_t mps[USB_SPEED_MAX];
};
@@ -39,6 +41,7 @@
const void **ppRawDesc;
const struct usb_temp_packet_size *pPacketSize;
uint8_t direction; /* UE_DIR_IN or UE_DIR_OUT */
+ uint8_t endpoint; /* endpoint address */
uint8_t bmAttributes;
};
@@ -56,10 +59,11 @@
const struct usb_temp_interface_desc **ppIfaceDesc;
uint8_t bmAttributes;
uint8_t bMaxPower;
+ uint8_t iConfiguration;
};
struct usb_temp_device_desc {
- const void ***pppRawStringDesc;
+ usbd_temp_get_string_desc_t *pGetStringDescFn;
const struct usb_temp_config_desc **ppConfigDesc;
uint16_t idVendor;
uint16_t idProduct;
More information about the p4-projects
mailing list