From 4e47c045fcd3873d68bdc90be6b462c0540b75cf Mon Sep 17 00:00:00 2001 From: Harry Brooke Date: Wed, 30 Oct 2024 09:43:26 +0000 Subject: [PATCH] add memory-x feature to ch32-hal --- Cargo.toml | 3 ++- examples/ch32l103/Cargo.toml | 3 ++- examples/ch32v003/Cargo.toml | 1 + examples/ch32v103/Cargo.toml | 1 + examples/ch32v203/Cargo.toml | 1 + examples/ch32v208/Cargo.toml | 1 + examples/ch32v305/Cargo.toml | 7 ++++++- examples/ch32v307/Cargo.toml | 1 + examples/ch32x035/Cargo.toml | 7 ++++++- examples/ch641/Cargo.toml | 1 + 10 files changed, 22 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index da70a1f..bfd7574 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,6 @@ license = "MIT OR Apache-2.0" [dependencies] ch32-metapac = { features = [ - "memory-x", "rt", ], git = "https://github.com/ch32-rs/ch32-metapac", rev = "43066e18cf51106dff448f679dfff368a41431d7" } @@ -65,6 +64,8 @@ embassy = [ "dep:embassy-time", ] defmt = ["dep:defmt"] +memory-x = ["ch32-metapac/memory-x"] + # Features starting with `_` are for internal use only. They're not intended # to be enabled by other crates, and are not covered by semver guarantees. diff --git a/examples/ch32l103/Cargo.toml b/examples/ch32l103/Cargo.toml index 4df28aa..544b700 100644 --- a/examples/ch32l103/Cargo.toml +++ b/examples/ch32l103/Cargo.toml @@ -6,9 +6,10 @@ edition = "2021" [dependencies] ch32-hal = { path = "../../", features = [ "ch32l103c8t6", + "memory-x", "embassy", "rt", - "time-driver-tim2" + "time-driver-tim2", ], default-features = false } embassy-executor = { version = "0.6.0", features = [ "integrated-timers", diff --git a/examples/ch32v003/Cargo.toml b/examples/ch32v003/Cargo.toml index 5931ba2..30923bf 100644 --- a/examples/ch32v003/Cargo.toml +++ b/examples/ch32v003/Cargo.toml @@ -6,6 +6,7 @@ edition = "2021" [dependencies] ch32-hal = { path = "../../", features = [ "ch32v003f4u6", + "memory-x", "embassy", "time-driver-tim2", "rt", diff --git a/examples/ch32v103/Cargo.toml b/examples/ch32v103/Cargo.toml index 157a5c9..9034bf0 100644 --- a/examples/ch32v103/Cargo.toml +++ b/examples/ch32v103/Cargo.toml @@ -6,6 +6,7 @@ edition = "2021" [dependencies] ch32-hal = { path = "../../", features = [ "ch32v103r8t6", + "memory-x", "rt", "time-driver-tim2", ] } diff --git a/examples/ch32v203/Cargo.toml b/examples/ch32v203/Cargo.toml index 402d4e1..3b82733 100644 --- a/examples/ch32v203/Cargo.toml +++ b/examples/ch32v203/Cargo.toml @@ -6,6 +6,7 @@ edition = "2021" [dependencies] ch32-hal = { path = "../../", features = [ "ch32v203g6u6", + "memory-x", "embassy", "rt", "time-driver-tim2", diff --git a/examples/ch32v208/Cargo.toml b/examples/ch32v208/Cargo.toml index 5d00cc2..8ffcb92 100644 --- a/examples/ch32v208/Cargo.toml +++ b/examples/ch32v208/Cargo.toml @@ -6,6 +6,7 @@ edition = "2021" [dependencies] ch32-hal = { path = "../../", features = [ "ch32v208wbu6", + "memory-x", "embassy", "rt", ], default-features = false } diff --git a/examples/ch32v305/Cargo.toml b/examples/ch32v305/Cargo.toml index 22b93dc..5fd308b 100644 --- a/examples/ch32v305/Cargo.toml +++ b/examples/ch32v305/Cargo.toml @@ -4,7 +4,12 @@ version = "0.1.0" edition = "2021" [dependencies] -ch32-hal = { path = "../../", features = ["ch32v305fbp6", "embassy", "rt"] } +ch32-hal = { path = "../../", features = [ + "ch32v305fbp6", + "memory-x", + "embassy", + "rt", +] } embassy-executor = { version = "0.6.0", features = [ "integrated-timers", "arch-riscv32", diff --git a/examples/ch32v307/Cargo.toml b/examples/ch32v307/Cargo.toml index f92fddc..c470ec1 100644 --- a/examples/ch32v307/Cargo.toml +++ b/examples/ch32v307/Cargo.toml @@ -6,6 +6,7 @@ edition = "2021" [dependencies] ch32-hal = { path = "../../", features = [ "ch32v307vct6", + "memory-x", "embassy", "rt", "highcode", diff --git a/examples/ch32x035/Cargo.toml b/examples/ch32x035/Cargo.toml index 3e7aa7b..cf22bb3 100644 --- a/examples/ch32x035/Cargo.toml +++ b/examples/ch32x035/Cargo.toml @@ -4,7 +4,12 @@ version = "0.1.0" edition = "2021" [dependencies] -ch32-hal = { path = "../../", features = ["ch32x035f7p6", "embassy", "rt"] } +ch32-hal = { path = "../../", features = [ + "ch32x035f7p6", + "memory-x", + "embassy", + "rt", +] } embassy-executor = { version = "0.6.0", features = [ "integrated-timers", "arch-riscv32", diff --git a/examples/ch641/Cargo.toml b/examples/ch641/Cargo.toml index 30da14e..0fc8cd7 100644 --- a/examples/ch641/Cargo.toml +++ b/examples/ch641/Cargo.toml @@ -6,6 +6,7 @@ edition = "2021" [dependencies] ch32-hal = { path = "../../", features = [ "ch641", + "memory-x", "embassy", "time-driver-tim2", "rt",