From 1e14fcace883f203ca592af4d16dc06f19ba0983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trist=C3=A1n=20Guerra=20G=C3=B3m=CE=A3z?= Date: Fri, 23 Feb 2024 09:13:56 -0500 Subject: [PATCH 1/2] Upgraded the embedded-hal crate to embedded-can --- Cargo.toml | 4 +--- src/embedded_hal.rs | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 04c8030..ab391df 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,10 +24,8 @@ maintenance = { status = "actively-developed" } bitflags = "1.2.1" vcell = "0.1.2" nb = "1.0.0" +embedded-can = "0.4.1" -[dependencies.embedded-hal-02] -version = "0.2.7" -package = "embedded-hal" [dependencies.defmt] optional = true diff --git a/src/embedded_hal.rs b/src/embedded_hal.rs index bc31a3c..70e84c3 100644 --- a/src/embedded_hal.rs +++ b/src/embedded_hal.rs @@ -2,9 +2,9 @@ use crate::{Can, Data, ExtendedId, Frame, Id, Instance, OverrunError, StandardId}; -use embedded_hal_02::can; +use embedded_can as can; -impl can::Can for Can +impl can::nb::Can for Can where I: Instance, { From 59f85dbbc40df93f65fe883e6afa849d6adc4743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trist=C3=A1n=20Guerra=20G=C3=B3m=CE=A3z?= Date: Fri, 23 Feb 2024 09:20:46 -0500 Subject: [PATCH 2/2] removed TryInto --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 3cfc09c..24fa402 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -53,7 +53,7 @@ pub use crate::pac::can::RegisterBlock; use crate::filter::MasterFilters; use core::cmp::{Ord, Ordering}; -use core::convert::{Infallible, TryInto}; +use core::convert::Infallible; use core::marker::PhantomData; use core::mem; use core::ptr::NonNull;