Update doc projects deps, don't use patch.crates-io

This commit is contained in:
Dario Nieuwenhuis 2025-01-15 02:09:24 +01:00
parent 4d9b2798fa
commit 2fab8d0b9b
9 changed files with 36 additions and 48 deletions

View File

@ -7,10 +7,6 @@ members = [
"blinky-async", "blinky-async",
] ]
[patch.crates-io]
embassy-executor = { path = "../../../embassy-executor" }
embassy-stm32 = { path = "../../../embassy-stm32" }
[profile.release] [profile.release]
codegen-units = 1 codegen-units = 1
debug = 2 debug = 2

View File

@ -7,9 +7,9 @@ license = "MIT OR Apache-2.0"
[dependencies] [dependencies]
cortex-m = "0.7" cortex-m = "0.7"
cortex-m-rt = "0.7" cortex-m-rt = "0.7"
embassy-stm32 = { version = "0.2.0", features = ["stm32l475vg", "memory-x", "exti"] } embassy-stm32 = { version = "0.2.0", path = "../../../../embassy-stm32", features = ["stm32l475vg", "memory-x", "exti"] }
embassy-executor = { version = "0.6.3", features = ["arch-cortex-m", "executor-thread"] } embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread"] }
defmt = "0.3.0" defmt = "0.3"
defmt-rtt = "0.3.0" defmt-rtt = "0.4"
panic-probe = { version = "0.3.0", features = ["print-defmt"] } panic-probe = { version = "0.3.0", features = ["print-defmt"] }

View File

@ -7,8 +7,8 @@ license = "MIT OR Apache-2.0"
[dependencies] [dependencies]
cortex-m = "0.7" cortex-m = "0.7"
cortex-m-rt = "0.7" cortex-m-rt = "0.7"
embassy-stm32 = { version = "0.2.0", features = ["stm32l475vg", "memory-x"] } embassy-stm32 = { version = "0.2.0", path = "../../../../embassy-stm32", features = ["stm32l475vg", "memory-x"] }
defmt = "0.3.0" defmt = "0.3"
defmt-rtt = "0.3.0" defmt-rtt = "0.4"
panic-probe = { version = "0.3.0", features = ["print-defmt"] } panic-probe = { version = "0.3.0", features = ["print-defmt"] }

View File

@ -7,8 +7,8 @@ license = "MIT OR Apache-2.0"
[dependencies] [dependencies]
cortex-m = "0.7" cortex-m = "0.7"
cortex-m-rt = { version = "0.7" } cortex-m-rt = { version = "0.7" }
embassy-stm32 = { version = "0.2.0", features = ["stm32l475vg", "memory-x", "unstable-pac"] } embassy-stm32 = { version = "0.2.0", path = "../../../../embassy-stm32", features = ["stm32l475vg", "memory-x", "unstable-pac"] }
defmt = "0.3.0" defmt = "0.3"
defmt-rtt = "0.3.0" defmt-rtt = "0.4"
panic-probe = { version = "0.3.0", features = ["print-defmt"] } panic-probe = { version = "0.3.0", features = ["print-defmt"] }

View File

@ -7,8 +7,8 @@ license = "MIT OR Apache-2.0"
[dependencies] [dependencies]
cortex-m = "0.7" cortex-m = "0.7"
cortex-m-rt = "0.7" cortex-m-rt = "0.7"
stm32-metapac = { version = "1", features = ["stm32l475vg", "memory-x"] } stm32-metapac = { version = "16", features = ["stm32l475vg"] }
defmt = "0.3.0" defmt = "0.3"
defmt-rtt = "0.3.0" defmt-rtt = "0.4"
panic-probe = { version = "0.3.0", features = ["print-defmt"] } panic-probe = { version = "0.3.0", features = ["print-defmt"] }

View File

