summaryrefslogtreecommitdiff
path: root/stmhal/usb.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-02-03 22:37:50 +0000
committerDamien George <damien.p.george@gmail.com>2015-02-13 14:02:51 +0000
commit55d6218b9a17f23754bd00d2759800a1447599ca (patch)
tree5a6c25a68897d1a2a985a4945704290a80ea4f65 /stmhal/usb.h
parent65af7ebdc5c53eebcec7950948abcc16d6a0ac6c (diff)
stmhal: Properly define pyb.usb_mode() semantics.
Diffstat (limited to 'stmhal/usb.h')
-rw-r--r--stmhal/usb.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/stmhal/usb.h b/stmhal/usb.h
index 70441c578..ae16e7207 100644
--- a/stmhal/usb.h
+++ b/stmhal/usb.h
@@ -30,6 +30,7 @@
#define PYB_USB_FLAG_USB_MODE_CALLED (0x0002)
// Windows needs a different PID to distinguish different device configurations
+#define USBD_VID (0xf055)
#define USBD_PID_CDC_MSC (0x9800)
#define USBD_PID_CDC_HID (0x9801)
#define USBD_PID_CDC (0x9802)
@@ -52,7 +53,7 @@ MP_DECLARE_CONST_FUN_OBJ(pyb_have_cdc_obj); // deprecated
MP_DECLARE_CONST_FUN_OBJ(pyb_hid_send_report_obj); // deprecated
void pyb_usb_init0(void);
-void pyb_usb_dev_init(uint16_t pid, usb_device_mode_t mode, USBD_HID_ModeInfoTypeDef *hid_info);
+bool pyb_usb_dev_init(uint16_t vid, uint16_t pid, usb_device_mode_t mode, USBD_HID_ModeInfoTypeDef *hid_info);
void pyb_usb_dev_deinit(void);
bool usb_vcp_is_enabled(void);
void usb_vcp_set_interrupt_char(int c);