Help migrating from 0.1.14 to 0.2.1 #176
andrewdavidmackenzie
started this conversation in
General
Replies: 2 comments 2 replies
-
|
Something like this: // Ideally create this once on initialization, so maybe lift it out of a loop,
// or keep it in a field of `porky`. It's not too expensive to create every time if
// necessary, but only one instance can exist at a time for a given endpoint address.
let mut endpoint = interface.endpoint::<Interrupt, In>(0x81)?;
endpoint.submit(Buffer::new(1024));
let completion = endpoint.next_complete().await;
if completion.status.is_ok() {
let msg = postcard::from_bytes(&completion.buffer)?;
return Ok(msg);
} |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
thanks for that, will try as soon as I can. Buffer comes from transfer::in? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on updating from 0.1.14 to 0.2.1 and I'm wondering how to replace Interface::interrupt_in and it's use of RequestBuffer
This my existing code:
Beta Was this translation helpful? Give feedback.
All reactions