Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bryal/se-rs-ial
Cross platform lib for serial communication in Rust
https://github.com/bryal/se-rs-ial
Last synced: about 5 hours ago
JSON representation
Cross platform lib for serial communication in Rust
- Host: GitHub
- URL: https://github.com/bryal/se-rs-ial
- Owner: bryal
- License: mit
- Created: 2015-04-08T11:23:33.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-05-03T11:09:38.000Z (over 9 years ago)
- Last Synced: 2024-10-31T11:47:46.667Z (8 days ago)
- Language: Rust
- Size: 1.33 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# se-rs-ial
Cross-platform serial communications library in Rust.
# Usage Example
use se_rs_ial::{ Connection, BaudRate };
#[cfg(windows)]
const PORT: &'static str = "COM1";
#[cfg(unix)]
const PORT: &'static str = "/dev/ttyUSB0";let mut conn = Connection::open(PORT, BaudRate::B9600).unwrap();
conn.write("Hello World!\n".as_bytes()).unwrap();
# Documentation
There are minor variances between the builds for the different platforms.
[Documentation for Windows](https://bryal.github.io/se-rs-ial/windows/se_rs_ial/)
[Documentation for Unix-like](https://bryal.github.io/se-rs-ial/unix/se_rs_ial/)
# Building
se-rs-ial depends on serial-win, which makes use of unstable features. As such, Rust Nightly is needed to build the software.
# Examples
Check out the [examples](https://github.com/bryal/se-rs-ial/tree/master/examples) directory.
Examples can be run with `cargo run --example -- `,
where `port` is the serial port, e.g. `COM3` or `/dev/ttyUSB0`. On some systems, `sudo` be required for sufficient permissions.E.g. `sudo cargo run --example color_swirl -- /dev/ttyS1`