-
-
Notifications
You must be signed in to change notification settings - Fork 3
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 libosdp no_std compatible #17
Conversation
I changed |
So, two things,
|
Ok, I will do that.
For |
Done |
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.
Apart from those two nits, LGTM. Thanks.
libosdp/src/channel.rs
Outdated
fn from(value: E) -> Self { | ||
match value.kind() { | ||
//TODO determine if this is the correct error kind | ||
// embedded_io::ErrorKind::TimedOut => ChannelError::WouldBlock, |
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.
embedded_io::ErrorKind::TimedOut
cannot be put to ChannelError::WouldBlock
since embedded_io defines read/write to always block, there is no equivalent to ChannelError::WouldBlock
. so this comment-line can be removed.
This probably indicates a deeper issue as LibOSDP expects all read/write to be non-blocking. We need to explore ReadReady/WriteReady traits and adjust the channel callbacks to handle the outcomes correctly.
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.
You are right. But currently we are only using embedded_io::Error
, so that is mostly a problem implementers of Channel will have, not of libosdp
directly.
This should probably be pointed out more clear in the doc comments of Channel
though.
A quick google search revealed that none of the HALs I could find implement ReadReady
/WriteReady
currently. I think WriteReady
is not stricly necessary, but Read
alone will simply not work as expected. That is indeed problematic.
Nevertheless, I don't think this has to block this PR. It can be handled in a future PR.
BTW this is a semver breaking change, because of the change to |
True, but I think we should wait until we have some level of API stability before enforcing SemVer. |
Depends on #16.
The feature
arc
is introduced, because some targets likethumbv6m-none-eabi
don't support CAS operations and therefore don't supportArc
. By disabling this feature these targets can be supported, too. I will probably looking into implementingget_version()
andget_source_info()
some other way that does not rely on CAS operations, but this waylibosdp
can at least be built for those targets now.