Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update embassy-stm32 requirement from 0.1.0 to 0.2.0 in /tests/stm32f072 #70

Merged
merged 7 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/continuous_integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ jobs:
run: |
apt-get install --yes clang curl git libudev-dev libssl-dev pkg-config python3-pip
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.sh | sh
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/probe-rs/probe-rs/releases/download/v0.25.0/probe-rs-tools-installer.sh | sh
source "$HOME"/.cargo/env
rustup toolchain install nightly --component rust-src
cargo install espflash ldproxy
cargo install espflash@3.2.0 ldproxy@0.3.4
- name: ESP32C3 Tests
run: |
echo "Running ESP32C3 Tests"
Expand All @@ -71,7 +71,7 @@ jobs:
run: |
apt-get install --yes clang curl git libudev-dev libssl-dev pkg-config python3-pip
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.sh | sh
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/probe-rs/probe-rs/releases/download/v0.25.0/probe-rs-tools-installer.sh | sh
source "$HOME"/.cargo/env
rustup toolchain install nightly --component rust-src
rustup target add thumbv6m-none-eabi
Expand All @@ -92,7 +92,7 @@ jobs:
run: |
apt-get install --yes clang curl git libudev-dev libssl-dev pkg-config python3-pip
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.sh | sh
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/probe-rs/probe-rs/releases/download/v0.25.0/probe-rs-tools-installer.sh | sh
source "$HOME"/.cargo/env
rustup toolchain install nightly --component rust-src
rustup target add thumbv6m-none-eabi
Expand Down
8 changes: 4 additions & 4 deletions tests/stm32f072/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ version = "0.1.0"
edition = "2021"

[dependencies]
embassy-stm32 = { version = "0.1.0", features = [ "defmt", "memory-x", "stm32f072rb", "time-driver-tim2", "exti", "unstable-pac"] }
embassy-stm32 = { version = "0.2.0", features = [ "defmt", "memory-x", "stm32f072rb"] }

cortex-m ={version ="0.7", features = ["critical-section-single-core"]}
cortex-m-rt = "0.7"
cortex-m ={version ="0.7.0", features = ["critical-section-single-core"]}
cortex-m-rt = "0.7.5"
# dependencies for defmt
defmt = { version = "0.3.8"}
defmt-rtt = { version = "0.4.1"}
portable-atomic = {version = "1.7.0", features = ["critical-section"]}
portable-atomic = {version = "1.10.0", features = ["critical-section"]}

[dev-dependencies]
embedded-test = { version = "0.6.0", features =["defmt"] }
Expand Down
29 changes: 4 additions & 25 deletions tests/stm32f072/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,32 +1,11 @@
#![no_std]
/// This module is a simple setup method and type declarations that can be shared across the tests, reducing boiler plate code.
pub mod initialise {
use embassy_stm32::{
bind_interrupts,
dma::NoDma,
i2c::{self, I2c},
peripherals,
time::Hertz,
Config,
};
pub type Stm32I2c =
embassy_stm32::i2c::I2c<'static, embassy_stm32::peripherals::I2C1, NoDma, NoDma>;
use embassy_stm32::{i2c::I2c, mode::Blocking, time::Hertz};
pub type Stm32I2c = embassy_stm32::i2c::I2c<'static, Blocking>;
pub fn initialise() -> Stm32I2c {
bind_interrupts!(struct Irqs {
I2C1 => i2c::EventInterruptHandler<peripherals::I2C1>, i2c::ErrorInterruptHandler<peripherals::I2C1>;
});
let config = Config::default();
let p = embassy_stm32::init(config);
let i2c = I2c::new(
p.I2C1,
p.PB8,
p.PB9,
Irqs,
NoDma,
NoDma,
Hertz(400_000),
Default::default(),
);
let p = embassy_stm32::init(Default::default());
let i2c = I2c::new_blocking(p.I2C1, p.PB8, p.PB9, Hertz(400_000), Default::default());
i2c
}
}
Loading