Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use the QUsbEndpoint::controlEndpoint #88

Closed
Alvazz opened this issue Nov 17, 2022 · 2 comments
Closed

how to use the QUsbEndpoint::controlEndpoint #88

Alvazz opened this issue Nov 17, 2022 · 2 comments
Assignees
Labels

Comments

@Alvazz
Copy link

Alvazz commented Nov 17, 2022

Hi fpoussin. Thank for you shared this Good project.

I want use the QUsbEndpoint::controlEndpoint way. can you give me some demo code?

thanks!

@fpoussin
Copy link
Owner

fpoussin commented Feb 4, 2023

Hi,

You can use the QUsbEndpoint::makeControlPacket method to generate control packets, then write it just like a normal endpoint.
It mostly depends on the device.

@fpoussin fpoussin closed this as completed Feb 4, 2023
@Alvazz
Copy link
Author

Alvazz commented Feb 27, 2023

1677484781700

m_read_ep = new QUsbEndpoint(m_usb_dev,QUsbEndpoint::controlEndpoint,0);
m_read_ep->makeControlPacket(buffer,QUsbEndpoint::recipientInterface,QUsbEndpoint::requestClearFeature,0x0603, 0x0600, 0x3E00);
m_read_ep->write(buffer);

Should I write like this?

Then where do I receive and return the data?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants