Skip to content

Windows: Allow HID reports up to 1024 + report id - #226

Closed
agners wants to merge 1 commit into
libusb:masterfrom
agners:hid-length-v3
Closed

agners wants to merge 1 commit into
libusb:masterfrom
agners:hid-length-v3

Conversation

@agners

@agners agners commented Nov 5, 2016

Copy link
Copy Markdown

HID reports can contain up to 1024 bytes. When using a report id
the complete buffer will be 1025 bytes. Do not return an error
if the user supplies a report id and a buffer of 1025 bytes size.

Closes #222

Signed-off-by: Stefan Agner [email protected]

I am sorry, this is the third and hopefully last version of this pull request. This version fixes precedence (+ takes precedence over ?, so add brackets) and avoids a warning about signed/unsigned compare.

HID reports can contain up to 1024 bytes. When using a report id
the complete buffer will be 1025 bytes. Do not return an error
if the user supplies a report id and a buffer of 1025 bytes size.

Closes libusb#222

Signed-off-by: Stefan Agner <[email protected]>
@mcuee mcuee added the windows label Dec 13, 2016
@dickens dickens closed this in 18a1452 Mar 1, 2017
@dickens

dickens commented Mar 1, 2017

Copy link
Copy Markdown
Member

Applied, thanks!

Seneral pushed a commit to Seneral/libusb that referenced this pull request Sep 21, 2021
HID reports can contain up to 1024 bytes. When using a report id
the complete buffer will be 1025 bytes. Do not return an error
if the user supplies a report id and a buffer of 1025 bytes size.

Closes libusb#222
Closes libusb#226

Signed-off-by: Stefan Agner <[email protected]>
Signed-off-by: Chris Dickens <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

libusb_control_transfer fails with -2 when transfering 1024 bytes with HID reports

3 participants