Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
99d62c4d
Commit
99d62c4d
authored
Sep 22, 2016
by
Pavol Rusnak
Committed by
Damien George
Oct 04, 2016
Browse files
stmhal/usb: Use real packet size (not maximum) in HID receive.
parent
8f3cf6e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
stmhal/usbdev/class/src/usbd_cdc_msc_hid.c
View file @
99d62c4d
...
...
@@ -1069,7 +1069,10 @@ uint8_t USBD_HID_ReceivePacket(USBD_HandleTypeDef *pdev) {
}
// Prepare Out endpoint to receive next packet
USBD_LL_PrepareReceive
(
pdev
,
hid_out_ep
,
HID_ClassData
.
RxBuffer
,
HID_DATA_FS_MAX_PACKET_SIZE
);
uint16_t
mps_out
=
hid_desc
[
HID_DESC_OFFSET_MAX_PACKET_OUT_LO
]
|
(
hid_desc
[
HID_DESC_OFFSET_MAX_PACKET_OUT_HI
]
<<
8
);
USBD_LL_PrepareReceive
(
pdev
,
hid_out_ep
,
HID_ClassData
.
RxBuffer
,
mps_out
);
return
USBD_OK
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment