Skip to content

Commit

Permalink
chore: minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
andelf committed Jul 1, 2024
1 parent 7ee2920 commit 38f05cc
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
5 changes: 1 addition & 4 deletions examples/hpm6e00evk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ edition = "2021"
resolver = "2"

[dependencies]
hpm-hal = { path = "../../", features = ["hpm6e80"] }
hpm-hal = { path = "../../", features = ["hpm6e80", "rt", "embassy"] }

# TODO
# hpm-hal = { path = "../../", features = ["hpm6e80"]}
panic-halt = "0.2.0"
riscv-rt = { version = "0.12.2", features = ["single-hart"] }

defmt = "0.3.8"
defmt-rtt = "0.4.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/hpm6e00evk/src/bin/blinky.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use embedded_hal::delay::DelayNs;
use hpm_hal::gpio::{Level, Output};
use riscv::delay::McycleDelay;
use {defmt_rtt as _, hpm_hal as hal, panic_halt as _, riscv_rt as _};
use {defmt_rtt as _, hpm_hal as hal, panic_halt as _};

#[hal::entry]
fn main() -> ! {
Expand Down
2 changes: 1 addition & 1 deletion examples/hpm6e00evk/src/bin/embassy_blinky.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use embassy_executor::Spawner;
use embassy_time::Timer;
use hal::gpio::Pin as _;
use hpm_hal::gpio::{AnyPin, Level, Output};
use {defmt_rtt as _, hpm_hal as hal, riscv_rt as _};
use {defmt_rtt as _, hpm_hal as hal};

#[embassy_executor::task(pool_size = 3)]
async fn blink(pin: AnyPin, interval_ms: u32) {
Expand Down
2 changes: 1 addition & 1 deletion examples/hpm6e00evk/src/bin/embassy_femc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use embedded_io::Write as _;
use hal::gpio::{AnyPin, Level, Output, Pin as _};
use hal::mode::Blocking;
use hal::pac;
use {defmt_rtt as _, hpm_hal as hal, riscv_rt as _};
use {defmt_rtt as _, hpm_hal as hal};

const BANNER: &str = include_str!("./BANNER");

Expand Down
4 changes: 2 additions & 2 deletions examples/hpm6e00evk/src/bin/raw_blinky.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ use embedded_hal::delay::DelayNs;
use hal::pac;
use pac::gpiom::vals;
use riscv::delay::McycleDelay;
use {defmt_rtt as _, hpm_hal as hal, panic_halt as _, riscv_rt as _};
use {defmt_rtt as _, hpm_hal as hal, panic_halt as _};

#[riscv_rt::entry]
#[hal::entry]
fn main() -> ! {
// default clock
let mut delay = McycleDelay::new(600_000_000);
Expand Down

0 comments on commit 38f05cc

Please sign in to comment.