-
Notifications
You must be signed in to change notification settings - Fork 4
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
Make spi-flash
no-std
compatible (still requires alloc
)
#6
Conversation
Thanks for this PR! Is it possible for you to disable rustfmt instead? It seems like many of the changes are just formatting, but it's harder to review what's going on exactly and mixes up two things in one commit. Similarly with adding the Otherwise the changes overall seem OK, though it's a shame to have to redefine the errors twice for std/no-std. Hopefully soon the Error trait will be in core! I think it would be most useful if the crate could work without Possibly the FlashAccess trait should not return an |
I will do that.
I added them because some things are not used anymore with
This is unfortunate indeed, but I don't think it's too bad. It was the easiest solution I could come up with.
The
I have not done any non-embedded stuff with Rust, so I have no idea how
I will add that.
You are right. I would go with
I left |
Oh, I missed that this was due to the no-std change. Disabling them for no-std seems clearer, then.
I haven't tried it, but maybe we could use
Ah, that's true. That might also be something that can change with embedded-hal v1.0 (rust-embedded/embedded-hal#287) though.
I'll think about this then, don't worry about it for now.
I was thinking of embedded-hal's All the other points sound good, thanks. |
I tried to change it to |
What do you think of just using an integer milliseconds everywhere for times, instead of Duration or embedded-time? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're happy with this PR as-is I'm happy to merge it now, and make any other changes in later PRs.
I've looked into it and think it should be doable. What type should be used instead? |
|
Ok, but I still think I'll do it in a separate PR. So this one is good to go. |
Fixes #2
This PR adds
no-std
support.PS:
alloc
a major redesign would be necessary.If you are interested I would try to do it.