diff --git a/Cargo.toml b/Cargo.toml index 016fec7..a7a5d5a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mcp2003a" -version = "0.0.10" +version = "0.0.11" description = "Rust no_std LIN Bus communication using the MCP2003A LIN transceiver." edition = "2021" license = "MIT" diff --git a/examples/mcp2003a-esp-rs/src/main.rs b/examples/mcp2003a-esp-rs/src/main.rs index 02b512e..49991c0 100644 --- a/examples/mcp2003a-esp-rs/src/main.rs +++ b/examples/mcp2003a-esp-rs/src/main.rs @@ -81,7 +81,8 @@ fn main() { // Read the feedback / diagnostic frame 0x01 from the LIN bus: // - LIN Id: 0x01 --> PID: 0xC1 - // - Data: We provide an 8-byte buffer to store the data + // - Data: We provide an 11-byte buffer which includes + // [sync, id, ...up to 8 bytes of data..., checksum] let mut data = [0u8; 11]; match mcp2003a.read_frame(0xC1, &mut data) { Ok(len) => { diff --git a/src/lib.rs b/src/lib.rs index e2d69d5..0232d4b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -30,13 +30,13 @@ //! - [MCP2003A Datasheet](https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/20002230G.pdf) //! //! # Usage -//! ```rust +//! ```no_run //! let mut mcp2003a = Mcp2003a::new(uart2_driver, break_pin_driver, delay, lin_bus_config); //! ``` //! //! Then you can use the `mcp2003a` instance to send and receive LIN frames. //! -//! ```rust +//! ```no_run //! mcp2003a.send_wakeup(); //! //! mc2003a.send_frame(0x01, &[0x02, 0x03], 0x05).unwrap();