@ -8,46 +8,38 @@ use {defmt_rtt as _, panic_probe as _, stm32_metapac as pac};
fn main() -> ! { fn main() -> ! {
// Enable GPIO clock // Enable GPIO clock
let rcc = pac::RCC; let rcc = pac::RCC;
unsafe { rcc.ahb2enr().modify(|w| {
rcc.ahb2enr().modify(|w| { w.set_gpioben(true);
w.set_gpioben(true); w.set_gpiocen(true);
w.set_gpiocen(true); });
});
rcc.ahb2rstr().modify(|w| { rcc.ahb2rstr().modify(|w| {
w.set_gpiobrst(true); w.set_gpiobrst(true);
w.set_gpiocrst(true); w.set_gpiocrst(true);
w.set_gpiobrst(false); w.set_gpiobrst(false);
w.set_gpiocrst(false); w.set_gpiocrst(false);
}); });
}
// Setup button // Setup button
let gpioc = pac::GPIOC; let gpioc = pac::GPIOC;
const BUTTON_PIN: usize = 13; const BUTTON_PIN: usize = 13;
unsafe { gpioc.pupdr().modify(|w| w.set_pupdr(BUTTON_PIN, vals::Pupdr::PULL_UP));
gpioc.pupdr().modify(|w| w.set_pupdr(BUTTON_PIN, vals::Pupdr::PULLUP)); gpioc.otyper().modify(|w| w.set_ot(BUTTON_PIN, vals::Ot::PUSH_PULL));
gpioc.otyper().modify(|w| w.set_ot(BUTTON_PIN, vals::Ot::PUSHPULL)); gpioc.moder().modify(|w| w.set_moder(BUTTON_PIN, vals::Moder::INPUT));
gpioc.moder().modify(|w| w.set_moder(BUTTON_PIN, vals::Moder::INPUT));
}
// Setup LED // Setup LED
let gpiob = pac::GPIOB; let gpiob = pac::GPIOB;
const LED_PIN: usize = 14; const LED_PIN: usize = 14;
unsafe { gpiob.pupdr().modify(|w| w.set_pupdr(LED_PIN, vals::Pupdr::FLOATING));
gpiob.pupdr().modify(|w| w.set_pupdr(LED_PIN, vals::Pupdr::FLOATING)); gpiob.otyper().modify(|w| w.set_ot(LED_PIN, vals::Ot::PUSH_PULL));
gpiob.otyper().modify(|w| w.set_ot(LED_PIN, vals::Ot::PUSHPULL)); gpiob.moder().modify(|w| w.set_moder(LED_PIN, vals::Moder::OUTPUT));
gpiob.moder().modify(|w| w.set_moder(LED_PIN, vals::Moder::OUTPUT));
}
// Main loop // Main loop
loop { loop {
unsafe { if gpioc.idr().read().idr(BUTTON_PIN) == vals::Idr::LOW {
if gpioc.idr().read().idr(BUTTON_PIN) == vals::Idr::LOW { gpiob.bsrr().write(|w| w.set_bs(LED_PIN, true));
gpiob.bsrr().write(|w| w.set_bs(LED_PIN, true)); } else {
} else { gpiob.bsrr().write(|w| w.set_br(LED_PIN, true));
gpiob.bsrr().write(|w| w.set_br(LED_PIN, true));
}
} }
} }
} }

View File

@ -7,4 +7,4 @@ edition = "2021"
embassy-net = { version = "0.6.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4"] } embassy-net = { version = "0.6.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4"] }
embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", ] } embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", ] }
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
defmt = "0.3.0" defmt = "0.3"

View File

@ -19,7 +19,7 @@ cyw43 = { path = "../../cyw43", features = ["defmt", "firmware-logs"] }
cyw43-pio = { path = "../../cyw43-pio", features = ["defmt"] } cyw43-pio = { path = "../../cyw43-pio", features = ["defmt"] }
perf-client = { path = "../perf-client" } perf-client = { path = "../perf-client" }
defmt = "0.3.0" defmt = "0.3"
defmt-rtt = "0.4" defmt-rtt = "0.4"
cortex-m = { version = "0.7.6" } cortex-m = { version = "0.7.6" }

View File

@ -68,7 +68,7 @@ embassy-stm32-wpan = { version = "0.1.0", path = "../../embassy-stm32-wpan", opt
embassy-net = { version = "0.6.0", path = "../../embassy-net", features = ["defmt", "tcp", "udp", "dhcpv4", "medium-ethernet"] } embassy-net = { version = "0.6.0", path = "../../embassy-net", features = ["defmt", "tcp", "udp", "dhcpv4", "medium-ethernet"] }
perf-client = { path = "../perf-client" } perf-client = { path = "../perf-client" }
defmt = "0.3.0" defmt = "0.3"
defmt-rtt = "0.4" defmt-rtt = "0.4"
cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }