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

Question: How is pdata.tsize initialized in zephyr/subsys/usb/usb_transfer.c? #23953

Closed
tluio opened this issue Mar 31, 2020 · 4 comments
Closed
Assignees
Labels
area: USB Universal Serial Bus

Comments

@tluio
Copy link

tluio commented Mar 31, 2020

In function usb_transfer_sync, pdata.tsize is returned. I wonder how it is initialized. Is it initialized through DMA?

@jfischer-no
Copy link
Collaborator

For usb_transfer_sync(), which blocks until finished, pointer to the pdata is cb_data and pdata.tsize will be assigned in the callback of usb_transfer().

@tluio
Copy link
Author

tluio commented Apr 1, 2020

Thank you very much! Would you please tell me how usb_transfer_sync() blocks.

@eobalski
Copy link
Collaborator

eobalski commented Apr 1, 2020

There is semaphore which is taken and later released.

@tluio
Copy link
Author

tluio commented Apr 1, 2020

@emob-nordic Thank you! Now I think I should close this issue.

@tluio tluio closed this as completed Apr 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: USB Universal Serial Bus
Projects
None yet
Development

No branches or pull requests

4 participants