Draft
Conversation
| let mut alt = interface.alt_setting(0xFF, 0, 0, None); | ||
|
|
||
| let ep_in: <Driver<'_, USB_OTG_FS> as embassy_usb::driver::Driver<'_>>::EndpointIn = | ||
| alt.endpoint_bulk_in(Some(EndpointAddress::from(1)), 10); // I cannot tell you for the life of me what type this variable is meant to have |
Member
There was a problem hiding this comment.
I put the types in, you have to read the source code for this, vscode is not very helpful
|
|
||
| handler.interface_num = interface.interface_number(); | ||
|
|
||
| drop(function); // why?? |
Member
There was a problem hiding this comment.
some weird lifetime lol, if you comment this line you'll see
| // The rust compiler keeps complaining about EndpointIn<'static> and its messages arent very helpful. | ||
|
|
||
| #[embassy_executor::task] | ||
| async fn send_data_task(mut ep: <Driver<'static, USB_OTG_FS> as embassy_usb::driver::Driver<'static>>::EndpointIn, send_signal: SendDataSignal) { |
Member
There was a problem hiding this comment.
an embassy task requires all the parameters having a static lifetime, currently the ep in setup_usb_handler does not have a static lifetime.
Take a look at the pattern from https://github.com/McMaster-Rocketry-Team/ICARUS/blob/4afbc1ca998ca76e05bfc59c94b1f2dbc421e82c/firmware/src/usb.rs
| } | ||
|
|
||
| // The plan is to add this task in low_prio_main and have it wait on two signals, one which contains whether it should write or not | ||
| // and another that tells it what files to write over the endpoint (this one could be a watch) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
issues are in the comments of the code @PegasisForever