From d53af53d0d4e6a5bcccd3af9369a837f076aa910 Mon Sep 17 00:00:00 2001 From: Jeff McBride Date: Wed, 18 Feb 2026 12:11:24 -0800 Subject: [PATCH 1/5] Update embedded_io to 0.7 Add re-export of embedded_io --- Cargo.toml | 2 +- zencan-node/src/lib.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 8b18148..c40091a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,7 +33,7 @@ crc16 = "0.4.0" critical-section = { version = "1.2.0", default-features = false } defmt = "1.0.1" defmt-or-log = { version = "0.2.1", default-features = false } -embedded-io = { version = "0.6.1" } +embedded-io = { version = "0.7.1" } futures = { version = "0.3.31", default-features = false, features = [ "async-await", ] } diff --git a/zencan-node/src/lib.rs b/zencan-node/src/lib.rs index dffe3fc..77abd8d 100644 --- a/zencan-node/src/lib.rs +++ b/zencan-node/src/lib.rs @@ -213,6 +213,7 @@ pub use zencan_macro::build_object_dict; // Re-export types used by generated code pub use critical_section; pub use zencan_common as common; +pub use embedded_io; pub use bootloader::{BootloaderInfo, BootloaderSection, BootloaderSectionCallbacks}; #[cfg(feature = "socketcan")] From a0f1076bf17a6fdba10016a7f1bfc6b6479f8b03 Mon Sep 17 00:00:00 2001 From: Jeff McBride Date: Wed, 18 Feb 2026 12:11:55 -0800 Subject: [PATCH 2/5] Add deny_unknown_fields to device config serde structs --- zencan-common/src/device_config.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zencan-common/src/device_config.rs b/zencan-common/src/device_config.rs index 46f8bee..bf4fccf 100644 --- a/zencan-common/src/device_config.rs +++ b/zencan-common/src/device_config.rs @@ -549,6 +549,7 @@ pub enum AutoStartConfig { /// Represents the configuration parameters for a single PDO #[derive(Clone, Debug, Deserialize, PartialEq)] +#[serde(deny_unknown_fields)] pub struct PdoDefaultConfig { /// The COB ID this PDO will use to send/receive pub cob_id: u32, @@ -586,6 +587,7 @@ impl From for HashMap { /// Private struct for deserializing [pdos] section of device config TOML #[derive(Debug, Deserialize)] +#[serde(deny_unknown_fields)] struct DevicePdoConfigSerializer { #[serde(default = "default_num_rpdo")] /// The number of TX PDO slots available in the device. Defaults to 4. @@ -658,6 +660,7 @@ pub struct IdentityConfig { /// Configuration object to define a programmable bootloader section #[derive(Clone, Debug, Deserialize)] +#[serde(deny_unknown_fields)] pub struct BootloaderSection { /// Name of the section pub name: String, @@ -667,6 +670,7 @@ pub struct BootloaderSection { /// Configuration of bootloader parameters #[derive(Clone, Deserialize, Debug, Default)] +#[serde(deny_unknown_fields)] pub struct BootloaderConfig { /// If true, this node is an application which supports resetting to a bootloader, rather than a /// bootloader implementation @@ -866,6 +870,7 @@ pub struct DomainDefinition {} /// Descriptor for an object in the object dictionary #[derive(Deserialize, Debug, Clone)] +#[serde(deny_unknown_fields)] pub struct ObjectDefinition { /// The index of the object pub index: u16, From aa6a93992d7b475c3b808894a07e20613d92bf45 Mon Sep 17 00:00:00 2001 From: Jeff McBride Date: Wed, 18 Feb 2026 17:22:45 -0800 Subject: [PATCH 3/5] Remove deny_unknown_fields from ObjectDefinition It's not compatible with flatten. --- zencan-common/src/device_config.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/zencan-common/src/device_config.rs b/zencan-common/src/device_config.rs index bf4fccf..0f18529 100644 --- a/zencan-common/src/device_config.rs +++ b/zencan-common/src/device_config.rs @@ -870,7 +870,6 @@ pub struct DomainDefinition {} /// Descriptor for an object in the object dictionary #[derive(Deserialize, Debug, Clone)] -#[serde(deny_unknown_fields)] pub struct ObjectDefinition { /// The index of the object pub index: u16, From 559418d26ceef8a7513d509bbd6a21b0d8d493df Mon Sep 17 00:00:00 2001 From: Jeff McBride Date: Wed, 18 Feb 2026 18:01:40 -0800 Subject: [PATCH 4/5] cargo fmt --- zencan-node/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zencan-node/src/lib.rs b/zencan-node/src/lib.rs index 77abd8d..ac690c9 100644 --- a/zencan-node/src/lib.rs +++ b/zencan-node/src/lib.rs @@ -212,8 +212,8 @@ pub use zencan_macro::build_object_dict; // Re-export types used by generated code pub use critical_section; -pub use zencan_common as common; pub use embedded_io; +pub use zencan_common as common; pub use bootloader::{BootloaderInfo, BootloaderSection, BootloaderSectionCallbacks}; #[cfg(feature = "socketcan")] From f2ea73b5132828d33b0bc7374ed4ee719dacccc2 Mon Sep 17 00:00:00 2001 From: Jeff McBride Date: Wed, 18 Feb 2026 18:07:56 -0800 Subject: [PATCH 5/5] Update to io 0.7 in example --- examples/stm32g0-lilos-node/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/stm32g0-lilos-node/Cargo.toml b/examples/stm32g0-lilos-node/Cargo.toml index e25387a..d75e976 100644 --- a/examples/stm32g0-lilos-node/Cargo.toml +++ b/examples/stm32g0-lilos-node/Cargo.toml @@ -15,7 +15,7 @@ cortex-m = { version = "0.7.4", features=["critical-section-single-core"] } cortex-m-rt = "0.7.5" critical-section = "1.2.0" defmt = "1.0.1" -embedded-io = "0.6.1" +embedded-io = "0.7.1" fdcan = { version = "0.2.1", features = ["fdcan_g0_g4_l5"] } stm32-metapac = { version = "15.0.0", features = ["stm32g0b1cb", "rt"] } hash32 = "1.0.0"