1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//! # FdCanUSB
//! An implementation of the [FdCanUSB](https://mjbots.com/products/fdcanusb) (by [MJBots](https://mjbots.com/)) protocol.
//!
//! This initial release is open for feedback and may change implementation details.
//! ### Example
//! ```
//! use fdcanusb::{FdCanUSB, serial2};
//! # fn main() -> Result<(), std::io::Error> {
//! let transport = serial2::SerialPort::open("/dev/fdcanusb", serial2::KeepSettings)?;
//! let mut fdcanusb = FdCanUSB::new(transport);
//! # Ok(())
//! # }
//! ```
//!
//! ### Features
//!
//! - `default = ["serial2"]`
//! - `serial2`
//!     - Enables re-exporting of the [`serial2`] crate and the [`FdCanUSB::open`] fn.

mod bus;
mod frames;

pub use bus::FdCanUSB;
pub use frames::{CanFdFrame, FdCanUSBFrame};

#[cfg(feature = "serial2")]
pub use serial2;