PERFORCE change 126746 for review

Hans Petter Selasky hselasky at FreeBSD.org
Sun Sep 23 09:30:50 PDT 2007


http://perforce.freebsd.org/chv.cgi?CH=126746

Change 126746 by hselasky at hselasky_laptop001 on 2007/09/23 16:30:04

	
	FYI; The comments follow the P4 diff from top to bottom.
	
	- no need to define "struct usb_hid_descriptor". Only the
	  typedefed version.
	
	- make all prototypes fit on a single line
	
	- added two new prototypes:
	  - hid_get_descriptor_from_usb
	  - hid_read_report_desc_from_usb

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/usb_hid.h#5 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb/usb_hid.h#5 (text+ko) ====

@@ -54,7 +54,7 @@
 #define UR_GET_PROTOCOL		0x03
 #define UR_SET_PROTOCOL		0x0b
 
-typedef struct usb_hid_descriptor {
+typedef struct {
 	uByte		bLength;
 	uByte		bDescriptorType;
 	uWord		bcdHID;
@@ -225,28 +225,17 @@
 	struct hid_item *next;
 };
 
-extern struct hid_data *
-hid_start_parse(const void *d, int len, int kindset);
+/* prototypes from "usb_hid.c" */
 
-extern void 
-hid_end_parse(struct hid_data *s);
-
-extern int
-hid_get_item(struct hid_data *s, struct hid_item *h);
-
-extern int
-hid_report_size(const void *buf, int len, enum hid_kind k, u_int8_t *id);
-
-extern int
-hid_locate(const void *desc, int size, u_int32_t usage,
-	   enum hid_kind kind, struct hid_location *loc,
-	   u_int32_t *flags);
-
-extern u_long 
-hid_get_data(const u_char *buf, u_int32_t len, struct hid_location *loc);
-
-extern int
-hid_is_collection(const void *desc, int size, u_int32_t usage);
+struct hid_data *hid_start_parse(const void *d, int len, int kindset);
+void hid_end_parse(struct hid_data *s);
+int hid_get_item(struct hid_data *s, struct hid_item *h);
+int hid_report_size(const void *buf, int len, enum hid_kind k, u_int8_t *id);
+int hid_locate(const void *desc, int size, u_int32_t usage, enum hid_kind kind, struct hid_location *loc, u_int32_t *flags);
+u_long hid_get_data(const u_char *buf, u_int32_t len, struct hid_location *loc);
+int hid_is_collection(const void *desc, int size, u_int32_t usage);
+usb_hid_descriptor_t *hid_get_descriptor_from_usb(usb_config_descriptor_t *cd, usb_interface_descriptor_t *id);
+usbd_status hid_read_report_desc_from_usb(struct usbd_device *udev, struct mtx *mtx, void **descp, uint16_t *sizep, usb_malloc_type mem, uint8_t iface_index);
 
 #endif
 


More information about the p4-projects mailing list