-
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
no_std
and use in peripherals
#15
Comments
Hey! Yeah, I'm definitely open to moving the serial port choice to a trait and adding the device side of the protocol.
The only downside I see here is that the errors returned by One thing I'm still thinking about: We should probably implement the client side and the device side in different structs. I don't see a use-case for mixing them (there can be only one node on the network sending instructions), and the Of course, if we split the types it might make sense to add a private low level type that implements the basic message exchanges features, so the high level types only need to implement high level instructions on top of the low level interface. |
Awesome! |
Hello!
I am looking at developing for a no_std environmet and I would like to use this library.
There is good flexibility with the
ReadBuffer
andWriteBuffer
generics but its locked into usingSerialPort
. I know this has given greater control than just using thestd::io::Read/Write
traits. Would you be open to considering making theserial_port
field of the bus an interface trait to allow other interface implementations?Other barriers to
no_std
are the use ofDuration
andInstant
in the timeout,std::io::Error
,Vec
in various return types,std::borrow::Borrow
inbulk_write
, can be easily switch tocore::borrow::Borrow
My use case is actually developing a device/peripheral which uses the dynamixel protocol for receiving communication. As in it receives Instruction packets, parses them and responses with a StatusPacket. Similar to how the Dynamixel2Arduino Slave mode works, if you are familar with that. https://github.com/ROBOTIS-GIT/Dynamixel2Arduino/blob/master/examples/advanced/slave/slave.ino
This could exist as a seperate crate, or if you are interested it could be added to this crate. It would add methods to received and parse Instruction Packets and methods to return a response packet. I began planning it only to realise it would reuse many of the same elements already developed for this crate (ie the
instruction_id
consts, thefind_header
method and general architecture)Let me know what you think :) I have time to impl most of this
The text was updated successfully, but these errors were encountered: