X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Fcommon%2Fusb_device_descriptor.c;h=ac95a13c68ade3f19d1d73c3a9827614211d8dd6;hb=c4d55664636e0df02fa19c079c4d9367e2d25917;hp=8271e58a8ba781cb22fa7bfa9abe4170c4fe5181;hpb=ce2821c45d209e454ae3249d0035f9921c11b6bc;p=gps-watch.git diff --git a/src/common/usb_device_descriptor.c b/src/common/usb_device_descriptor.c index 8271e58..ac95a13 100644 --- a/src/common/usb_device_descriptor.c +++ b/src/common/usb_device_descriptor.c @@ -62,9 +62,9 @@ uint8_t g_UsbDeviceDescriptor[USB_DESCRIPTOR_LENGTH_DEVICE] = { /* Maximum packet size for endpoint zero (only 8, 16, 32, or 64 are valid) */ USB_CONTROL_MAX_PACKET_SIZE, /* Vendor ID (assigned by the USB-IF) */ - 0xC9U, 0x1FU, + 0x00, 0x00, /* Product ID (assigned by the manufacturer) */ - 0x94, 0x00, + 0x00, 0x00, /* Device release number in binary-coded decimal */ USB_SHORT_GET_LOW(USB_DEVICE_DEMO_BCD_VERSION), USB_SHORT_GET_HIGH(USB_DEVICE_DEMO_BCD_VERSION), /* Index of string descriptor describing manufacturer */ @@ -480,3 +480,17 @@ usb_status_t USB_DeviceSetSpeed(usb_device_handle handle, uint8_t speed) } return kStatus_USB_Success; } + +void +USB_DeviceSetVendorId (uint16_t vid) +{ + g_UsbDeviceDescriptor[8] = (vid >> 0) & 0xff; + g_UsbDeviceDescriptor[9] = (vid >> 8) & 0xff; +} + +void +USB_DeviceSetProductId (uint16_t pid) +{ + g_UsbDeviceDescriptor[10] = (pid >> 0) & 0xff; + g_UsbDeviceDescriptor[11] = (pid >> 8) & 0xff; +}