diff options
author | Damien George <damien.p.george@gmail.com> | 2015-02-03 22:37:50 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-02-13 14:02:51 +0000 |
commit | 55d6218b9a17f23754bd00d2759800a1447599ca (patch) | |
tree | 5a6c25a68897d1a2a985a4945704290a80ea4f65 /stmhal/usbd_desc.c | |
parent | 65af7ebdc5c53eebcec7950948abcc16d6a0ac6c (diff) | |
download | micropython-55d6218b9a17f23754bd00d2759800a1447599ca.tar.gz micropython-55d6218b9a17f23754bd00d2759800a1447599ca.zip |
stmhal: Properly define pyb.usb_mode() semantics.
Diffstat (limited to 'stmhal/usbd_desc.c')
-rw-r--r-- | stmhal/usbd_desc.c | 8 |
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); } /** |