Comments (10)
Hey, I'm really interested in this issue, but I can't see any associated PRs (yet) or other activity regarding the proposal.
I'm writing embedded firmware for an STM32, and I currently use serialport-rs
for the ARM64 Linux side of things, but I want to unify the traits I'm using, so they can be used in std
environments, and no_std
, with embedded-hal
.
Now, I'll be honest: I'm not good with embedded yet. But I'd like to help provide my - limited - input on this matter, if possible. I'd really like to keep the same code for UART I/O, on ARM64/x86_64 and ARM.
My current implementation abstracts I/O into the core2::io::Read
and core2::io::Write
, but that doesn't work with serialport-rs
yet.
I imagine this comment comes across as a `Hey, is there any progress on this?' - I want to reiterate that I would like to help make this possible, though.
Thank you!
from serialport-rs.
Thank you for your interest!
Here is some guidance on how this could be done:
- For
embedded-hal
0.2 support you could implement the serial traits maybe behind a feature flag likeembedded-hal-0-2
(since it is the future legacy version) - For
embedded-hal
1.0 we have removed the serial traits and will now recommend implementing theembedded-io
traits. This could be done behind anembedded-io
flag probably. - If there is interest in async, the traits in
embedded-io-async
could also be implemented here, probably behind an aptly-named feature.
from serialport-rs.
@dbrgn created #59 for this topic a while ago. It is focused on on older version of embedded-hal 1.0 but a good sketch how this could be done for embedded-hal 0.2.
Are there any plans to over serial I/O for embedded-io with embedded-hal-compat or a similar adapter in the future?
from serialport-rs.
Good point. It might be possible to bridge to embedded-io
in embedded-hal-compat
. Then maybe we could skip embedded-hal
support entirely and just implement the embedded-io{,-async}
traits here.
from serialport-rs.
Hi, sorry for my late reply.
I think, looking at the state of things, there's not a lot I can contribute without becoming a hindrance.
Is there a list of relevant PRs/issues/discussions worth subscribing to to keep track of things?
I've recently published a unified -MODEM crate, which uses code from other XMODEM/YMODEM crates to unify them into one single crate. It'd be really good to be able to use that with embedded-hal
so that Rust code on embedded can interact with XMODEM. For example, this STM32 I'm working with currently uses XMODEM for updates.
from serialport-rs.
Hi, sorry for my late reply.
No problem. We all are doing this in our spare time and have plenty of other things to do.
I think, looking at the state of things, there's not a lot I can contribute without becoming a hindrance.
Is there a list of relevant PRs/issues/discussions worth subscribing to to keep track of things?
This issue here and #59 are the best known issues to me. Recently there were a lot of things going on with embedded-hal going towards 1.0 and I still need to keep up with them.
I've recently published a unified -MODEM crate, which uses code from other XMODEM/YMODEM crates to unify them into one single crate. It'd be really good to be able to use that with
embedded-hal
so that Rust code on embedded can interact with XMODEM. For example, this STM32 I'm working with currently uses XMODEM for updates.
This sounds interesting and might be a good candidate for verifying the porting efforts. Which is your crate?
from serialport-rs.
from serialport-rs.
It should be noted that we have removed the Serial
traits from embedded-hal
and we now encourage implementing and using the embedded-io
traits which are basically the std::io
traits but for no_std
.
from serialport-rs.
I've been working on moving my txmodems
crate from core2
to embedded-io
, but experiencing a few issues. Mostly the lack of the unified Error
type (iirc) that core2
has.
from serialport-rs.
Is there anything I can do to help? I heard vaguely some news about embedded-io
reaching 1.0, so it seems like a good time to prod at this issue again.
from serialport-rs.
Related Issues (20)
- Type of a serialport HOT 2
- Last port.write does not send all bytes on FTDI dongle HOT 7
- Read always timeout in arm-unknown-linux-musleabihf HOT 5
- Serial write stalls application on some Windows machines HOT 7
- Windows USB001 possible? HOT 2
- Wrong informations with Com port HOT 2
- FlowControl::Hardware not set on Siliconlabs Ember dongle on Linux HOT 9
- Linux: `serialport::available_ports()` returns generic USB strings instead of actual descriptor values HOT 3
- Add supported architecture HOT 2
- windows: UsbPortInfo: Provide the same info about Manufacturer and Product name as POSIX HOT 2
- Auto reconnect HOT 1
- use read_to_end always return TimedOut err HOT 2
- Stuck when writing data to the serial port if paired port is not open [Windows 11] HOT 2
- USB ports detected as unknown in docker HOT 1
- Print to COM port via USB to SERIAL converter cable on Windows HOT 1
- Set a Custom Baudrate HOT 1
- Unplug serial device cause system shutdown on windows HOT 5
- Fast receive missing beginning of packet HOT 3
- Tracking issue for WebSerial support. HOT 1
- Can Add Mark and Space to Parity? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serialport-rs.