summaryrefslogtreecommitdiffstatshomepage
path: root/stm/lib/usbd_pyb_core.c
diff options
context:
space:
mode:
authorDamien <damien.p.george@gmail.com>2013-10-14 00:03:29 +0100
committerDamien <damien.p.george@gmail.com>2013-10-14 00:03:29 +0100
commit5dd455d06dd3cdda7daf496822776b0c8319f02b (patch)
treebec853bd5ef6b58a2c11f9a79669a725c12e97e9 /stm/lib/usbd_pyb_core.c
parentfee89d520fb02b6fb673050c9d2043e14641edf6 (diff)
downloadmicropython-5dd455d06dd3cdda7daf496822776b0c8319f02b.tar.gz
micropython-5dd455d06dd3cdda7daf496822776b0c8319f02b.zip
Change VID/PID info so USB works on Windows.
Diffstat (limited to 'stm/lib/usbd_pyb_core.c')
-rw-r--r--stm/lib/usbd_pyb_core.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/stm/lib/usbd_pyb_core.c b/stm/lib/usbd_pyb_core.c
index e2e8c65ca0..9c0f1caa01 100644
--- a/stm/lib/usbd_pyb_core.c
+++ b/stm/lib/usbd_pyb_core.c
@@ -71,7 +71,7 @@
#include "usbd_msc_bot.h"
#include "usbd_msc_mem.h"
-#define USB_PYB_CONFIG_DESC_SIZ 98
+#define USB_PYB_CONFIG_DESC_SIZ (98)
#define MSC_EPIN_SIZE MSC_MAX_PACKET
#define MSC_EPOUT_SIZE MSC_MAX_PACKET
@@ -150,7 +150,7 @@ __ALIGN_BEGIN static uint8_t usbd_pyb_CfgDesc[USB_PYB_CONFIG_DESC_SIZ] __ALIGN_E
HIBYTE(USB_PYB_CONFIG_DESC_SIZ),
0x03, // bNumInterfaces: 3 interfaces
0x01, // bConfigurationValue: Configuration value
- 0x00, // iConfiguration: Index of string descriptor describing the configuration
+ 0x04, // iConfiguration: Index of string descriptor describing the configuration
0x80, // bmAttributes: bus powered; 0xc0 for self powered
0xfa, // bMaxPower: in units of 2mA
@@ -163,7 +163,7 @@ __ALIGN_BEGIN static uint8_t usbd_pyb_CfgDesc[USB_PYB_CONFIG_DESC_SIZ] __ALIGN_E
0x00, // bFunctionClass: ?
0x00, // bFunctionSubClass: ?
0x00, // bFunctionProtocol: ?
- 0x00, // iFunction: index of string for this function
+ 0x04, // iFunction: index of string for this function
//--------------------------------------------------------------------------
// Interface Descriptor
@@ -252,9 +252,9 @@ __ALIGN_BEGIN static uint8_t usbd_pyb_CfgDesc[USB_PYB_CONFIG_DESC_SIZ] __ALIGN_E
USB_INTERFACE_DESCRIPTOR_TYPE, // bDescriptorType: interface descriptor
0x02, // bInterfaceNumber: Number of Interface
0x00, // bAlternateSetting: Alternate setting
- 0x02, // bNumEndpoints*/
+ 0x02, // bNumEndpoints
0x08, // bInterfaceClass: MSC Class
- 0x06, // bInterfaceSubClass : SCSI transparent*/
+ 0x06, // bInterfaceSubClass : SCSI transparent
0x50, // nInterfaceProtocol
0x00, // iInterface:
@@ -397,6 +397,7 @@ static uint8_t usbd_pyb_Setup(void *pdev, USB_SETUP_REQ *req) {
// Standard Device Request ---------------------------------------------
case (USB_REQ_TYPE_STANDARD | USB_REQ_RECIPIENT_DEVICE):
+ /*
switch (req->bRequest) {
case USB_REQ_GET_DESCRIPTOR:
{
@@ -409,6 +410,7 @@ static uint8_t usbd_pyb_Setup(void *pdev, USB_SETUP_REQ *req) {
return USBD_CtlSendData(pdev, pbuf, len);
}
}
+ */
break;
// Standard Interface Request ------------------------------------------