summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/usbdev/class/src
diff options
context:
space:
mode:
authorPavol Rusnak <stick@gk2.sk>2016-09-22 21:39:50 +0200
committerDamien George <damien.p.george@gmail.com>2016-10-04 15:38:32 +1100
commit8f3cf6e6a873e7c14781200a23efa733c95bc510 (patch)
tree5b2393706af47b00d6b1cb1162fcdf98afad9c00 /stmhal/usbdev/class/src
parenteb239b839855de4f7fbf241635b702773f421b60 (diff)
downloadmicropython-8f3cf6e6a873e7c14781200a23efa733c95bc510.tar.gz
micropython-8f3cf6e6a873e7c14781200a23efa733c95bc510.zip
stmhal/usb: Use correct ClassData structure for HID receive.
Diffstat (limited to 'stmhal/usbdev/class/src')
-rw-r--r--stmhal/usbdev/class/src/usbd_cdc_msc_hid.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/stmhal/usbdev/class/src/usbd_cdc_msc_hid.c b/stmhal/usbdev/class/src/usbd_cdc_msc_hid.c
index 3ac9029321..913b2ecc10 100644
--- a/stmhal/usbdev/class/src/usbd_cdc_msc_hid.c
+++ b/stmhal/usbdev/class/src/usbd_cdc_msc_hid.c
@@ -53,6 +53,7 @@
#define HID_IN_EP_WITH_CDC (0x81)
#define HID_OUT_EP_WITH_CDC (0x01)
#define HID_IN_EP_WITH_MSC (0x83)
+#define HID_OUT_EP_WITH_MSC (0x03)
#define USB_DESC_TYPE_ASSOCIATION (0x0b)
@@ -613,6 +614,7 @@ int USBD_SelectMode(uint32_t mode, USBD_HID_ModeInfoTypeDef *hid_info) {
// not implemented
case USBD_MODE_MSC_HID:
hid_in_ep = HID_IN_EP_WITH_MSC;
+ hid_out_ep = HID_OUT_EP_WITH_MSC;
hid_iface_num = HID_IFACE_NUM_WITH_MSC;
break;
*/
@@ -723,7 +725,7 @@ static uint8_t USBD_CDC_MSC_HID_Init(USBD_HandleTypeDef *pdev, uint8_t cfgidx) {
mps_out);
// Prepare Out endpoint to receive next packet
- USBD_LL_PrepareReceive(pdev, hid_out_ep, CDC_ClassData.RxBuffer, mps_out);
+ USBD_LL_PrepareReceive(pdev, hid_out_ep, HID_ClassData.RxBuffer, mps_out);
HID_ClassData.state = HID_IDLE;
}