Add #defines for vendor/product USB IDs. No functional changes.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
trasz 2018-05-19 15:11:24 +00:00
parent 4c75e41c26
commit 529f8089e8
11 changed files with 44 additions and 22 deletions

View File

@ -78,6 +78,8 @@ enum {
AUDIO_MAX_INDEX,
};
#define AUDIO_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR
#define AUDIO_DEFAULT_PRODUCT_ID 0x000A
#define AUDIO_DEFAULT_MIXER "Mixer interface"
#define AUDIO_DEFAULT_RECORD "Record interface"
#define AUDIO_DEFAULT_PLAYBACK "Playback interface"
@ -364,8 +366,8 @@ static usb_temp_get_string_desc_t audio_get_string_desc;
struct usb_temp_device_desc usb_template_audio = {
.getStringDesc = &audio_get_string_desc,
.ppConfigDesc = audio_configs,
.idVendor = USB_TEMPLATE_VENDOR,
.idProduct = 0x000A,
.idVendor = AUDIO_DEFAULT_VENDOR_ID,
.idProduct = AUDIO_DEFAULT_PRODUCT_ID,
.bcdDevice = 0x0100,
.bDeviceClass = UDCLASS_COMM,
.bDeviceSubClass = 0,

View File

@ -79,6 +79,8 @@ enum {
ETH_MAX_INDEX,
};
#define ETH_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR
#define ETH_DEFAULT_PRODUCT_ID 0x0001
#define ETH_DEFAULT_MAC "2A02030405060789AB"
#define ETH_DEFAULT_CONTROL "USB Ethernet Comm Interface"
#define ETH_DEFAULT_DATA "USB Ethernet Data Interface"
@ -230,8 +232,8 @@ static const struct usb_temp_config_desc *eth_configs[] = {
struct usb_temp_device_desc usb_template_cdce = {
.getStringDesc = &eth_get_string_desc,
.ppConfigDesc = eth_configs,
.idVendor = USB_TEMPLATE_VENDOR,
.idProduct = 0x0001,
.idVendor = ETH_DEFAULT_VENDOR_ID,
.idProduct = ETH_DEFAULT_PRODUCT_ID,
.bcdDevice = 0x0100,
.bDeviceClass = UDCLASS_COMM,
.bDeviceSubClass = 0,

View File

@ -76,6 +76,8 @@ enum {
KBD_MAX_INDEX,
};
#define KBD_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR
#define KBD_DEFAULT_PRODUCT_ID 0x00CB
#define KBD_DEFAULT_INTERFACE "Keyboard Interface"
#define KBD_DEFAULT_MANUFACTURER "FreeBSD foundation"
#define KBD_DEFAULT_PRODUCT "Keyboard Test Device"
@ -172,8 +174,8 @@ struct usb_temp_device_desc usb_template_kbd = {
.getStringDesc = &keyboard_get_string_desc,
.getVendorDesc = &keyboard_get_vendor_desc,
.ppConfigDesc = keyboard_configs,
.idVendor = USB_TEMPLATE_VENDOR,
.idProduct = 0x00CB,
.idVendor = KBD_DEFAULT_VENDOR_ID,
.idProduct = KBD_DEFAULT_PRODUCT_ID,
.bcdDevice = 0x0100,
.bDeviceClass = UDCLASS_COMM,
.bDeviceSubClass = 0,

View File

@ -75,6 +75,8 @@ enum {
MIDI_MAX_INDEX,
};
#define MIDI_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR
#define MIDI_DEFAULT_PRODUCT_ID 0x00BB
#define MIDI_DEFAULT_INTERFACE "MIDI interface"
#define MIDI_DEFAULT_MANUFACTURER "FreeBSD foundation"
#define MIDI_DEFAULT_PRODUCT "MIDI Test Device"
@ -212,8 +214,8 @@ static usb_temp_get_string_desc_t midi_get_string_desc;
struct usb_temp_device_desc usb_template_midi = {
.getStringDesc = &midi_get_string_desc,
.ppConfigDesc = midi_configs,
.idVendor = USB_TEMPLATE_VENDOR,
.idProduct = 0x00BB,
.idVendor = MIDI_DEFAULT_VENDOR_ID,
.idProduct = MIDI_DEFAULT_PRODUCT_ID,
.bcdDevice = 0x0100,
.bDeviceClass = 0,
.bDeviceSubClass = 0,

View File

@ -76,6 +76,8 @@ enum {
MODEM_MAX_INDEX,
};
#define MODEM_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR
#define MODEM_DEFAULT_PRODUCT_ID 0x000E
#define MODEM_DEFAULT_INTERFACE "Modem interface"
#define MODEM_DEFAULT_MANUFACTURER "FreeBSD foundation"
#define MODEM_DEFAULT_PRODUCT "Modem Test Device"
@ -207,8 +209,8 @@ struct usb_temp_device_desc usb_template_modem = {
.getStringDesc = &modem_get_string_desc,
.getVendorDesc = &modem_get_vendor_desc,
.ppConfigDesc = modem_configs,
.idVendor = USB_TEMPLATE_VENDOR,
.idProduct = 0x000E,
.idVendor = MODEM_DEFAULT_VENDOR_ID,
.idProduct = MODEM_DEFAULT_PRODUCT_ID,
.bcdDevice = 0x0100,
.bDeviceClass = UDCLASS_COMM,
.bDeviceSubClass = 0,

View File

@ -76,6 +76,8 @@ enum {
MOUSE_MAX_INDEX,
};
#define MOUSE_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR
#define MOUSE_DEFAULT_PRODUCT_ID 0x00AE
#define MOUSE_DEFAULT_INTERFACE "Mouse interface"
#define MOUSE_DEFAULT_MANUFACTURER "FreeBSD foundation"
#define MOUSE_DEFAULT_PRODUCT "Mouse Test Interface"
@ -170,8 +172,8 @@ struct usb_temp_device_desc usb_template_mouse = {
.getStringDesc = &mouse_get_string_desc,
.getVendorDesc = &mouse_get_vendor_desc,
.ppConfigDesc = mouse_configs,
.idVendor = USB_TEMPLATE_VENDOR,
.idProduct = 0x00AE,
.idVendor = MOUSE_DEFAULT_VENDOR_ID,
.idProduct = MOUSE_DEFAULT_PRODUCT_ID,
.bcdDevice = 0x0100,
.bDeviceClass = UDCLASS_COMM,
.bDeviceSubClass = 0,

View File

@ -76,6 +76,8 @@ enum {
MSC_MAX_INDEX,
};
#define MSC_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR
#define MSC_DEFAULT_PRODUCT_ID 0x0012
#define MSC_DEFAULT_INTERFACE "USB Mass Storage Interface"
#define MSC_DEFAULT_CONFIGURATION "Default Config"
#define MSC_DEFAULT_MANUFACTURER "FreeBSD foundation"
@ -153,8 +155,8 @@ static const struct usb_temp_config_desc *msc_configs[] = {
struct usb_temp_device_desc usb_template_msc = {
.getStringDesc = &msc_get_string_desc,
.ppConfigDesc = msc_configs,
.idVendor = USB_TEMPLATE_VENDOR,
.idProduct = 0x0012,
.idVendor = MSC_DEFAULT_VENDOR_ID,
.idProduct = MSC_DEFAULT_PRODUCT_ID,
.bcdDevice = 0x0100,
.bDeviceClass = UDCLASS_COMM,
.bDeviceSubClass = 0,

View File

@ -85,6 +85,8 @@ enum {
MTP_MAX_INDEX,
};
#define MTP_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR
#define MTP_DEFAULT_PRODUCT_ID 0x0011
#define MTP_DEFAULT_INTERFACE "USB MTP Interface"
#define MTP_DEFAULT_CONFIGURATION "Default Config"
#define MTP_DEFAULT_MANUFACTURER "FreeBSD foundation"
@ -176,8 +178,8 @@ struct usb_temp_device_desc usb_template_mtp = {
.getStringDesc = &mtp_get_string_desc,
.getVendorDesc = &mtp_get_vendor_desc,
.ppConfigDesc = mtp_configs,
.idVendor = USB_TEMPLATE_VENDOR,
.idProduct = 0x0011,
.idVendor = MTP_DEFAULT_VENDOR_ID,
.idProduct = MTP_DEFAULT_PRODUCT_ID,
.bcdDevice = 0x0100,
.bDeviceClass = 0,
.bDeviceSubClass = 0,

View File

@ -89,6 +89,8 @@ enum {
MULTI_MAX_INDEX,
};
#define MULTI_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR
#define MULTI_DEFAULT_PRODUCT_ID 0x0001
#define MULTI_DEFAULT_MODEM "Virtual serial console"
#define MULTI_DEFAULT_ETH_MAC "2A02030405060789AB"
#define MULTI_DEFAULT_ETH_CONTROL "Ethernet Comm Interface"
@ -374,8 +376,8 @@ static const struct usb_temp_config_desc *multi_configs[] = {
struct usb_temp_device_desc usb_template_multi = {
.getStringDesc = &multi_get_string_desc,
.ppConfigDesc = multi_configs,
.idVendor = USB_TEMPLATE_VENDOR,
.idProduct = 0x0001,
.idVendor = MULTI_DEFAULT_VENDOR_ID,
.idProduct = MULTI_DEFAULT_PRODUCT_ID,
.bcdDevice = 0x0100,
.bDeviceClass = UDCLASS_IN_INTERFACE,
.bDeviceSubClass = 0,

View File

@ -79,6 +79,8 @@ enum {
PHONE_MAX_INDEX,
};
#define PHONE_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR
#define PHONE_DEFAULT_PRODUCT_ID 0xb001
#define PHONE_DEFAULT_MIXER "Mixer interface"
#define PHONE_DEFAULT_RECORD "Record interface"
#define PHONE_DEFAULT_PLAYBACK "Playback interface"
@ -362,8 +364,8 @@ struct usb_temp_device_desc usb_template_phone = {
.getStringDesc = &phone_get_string_desc,
.getVendorDesc = &phone_get_vendor_desc,
.ppConfigDesc = phone_configs,
.idVendor = USB_TEMPLATE_VENDOR,
.idProduct = 0xb001,
.idVendor = PHONE_DEFAULT_VENDOR_ID,
.idProduct = PHONE_DEFAULT_PRODUCT_ID,
.bcdDevice = 0x0100,
.bDeviceClass = UDCLASS_IN_INTERFACE,
.bDeviceSubClass = 0,

View File

@ -88,6 +88,8 @@ enum {
SERIALNET_MAX_INDEX,
};
#define SERIALNET_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR
#define SERIALNET_DEFAULT_PRODUCT_ID 0x0001
#define SERIALNET_DEFAULT_MODEM "USB Modem Interface"
#define SERIALNET_DEFAULT_ETH_MAC "2A02030405060789AB"
#define SERIALNET_DEFAULT_ETH_CONTROL "USB Ethernet Comm Interface"
@ -331,8 +333,8 @@ static const struct usb_temp_config_desc *serialnet_configs[] = {
struct usb_temp_device_desc usb_template_serialnet = {
.getStringDesc = &serialnet_get_string_desc,
.ppConfigDesc = serialnet_configs,
.idVendor = USB_TEMPLATE_VENDOR,
.idProduct = 0x0001,
.idVendor = SERIALNET_DEFAULT_VENDOR_ID,
.idProduct = SERIALNET_DEFAULT_PRODUCT_ID,
.bcdDevice = 0x0100,
.bDeviceClass = UDCLASS_COMM,
.bDeviceSubClass = 0,