Skip to content

Implement sleep mode #9

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

Merged
merged 3 commits into from
Apr 7, 2020
Merged

Implement sleep mode #9

merged 3 commits into from
Apr 7, 2020

Conversation

dbrgn
Copy link
Owner

@dbrgn dbrgn commented Mar 6, 2020

Add methods for going to sleep and waiting for wakeup.

Unfortunately we cannot implement the wakeup command, since there is no trait for a break condition: rust-embedded/embedded-hal#190 However, the driver could be destructured using the new destroy method and recreated after sending the break condition manually. Waiting for wakeup can then be done in the driver by using wait_for_wakeup(/* force */ true).

@dbrgn dbrgn added the enhancement New feature or request label Mar 6, 2020
@dbrgn dbrgn requested a review from rnestler March 6, 2020 13:13
TODO:

- Test whether 2**32 is indeed out of range
- Test with real device
- Test wakeup draining with read_line()
dbrgn added 2 commits April 7, 2020 22:36
This can be used to re-claim the serial device.
@dbrgn dbrgn merged commit e18ea2d into master Apr 7, 2020
@dbrgn dbrgn deleted the sleep branch April 7, 2020 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant