stm32: fix examples

This commit is contained in:
xoviat 2021-04-06 14:05:08 -05:00
parent 47843fcba5
commit 86cc1eee98
5 changed files with 26 additions and 27 deletions

View File

@ -15,23 +15,23 @@ defmt-info = []
defmt-warn = [] defmt-warn = []
defmt-error = [] defmt-error = []
stm32f401 = ["stm32f4xx-hal/stm32f401", "embassy-stm32/stm32f401"] stm32f401 = ["embassy-stm32/stm32f401"]
stm32f405 = ["stm32f4xx-hal/stm32f405", "embassy-stm32/stm32f405"] stm32f405 = ["embassy-stm32/stm32f405"]
stm32f407 = ["stm32f4xx-hal/stm32f407", "embassy-stm32/stm32f407"] stm32f407 = ["embassy-stm32/stm32f407"]
stm32f410 = ["stm32f4xx-hal/stm32f410", "embassy-stm32/stm32f410"] stm32f410 = ["embassy-stm32/stm32f410"]
stm32f411 = ["stm32f4xx-hal/stm32f411", "embassy-stm32/stm32f411"] stm32f411 = ["embassy-stm32/stm32f411"]
stm32f412 = ["stm32f4xx-hal/stm32f412", "embassy-stm32/stm32f412"] stm32f412 = ["embassy-stm32/stm32f412"]
stm32f413 = ["stm32f4xx-hal/stm32f413", "embassy-stm32/stm32f413"] stm32f413 = ["embassy-stm32/stm32f413"]
stm32f415 = ["stm32f4xx-hal/stm32f405", "embassy-stm32/stm32f405"] stm32f415 = ["embassy-stm32/stm32f405"]
stm32f417 = ["stm32f4xx-hal/stm32f407", "embassy-stm32/stm32f407"] stm32f417 = ["embassy-stm32/stm32f407"]
stm32f423 = ["stm32f4xx-hal/stm32f413", "embassy-stm32/stm32f413"] stm32f423 = ["embassy-stm32/stm32f413"]
stm32f427 = ["stm32f4xx-hal/stm32f427", "embassy-stm32/stm32f427"] stm32f427 = ["embassy-stm32/stm32f427"]
stm32f429 = ["stm32f4xx-hal/stm32f429", "embassy-stm32/stm32f429"] stm32f429 = ["embassy-stm32/stm32f429"]
stm32f437 = ["stm32f4xx-hal/stm32f427", "embassy-stm32/stm32f427"] stm32f437 = ["embassy-stm32/stm32f427"]
stm32f439 = ["stm32f4xx-hal/stm32f429", "embassy-stm32/stm32f429"] stm32f439 = ["embassy-stm32/stm32f429"]
stm32f446 = ["stm32f4xx-hal/stm32f446", "embassy-stm32/stm32f446"] stm32f446 = ["embassy-stm32/stm32f446"]
stm32f469 = ["stm32f4xx-hal/stm32f469", "embassy-stm32/stm32f469"] stm32f469 = ["embassy-stm32/stm32f469"]
stm32f479 = ["stm32f4xx-hal/stm32f469", "embassy-stm32/stm32f469"] stm32f479 = ["embassy-stm32/stm32f469"]
[dependencies] [dependencies]
@ -47,7 +47,6 @@ cortex-m = "0.7.1"
cortex-m-rt = "0.6.13" cortex-m-rt = "0.6.13"
embedded-hal = { version = "0.2.4" } embedded-hal = { version = "0.2.4" }
panic-probe = "0.1.0" panic-probe = "0.1.0"
stm32f4xx-hal = { version = "0.8.3", features = ["rt", "usb_fs"], git = "https://github.com/stm32-rs/stm32f4xx-hal.git"}
futures = { version = "0.3.8", default-features = false, features = ["async-await"] } futures = { version = "0.3.8", default-features = false, features = ["async-await"] }
rtt-target = { version = "0.3", features = ["cortex-m"] } rtt-target = { version = "0.3", features = ["cortex-m"] }
bxcan = "0.5.0" bxcan = "0.5.0"

View File

@ -13,9 +13,9 @@ use bxcan::filter::Mask32;
use cortex_m_rt::entry; use cortex_m_rt::entry;
use embassy::executor::Executor; use embassy::executor::Executor;
use embassy::util::Forever; use embassy::util::Forever;
use embassy_stm32::hal::prelude::*;
use embassy_stm32::hal::{can::Can, stm32};
use embassy_stm32::{can, interrupt}; use embassy_stm32::{can, interrupt};
use stm32f4xx_hal::prelude::*;
use stm32f4xx_hal::{can::Can, stm32};
#[embassy::task] #[embassy::task]
async fn run(dp: stm32::Peripherals, _cp: cortex_m::Peripherals) { async fn run(dp: stm32::Peripherals, _cp: cortex_m::Peripherals) {

View File

@ -14,10 +14,10 @@ use embassy::executor::Executor;
use embassy::traits::gpio::*; use embassy::traits::gpio::*;
use embassy::util::Forever; use embassy::util::Forever;
use embassy_stm32::exti::ExtiPin; use embassy_stm32::exti::ExtiPin;
use embassy_stm32::hal::prelude::*;
use embassy_stm32::interrupt; use embassy_stm32::interrupt;
use embassy_stm32::pac as stm32;
use futures::pin_mut; use futures::pin_mut;
use stm32f4xx_hal::prelude::*;
use stm32f4xx_hal::stm32;
#[embassy::task] #[embassy::task]
async fn run(dp: stm32::Peripherals, _cp: cortex_m::Peripherals) { async fn run(dp: stm32::Peripherals, _cp: cortex_m::Peripherals) {

View File

@ -10,7 +10,7 @@ mod example_common;
use example_common::*; use example_common::*;
use cortex_m_rt::entry; use cortex_m_rt::entry;
use stm32f4xx_hal::prelude::*; use embassy_stm32::hal::prelude::*;
#[entry] #[entry]
fn main() -> ! { fn main() -> ! {

View File

@ -14,13 +14,13 @@ use cortex_m_rt::entry;
use embassy::executor::{Executor, Spawner}; use embassy::executor::{Executor, Spawner};
use embassy::traits::uart::{Read, ReadUntilIdle, Write}; use embassy::traits::uart::{Read, ReadUntilIdle, Write};
use embassy::util::Forever; use embassy::util::Forever;
use embassy_stm32::hal::dma::StreamsTuple;
use embassy_stm32::hal::prelude::*;
use embassy_stm32::hal::serial::config::Config;
use embassy_stm32::interrupt; use embassy_stm32::interrupt;
use embassy_stm32::pac as stm32;
use embassy_stm32::serial; use embassy_stm32::serial;
use futures::pin_mut; use futures::pin_mut;
use stm32f4xx_hal::dma::StreamsTuple;
use stm32f4xx_hal::prelude::*;
use stm32f4xx_hal::serial::config::Config;
use stm32f4xx_hal::stm32;
#[embassy::main(use_hse = 16, sysclk = 48, pclk1 = 24)] #[embassy::main(use_hse = 16, sysclk = 48, pclk1 = 24)]
async fn main(spawner: Spawner) { async fn main(spawner: Spawner) {