Cosmetics
This commit is contained in:
@@ -54,30 +54,32 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define USBD_VID 0x0483
|
||||
#define USBD_VID_STM 0x0483 // STM Vendor ID
|
||||
#define USBD_VID_PID_CODES 0x1209 // https://pid.codes
|
||||
|
||||
#define USBD_LANGID_STRING 0x409
|
||||
#define USBD_MANUFACTURER_STRING "OpenTX"
|
||||
#define USBD_SERIALNUMBER_FS_STRING "00000000001B"
|
||||
|
||||
|
||||
#if defined(BOOT)
|
||||
#define USBD_MSC_PRODUCT_FS_STRING USB_NAME " Bootloader"
|
||||
#else
|
||||
#define USBD_MSC_PRODUCT_FS_STRING USB_NAME " Mass Storage"
|
||||
#endif
|
||||
|
||||
#define USBD_MSC_VID USBD_VID_STM
|
||||
#define USBD_MSC_PID 0x5720
|
||||
#define USBD_MSC_CONFIGURATION_FS_STRING "MSC Config"
|
||||
#define USBD_MSC_INTERFACE_FS_STRING "MSC Interface"
|
||||
|
||||
#define USBD_HID_VID 0x1209 // https://pid.codes
|
||||
#define USBD_HID_VID USBD_VID_PID_CODES
|
||||
#define USBD_HID_PID 0x4F54 // OpenTX assigned PID
|
||||
#define USBD_HID_PRODUCT_FS_STRING USB_NAME " Joystick"
|
||||
#define USBD_HID_CONFIGURATION_FS_STRING "HID Config"
|
||||
#define USBD_HID_INTERFACE_FS_STRING "HID Interface"
|
||||
|
||||
#define USBD_CDC_PID 0x5740 // do not change, this ID is used by the ST USB driver for Windows
|
||||
#define USBD_CDC_VID USBD_VID_STM
|
||||
#define USBD_CDC_PID 0x5740 // do not change, this ID is used by the ST USB driver for Windows
|
||||
#define USBD_CDC_PRODUCT_FS_STRING USB_NAME " Serial Port"
|
||||
#define USBD_CDC_CONFIGURATION_FS_STRING "VSP Config"
|
||||
#define USBD_CDC_INTERFACE_FS_STRING "VSP Interface"
|
||||
@@ -127,20 +129,24 @@ __ALIGN_BEGIN uint8_t USBD_StrDesc[USB_MAX_STR_DESC_SIZ] __ALIGN_END ; // modifi
|
||||
* @param length : pointer to data length variable
|
||||
* @retval pointer to descriptor buffer
|
||||
*/
|
||||
uint8_t * USBD_USR_DeviceDescriptor( uint8_t speed , uint16_t *length)
|
||||
uint8_t * USBD_USR_DeviceDescriptor( uint8_t speed , uint16_t *length)
|
||||
{
|
||||
int pid=0;
|
||||
int vid= USBD_VID;
|
||||
int vid = 0;
|
||||
int pid = 0;
|
||||
|
||||
switch (getSelectedUsbMode()) {
|
||||
case USB_JOYSTICK_MODE:
|
||||
pid = USBD_HID_PID;
|
||||
vid = USBD_HID_VID;
|
||||
pid = USBD_HID_PID;
|
||||
break;
|
||||
|
||||
case USB_SERIAL_MODE:
|
||||
vid = USBD_CDC_VID;
|
||||
pid = USBD_CDC_PID;
|
||||
break;
|
||||
|
||||
case USB_MASS_STORAGE_MODE:
|
||||
vid = USBD_MSC_VID;
|
||||
pid = USBD_MSC_PID;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user