Skip to content

Commit

Permalink
Update doc projects deps, don't use patch.crates-io
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirbaio committed Jan 15, 2025
1 parent 4d9b279 commit 2fab8d0
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 48 deletions.
4 changes: 0 additions & 4 deletions docs/examples/layer-by-layer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ members = [
"blinky-async",
]

[patch.crates-io]
embassy-executor = { path = "../../../embassy-executor" }
embassy-stm32 = { path = "../../../embassy-stm32" }

[profile.release]
codegen-units = 1
debug = 2
Expand Down
8 changes: 4 additions & 4 deletions docs/examples/layer-by-layer/blinky-async/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ license = "MIT OR Apache-2.0"
[dependencies]
cortex-m = "0.7"
cortex-m-rt = "0.7"
embassy-stm32 = { version = "0.2.0", features = ["stm32l475vg", "memory-x", "exti"] }
embassy-executor = { version = "0.6.3", features = ["arch-cortex-m", "executor-thread"] }
embassy-stm32 = { version = "0.2.0", path = "../../../../embassy-stm32", features = ["stm32l475vg", "memory-x", "exti"] }
embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread"] }

defmt = "0.3.0"
defmt-rtt = "0.3.0"
defmt = "0.3"
defmt-rtt = "0.4"
panic-probe = { version = "0.3.0", features = ["print-defmt"] }
6 changes: 3 additions & 3 deletions docs/examples/layer-by-layer/blinky-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ license = "MIT OR Apache-2.0"
[dependencies]
cortex-m = "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-rtt = "0.3.0"
defmt = "0.3"
defmt-rtt = "0.4"
panic-probe = { version = "0.3.0", features = ["print-defmt"] }
6 changes: 3 additions & 3 deletions docs/examples/layer-by-layer/blinky-irq/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ license = "MIT OR Apache-2.0"
[dependencies]
cortex-m = "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-rtt = "0.3.0"
defmt = "0.3"
defmt-rtt = "0.4"
panic-probe = { version = "0.3.0", features = ["print-defmt"] }
6 changes: 3 additions & 3 deletions docs/examples/layer-by-layer/blinky-pac/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ license = "MIT OR Apache-2.0"
[dependencies]
cortex-m = "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-rtt = "0.3.0"
defmt = "0.3"
defmt-rtt = "0.4"
panic-probe = { version = "0.3.0", features = ["print-defmt"] }
48 changes: 20 additions & 28 deletions docs/examples/layer-by-layer/blinky-pac/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,38 @@ use {defmt_rtt as _, panic_probe as _, stm32_metapac as pac};
fn main() -> ! {
// Enable GPIO clock
let rcc = pac::RCC;
unsafe {
rcc.ahb2enr().modify(|w| {
w.set_gpioben(true);
w.set_gpiocen(true);
});
rcc.ahb2enr().modify(|w| {
w.set_gpioben(true);
w.set_gpiocen(true);
});

rcc.ahb2rstr().modify(|w| {
w.set_gpiobrst(true);
w.set_gpiocrst(true);
w.set_gpiobrst(false);
w.set_gpiocrst(false);
});
}
rcc.ahb2rstr().modify(|w| {
w.set_gpiobrst(true);
w.set_gpiocrst(true);
w.set_gpiobrst(false);
w.set_gpiocrst(false);
});

// Setup button
let gpioc = pac::GPIOC;
const BUTTON_PIN: usize = 13;
unsafe {
gpioc.pupdr().modify(|w| w.set_pupdr(BUTTON_PIN, vals::Pupdr::PULLUP));
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.pupdr().modify(|w| w.set_pupdr(BUTTON_PIN, vals::Pupdr::PULL_UP));
gpioc.otyper().modify(|w| w.set_ot(BUTTON_PIN, vals::Ot::PUSH_PULL));
gpioc.moder().modify(|w| w.set_moder(BUTTON_PIN, vals::Moder::INPUT));

// Setup LED
let gpiob = pac::GPIOB;
const LED_PIN: usize = 14;
unsafe {
gpiob.pupdr().modify(|w| w.set_pupdr(LED_PIN, vals::Pupdr::FLOATING));
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.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.moder().modify(|w| w.set_moder(LED_PIN, vals::Moder::OUTPUT));

// Main loop
loop {
unsafe {
if gpioc.idr().read().idr(BUTTON_PIN) == vals::Idr::LOW {
gpiob.bsrr().write(|w| w.set_bs(LED_PIN, true));
} else {
gpiob.bsrr().write(|w| w.set_br(LED_PIN, true));
}
if gpioc.idr().read().idr(BUTTON_PIN) == vals::Idr::LOW {
gpiob.bsrr().write(|w| w.set_bs(LED_PIN, true));
} else {
gpiob.bsrr().write(|w| w.set_br(LED_PIN, true));
}
}
}
2 changes: 1 addition & 1 deletion tests/perf-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ edition = "2021"
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-futures = { version = "0.1.0", path = "../../embassy-futures" }
defmt = "0.3.0"
defmt = "0.3"
2 changes: 1 addition & 1 deletion tests/rp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ cyw43 = { path = "../../cyw43", features = ["defmt", "firmware-logs"] }
cyw43-pio = { path = "../../cyw43-pio", features = ["defmt"] }
perf-client = { path = "../perf-client" }

defmt = "0.3.0"
defmt = "0.3"
defmt-rtt = "0.4"

cortex-m = { version = "0.7.6" }
Expand Down
2 changes: 1 addition & 1 deletion tests/stm32/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
perf-client = { path = "../perf-client" }

defmt = "0.3.0"
defmt = "0.3"
defmt-rtt = "0.4"

cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
Expand Down

0 comments on commit 2fab8d0

Please sign in to comment.