Split some files and add more documentation

This commit is contained in:
Robert Sammelson 2023-05-15 20:10:01 -04:00
parent 877722ed1b
commit cd0242b796
No known key found for this signature in database
GPG key ID: 92F1F04EDB06B9E9
8 changed files with 216 additions and 154 deletions

View file

@ -1,10 +1,28 @@
//! Crate for communicating with OBD-II (on-board diagnostics) interfaces on cars
//!
//! # Usage
//! ```
//! use obd2::{commands::Obd2DataRetrieval, device::Elm327, Obd2};
//!
//! fn main() -> Result<(), obd2::Error> {
//! let mut device = Obd2::<Elm327>::default();
//! println!("VIN: {}", device.get_vin()?);
//! Ok(())
//! }
//! ```
#![forbid(unsafe_code)]
pub mod commands;
pub mod device;
mod error;
pub use error::Error;
use error::Result;
mod interface;
pub use interface::Obd2;
mod obd2_device;
use obd2_device::Result;
pub use obd2_device::{Error, Obd2Device};
pub use obd2_device::Obd2Device;