| MAXREFDES82# Code Documentation V01.00 Maxim Smart Force Sensor

- Main Page
- Modules
- Files

- File List
- Globals

All Files Functions Variables Macros Groups Pages
Macros | Functions | Variables
usbd_desc.c File Reference
`#include "usbd_core.h"`
`#include "usbd_desc.h"`
`#include "usbd_conf.h"`

Go to the source code of this file.

## Macros
#define | USBD_VID 0x0483
#define | USBD_PID 0x5740
#define | USBD_LANGID_STRING 0x409
#define | USBD_MANUFACTURER_STRING "STMicroelectronics"
#define | USBD_PRODUCT_HS_STRING "STM32 Virtual ComPort in HS Mode"
#define | USBD_PRODUCT_FS_STRING "STM32 Virtual ComPort in FS Mode"
#define | USBD_CONFIGURATION_HS_STRING "VCP Config"
#define | USBD_INTERFACE_HS_STRING "VCP Interface"
#define | USBD_CONFIGURATION_FS_STRING "VCP Config"
#define | USBD_INTERFACE_FS_STRING "VCP Interface"

## Functions
uint8_t * | USBD_VCP_DeviceDescriptor (USBD_SpeedTypeDef speed, uint16_t *length)
| Returns the device descriptor.
uint8_t * | USBD_VCP_LangIDStrDescriptor (USBD_SpeedTypeDef speed, uint16_t *length)
| Returns the LangID string descriptor.
uint8_t * | USBD_VCP_ManufacturerStrDescriptor (USBD_SpeedTypeDef speed, uint16_t *length)
| Returns the manufacturer string descriptor.
uint8_t * | USBD_VCP_ProductStrDescriptor (USBD_SpeedTypeDef speed, uint16_t *length)
| Returns the product string descriptor.
uint8_t * | USBD_VCP_SerialStrDescriptor (USBD_SpeedTypeDef speed, uint16_t *length)
| Returns the serial number string descriptor.
uint8_t * | USBD_VCP_ConfigStrDescriptor (USBD_SpeedTypeDef speed, uint16_t *length)
| Returns the configuration string descriptor.
uint8_t * | USBD_VCP_InterfaceStrDescriptor (USBD_SpeedTypeDef speed, uint16_t *length)
| Returns the interface string descriptor.

## Variables
USBD_DescriptorsTypeDef | VCP_Desc
__ALIGN_BEGIN uint8_t USBD_DeviceDesc[USB_LEN_DEV_DESC] | __ALIGN_END
uint8_t | USBD_StringSerial [USB_SIZ_STRING_SERIAL]

## Macro Definition Documentation

#define USBD_CONFIGURATION_FS_STRING "VCP Config"

Definition at line 43 of file usbd_desc.c.

#define USBD_CONFIGURATION_HS_STRING "VCP Config"

Definition at line 41 of file usbd_desc.c.

#define USBD_INTERFACE_FS_STRING "VCP Interface"

Definition at line 44 of file usbd_desc.c.

#define USBD_INTERFACE_HS_STRING "VCP Interface"

Definition at line 42 of file usbd_desc.c.

#define USBD_LANGID_STRING 0x409

Definition at line 37 of file usbd_desc.c.

#define USBD_MANUFACTURER_STRING "STMicroelectronics"

Definition at line 38 of file usbd_desc.c.

#define USBD_PID 0x5740

Definition at line 36 of file usbd_desc.c.

#define USBD_PRODUCT_FS_STRING "STM32 Virtual ComPort in FS Mode"

Definition at line 40 of file usbd_desc.c.

#define USBD_PRODUCT_HS_STRING "STM32 Virtual ComPort in HS Mode"

Definition at line 39 of file usbd_desc.c.

#define USBD_VID 0x0483

Definition at line 35 of file usbd_desc.c.

## Function Documentation

uint8_t * USBD_VCP_ConfigStrDescriptor | ( | USBD_SpeedTypeDef | speed,
|  | uint16_t * | length
| ) |  |

Returns the configuration string descriptor.

