diff --git a/src/lib.rs b/src/lib.rs index 5e33d70..76d1a3c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -58,7 +58,7 @@ //! //! // Create message frame //!let can_id = Id::Standard(StandardId::new(0x55).unwrap()); -//!let message_type = Can20 {}; +//!let message_type = Can20::<8> {}; //!let payload = [1, 2, 3, 4, 5, 6, 7, 8]; //!let pl_bytes = Bytes::copy_from_slice(&payload); //!let can_message = TxMessage::new(message_type, pl_bytes, can_id).unwrap(); diff --git a/src/message.rs b/src/message.rs index 43b4d02..b6d7bba 100644 --- a/src/message.rs +++ b/src/message.rs @@ -11,8 +11,8 @@ //! //! // Frame ID //! let message_id = Id::Standard(StandardId::new(0x123).unwrap()); -//! // Set message type to CAN2.0 -//! let message_type = Can20{}; +//! // Set message type to CAN2.0 with 8 data bytes +//! let message_type = Can20::<8>{}; //! // Create payload buffer //! let payload = [1,2,3,4,5,6,7,8]; //! // Create Bytes object