summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/usbd_desc.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/usbd_desc.c')
-rw-r--r--stmhal/usbd_desc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/stmhal/usbd_desc.c b/stmhal/usbd_desc.c
index c893b4c666..212e91a576 100644
--- a/stmhal/usbd_desc.c
+++ b/stmhal/usbd_desc.c
@@ -80,10 +80,14 @@ __ALIGN_BEGIN static uint8_t USBD_LangIDDesc[USB_LEN_LANGID_STR_DESC] __ALIGN_EN
__ALIGN_BEGIN static uint8_t USBD_StrDesc[USBD_MAX_STR_DESC_SIZ] __ALIGN_END;
-// set the PID
-void USBD_SetPID(uint16_t pid) {
+// set the VID, PID and device release number
+void USBD_SetVIDPIDRelease(uint16_t vid, uint16_t pid, uint16_t device_release_num) {
+ hUSBDDeviceDesc[8] = LOBYTE(pid);
+ hUSBDDeviceDesc[9] = HIBYTE(pid);
hUSBDDeviceDesc[10] = LOBYTE(pid);
hUSBDDeviceDesc[11] = HIBYTE(pid);
+ hUSBDDeviceDesc[12] = LOBYTE(device_release_num);
+ hUSBDDeviceDesc[13] = HIBYTE(device_release_num);
}
/**