Parameters

  speed,: | Current device speed
  length,: | Pointer to data length variable

Return values

  Pointer | to descriptor buffer

Definition at line 198 of file usbd_desc.c.

uint8_t * USBD_VCP_DeviceDescriptor | ( | USBD_SpeedTypeDef | speed,
|  | uint16_t * | length
| ) |  |

Returns the device descriptor.

Parameters

  speed,: | Current device speed
  length,: | Pointer to data length variable

Return values

  Pointer | to descriptor buffer

Definition at line 127 of file usbd_desc.c.

uint8_t * USBD_VCP_InterfaceStrDescriptor | ( | USBD_SpeedTypeDef | speed,
|  | uint16_t * | length
| ) |  |

Returns the interface string descriptor.

Parameters

  speed,: | Current device speed
  length,: | Pointer to data length variable

Return values

  Pointer | to descriptor buffer

Definition at line 217 of file usbd_desc.c.

uint8_t * USBD_VCP_LangIDStrDescriptor | ( | USBD_SpeedTypeDef | speed,
|  | uint16_t * | length
| ) |  |

Returns the LangID string descriptor.

Parameters

  speed,: | Current device speed
  length,: | Pointer to data length variable

Return values

  Pointer | to descriptor buffer

Definition at line 139 of file usbd_desc.c.

uint8_t * USBD_VCP_ManufacturerStrDescriptor | ( | USBD_SpeedTypeDef | speed,
|  | uint16_t * | length
| ) |  |

Returns the manufacturer string descriptor.

Parameters

  speed,: | Current device speed
  length,: | Pointer to data length variable

Return values

  Pointer | to descriptor buffer

Definition at line 170 of file usbd_desc.c.

uint8_t * USBD_VCP_ProductStrDescriptor | ( | USBD_SpeedTypeDef | speed,
|  | uint16_t * | length
| ) |  |

Returns the product string descriptor.

Parameters

  speed,: | Current device speed
  length,: | Pointer to data length variable

Return values

  Pointer | to descriptor buffer

Definition at line 151 of file usbd_desc.c.

uint8_t * USBD_VCP_SerialStrDescriptor | ( | USBD_SpeedTypeDef | speed,
|  | uint16_t * | length
| ) |  |

Returns the serial number string descriptor.

Parameters

  speed,: | Current device speed
  length,: | Pointer to data length variable

Return values

  Pointer | to descriptor buffer

Definition at line 182 of file usbd_desc.c.

## Variable Documentation

__ALIGN_BEGIN uint8_t USBD_StrDesc [USBD_MAX_STR_DESC_SIZ] __ALIGN_END

Initial value:
= {
0x12,
USB_DESC_TYPE_DEVICE,
0x00,
0x02,
0x00,
0x00,
0x00,
USB_MAX_EP0_SIZE,
LOBYTE(USBD_VID),
HIBYTE(USBD_VID),
LOBYTE(USBD_PID),
HIBYTE(USBD_PID),
0x00,
0x02,
USBD_IDX_MFC_STR,
USBD_IDX_PRODUCT_STR,
USBD_IDX_SERIAL_STR,
USBD_MAX_NUM_CONFIGURATION
}

< IAR Compiler

Definition at line 74 of file usbd_desc.c.

uint8_t USBD_StringSerial[USB_SIZ_STRING_SERIAL]

Initial value:
=
{
USB_SIZ_STRING_SERIAL,
USB_DESC_TYPE_STRING,
}

IAR Compiler

Definition at line 106 of file usbd_desc.c.

USBD_DescriptorsTypeDef VCP_Desc

Initial value:
= {
USBD_VCP_DeviceDescriptor,
USBD_VCP_LangIDStrDescriptor,
USBD_VCP_ManufacturerStrDescriptor,
USBD_VCP_ProductStrDescriptor,
USBD_VCP_SerialStrDescriptor,
USBD_VCP_ConfigStrDescriptor,
USBD_VCP_InterfaceStrDescriptor,
}

Definition at line 60 of file usbd_desc.c.