Get rid of some warnings

This commit is contained in:
Thales Fragoso
2021-02-13 21:41:36 -03:00
parent a7797a918d
commit b69f72e055
40 changed files with 194 additions and 228 deletions

View File

@ -7,25 +7,20 @@
mod example_common;
use example_common::{panic, *};
use cortex_m::singleton;
use cortex_m_rt::entry;
use embassy::executor::{task, Executor};
use embassy::gpio::*;
use embassy::util::Forever;
use embassy_stm32f4::exti;
use embassy_stm32f4::exti::*;
use embassy_stm32f4::interrupt;
use embassy_stm32f4::serial;
use futures::pin_mut;
use stm32f4xx_hal::serial::config::Config;
use stm32f4xx_hal::prelude::*;
use stm32f4xx_hal::stm32;
use stm32f4xx_hal::syscfg;
use stm32f4xx_hal::{prelude::*, serial::config};
static EXTI: Forever<exti::ExtiManager> = Forever::new();
#[task]
async fn run(dp: stm32::Peripherals, cp: cortex_m::Peripherals) {
async fn run(dp: stm32::Peripherals, _cp: cortex_m::Peripherals) {
let gpioa = dp.GPIOA.split();
let button = gpioa.pa0.into_pull_up_input();

View File

@ -5,18 +5,10 @@
#[path = "../example_common.rs"]
mod example_common;
use example_common::{panic, *};
use example_common::*;
use cortex_m::singleton;
use cortex_m_rt::entry;
use embassy::executor::{task, Executor};
use embassy::uart::Uart;
use embassy::util::Forever;
use embassy_stm32f4::interrupt;
use embassy_stm32f4::serial;
use stm32f4xx_hal::serial::config::Config;
use stm32f4xx_hal::stm32;
use stm32f4xx_hal::{prelude::*, serial::config};
use stm32f4xx_hal::prelude::*;
#[entry]
fn main() -> ! {

View File

@ -14,12 +14,12 @@ use embassy::uart::Uart;
use embassy::util::Forever;
use embassy_stm32f4::interrupt;
use embassy_stm32f4::serial;
use stm32f4xx_hal::prelude::*;
use stm32f4xx_hal::serial::config::Config;
use stm32f4xx_hal::stm32;
use stm32f4xx_hal::{prelude::*, serial::config};
#[task]
async fn run(dp: stm32::Peripherals, cp: cortex_m::Peripherals) {
async fn run(dp: stm32::Peripherals, _cp: cortex_m::Peripherals) {
// https://gist.github.com/thalesfragoso/a07340c5df6eee3b04c42fdc69ecdcb1
let gpioa = dp.GPIOA.split();
let rcc = dp.RCC.constrain();