usb_template.h (192984) | usb_template.h (194228) |
---|---|
1/* $FreeBSD: head/sys/dev/usb/template/usb_template.h 192984 2009-05-28 17:36:36Z thompsa $ */ | 1/* $FreeBSD: head/sys/dev/usb/template/usb_template.h 194228 2009-06-15 01:02:43Z thompsa $ */ |
2/*- 3 * Copyright (c) 2007 Hans Petter Selasky <hselasky@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 25 * SUCH DAMAGE. 26 */ 27 28/* USB templates are used to build up real USB descriptors */ 29 30#ifndef _USB_TEMPLATE_H_ 31#define _USB_TEMPLATE_H_ 32 | 2/*- 3 * Copyright (c) 2007 Hans Petter Selasky <hselasky@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 25 * SUCH DAMAGE. 26 */ 27 28/* USB templates are used to build up real USB descriptors */ 29 30#ifndef _USB_TEMPLATE_H_ 31#define _USB_TEMPLATE_H_ 32 |
33typedef const void *(usb2_temp_get_string_desc_t)(uint16_t lang_id, uint8_t string_index); 34typedef const void *(usb2_temp_get_vendor_desc_t)(const struct usb_device_request *req); | 33typedef const void *(usb_temp_get_string_desc_t)(uint16_t lang_id, uint8_t string_index); 34typedef const void *(usb_temp_get_vendor_desc_t)(const struct usb_device_request *req); |
35 36struct usb_temp_packet_size { 37 uint16_t mps[USB_SPEED_MAX]; 38}; 39 40struct usb_temp_interval { 41 uint8_t bInterval[USB_SPEED_MAX]; 42}; --- 24 unchanged lines hidden (view full) --- 67struct usb_temp_config_desc { 68 const struct usb_temp_interface_desc **ppIfaceDesc; 69 uint8_t bmAttributes; 70 uint8_t bMaxPower; 71 uint8_t iConfiguration; 72}; 73 74struct usb_temp_device_desc { | 35 36struct usb_temp_packet_size { 37 uint16_t mps[USB_SPEED_MAX]; 38}; 39 40struct usb_temp_interval { 41 uint8_t bInterval[USB_SPEED_MAX]; 42}; --- 24 unchanged lines hidden (view full) --- 67struct usb_temp_config_desc { 68 const struct usb_temp_interface_desc **ppIfaceDesc; 69 uint8_t bmAttributes; 70 uint8_t bMaxPower; 71 uint8_t iConfiguration; 72}; 73 74struct usb_temp_device_desc { |
75 usb2_temp_get_string_desc_t *getStringDesc; 76 usb2_temp_get_vendor_desc_t *getVendorDesc; | 75 usb_temp_get_string_desc_t *getStringDesc; 76 usb_temp_get_vendor_desc_t *getVendorDesc; |
77 const struct usb_temp_config_desc **ppConfigDesc; 78 uint16_t idVendor; 79 uint16_t idProduct; 80 uint16_t bcdDevice; 81 uint8_t bDeviceClass; 82 uint8_t bDeviceSubClass; 83 uint8_t bDeviceProtocol; 84 uint8_t iManufacturer; --- 4 unchanged lines hidden (view full) --- 89struct usb_temp_data { 90 const struct usb_temp_device_desc *tdd; 91 struct usb_device_descriptor udd; /* device descriptor */ 92 struct usb_device_qualifier udq; /* device qualifier */ 93}; 94 95/* prototypes */ 96 | 77 const struct usb_temp_config_desc **ppConfigDesc; 78 uint16_t idVendor; 79 uint16_t idProduct; 80 uint16_t bcdDevice; 81 uint8_t bDeviceClass; 82 uint8_t bDeviceSubClass; 83 uint8_t bDeviceProtocol; 84 uint8_t iManufacturer; --- 4 unchanged lines hidden (view full) --- 89struct usb_temp_data { 90 const struct usb_temp_device_desc *tdd; 91 struct usb_device_descriptor udd; /* device descriptor */ 92 struct usb_device_qualifier udq; /* device qualifier */ 93}; 94 95/* prototypes */ 96 |
97extern const struct usb_temp_device_desc usb2_template_cdce; 98extern const struct usb_temp_device_desc usb2_template_msc; /* Mass Storage Class */ 99extern const struct usb_temp_device_desc usb2_template_mtp; /* Message Transfer | 97extern const struct usb_temp_device_desc usb_template_cdce; 98extern const struct usb_temp_device_desc usb_template_msc; /* Mass Storage Class */ 99extern const struct usb_temp_device_desc usb_template_mtp; /* Message Transfer |
100 * Protocol */ 101 102#endif /* _USB_TEMPLATE_H_ */ | 100 * Protocol */ 101 102#endif /* _USB_TEMPLATE_H_ */ |