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

Non Blocking API #4

Closed
jonwingfield opened this issue Oct 24, 2018 · 9 comments · Fixed by #27
Closed

Non Blocking API #4

jonwingfield opened this issue Oct 24, 2018 · 9 comments · Fixed by #27
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jonwingfield
Copy link

Can you share your thoughts around the non-blocking API? I'd be willing to take a stab at it, but I'm not sure what you had in mind.

@JohnDoneth
Copy link
Owner

JohnDoneth commented Oct 25, 2018

Well the API I had in mind would be to spawn a future when issuing a command as not to "block the main thread". Then wait for the busy signal from the LCD to go low and use that as the indicator that the future should be finished when polling.

I know the nb crate has some useful constructs already that could be used in the process of developing the API surface, but I have not looked into it recently.

@JohnDoneth JohnDoneth added enhancement New feature or request help wanted Extra attention is needed labels Feb 21, 2019
@xoviat
Copy link
Contributor

xoviat commented Jan 22, 2021

I'm willing to implement this. It's a simple matter of accepting an async delay, and then modifying the api to "async".

@zacck-zz
Copy link

zacck-zz commented Mar 1, 2021

Hey @xoviat would it be possible to know if any progress was made on this, considering using this library with rtic.rs

@xoviat
Copy link
Contributor

xoviat commented Mar 1, 2021

The problem is that there are no async traits. rust-embedded/embedded-hal#206 was submitted, but that went nowhere. I had considered just adding a dependency on embassy (the async library that I'm using), but I haven't done that yet. The problem with RTIC IMO is there's no encapsulation, which is why I like embassy better.

@zacck-zz
Copy link

zacck-zz commented Mar 1, 2021

@xoviat and if you use embassy, how would you implement the solution? I'm a tad new to rust trying to figure out how to get past this more than keen to try do the work

@xoviat
Copy link
Contributor

xoviat commented Mar 1, 2021

@zacck can you join https://app.element.io/#/room/#rust-embedded:matrix.org so that we can discuss this?

@zacck-zz
Copy link

Hey @JohnDoneth would you please make a new release for this, for some reason I cant reach the masync module at this moment using this as github dependency.

@JohnDoneth
Copy link
Owner

@zacck Sure! I will prioritize getting a release out. In the meantime did you add features = ["async"] to your git dependency? The async feature is not enabled by default.

@zacck-zz
Copy link

@JohnDoneth I did not do that, its likely what I need! Still learning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants