Fix all warnings on embassy-rp and embassy-rp-examples and

embassy-std-examples
This commit is contained in:
Rukai 2021-05-18 22:11:20 +10:00 committed by Lucas Kent
parent 58723a8e76
commit 2363a019e2
8 changed files with 10 additions and 11 deletions

View File

@ -9,7 +9,6 @@
#[path = "../example_common.rs"] #[path = "../example_common.rs"]
mod example_common; mod example_common;
use defmt::*;
use embassy::executor::Spawner; use embassy::executor::Spawner;
use embassy_rp::gpio::{Input, Level, Output, Pull}; use embassy_rp::gpio::{Input, Level, Output, Pull};
use embassy_rp::Peripherals; use embassy_rp::Peripherals;

View File

@ -9,7 +9,6 @@
#[path = "../example_common.rs"] #[path = "../example_common.rs"]
mod example_common; mod example_common;
use defmt::*;
use embassy::executor::Spawner; use embassy::executor::Spawner;
use embassy_rp::{uart, Peripherals}; use embassy_rp::{uart, Peripherals};

View File

@ -1,7 +1,7 @@
use std::fs::{self, File}; use std::env;
use std::fs::File;
use std::io::Write; use std::io::Write;
use std::path::{Path, PathBuf}; use std::path::PathBuf;
use std::{env, ffi::OsStr};
fn main() { fn main() {
// Put the linker script somewhere the linker can find it // Put the linker script somewhere the linker can find it

View File

@ -1,11 +1,11 @@
use core::sync::atomic::{compiler_fence, Ordering}; use core::sync::atomic::{compiler_fence, Ordering};
use crate::fmt::{assert, *}; use crate::fmt::assert;
use crate::pac::dma::vals; use crate::pac::dma::vals;
use crate::{pac, peripherals}; use crate::{pac, peripherals};
pub struct Dma<T: Channel> { pub struct Dma<T: Channel> {
inner: T, _inner: T,
} }
impl<T: Channel> Dma<T> { impl<T: Channel> Dma<T> {

View File

@ -3,6 +3,7 @@
#![feature(asm)] #![feature(asm)]
#![feature(type_alias_impl_trait)] #![feature(type_alias_impl_trait)]
#![feature(never_type)] #![feature(never_type)]
#![allow(incomplete_features)]
pub use rp2040_pac2 as pac; pub use rp2040_pac2 as pac;
@ -87,7 +88,7 @@ pub mod config {
} }
} }
pub fn init(config: config::Config) -> Peripherals { pub fn init(_config: config::Config) -> Peripherals {
// Do this first, so that it panics if user is calling `init` a second time // Do this first, so that it panics if user is calling `init` a second time
// before doing anything important. // before doing anything important.
let peripherals = Peripherals::take(); let peripherals = Peripherals::take();

View File

@ -1,6 +1,4 @@
use core::ops::Deref; use crate::fmt::assert;
use crate::fmt::{assert, *};
use crate::pac; use crate::pac;
const XOSC_MHZ: u32 = 12; const XOSC_MHZ: u32 = 12;

View File

@ -1,6 +1,7 @@
#![feature(min_type_alias_impl_trait)] #![feature(min_type_alias_impl_trait)]
#![feature(impl_trait_in_bindings)] #![feature(impl_trait_in_bindings)]
#![feature(type_alias_impl_trait)] #![feature(type_alias_impl_trait)]
#![allow(incomplete_features)]
#[path = "../serial_port.rs"] #[path = "../serial_port.rs"]
mod serial_port; mod serial_port;

View File

@ -1,6 +1,7 @@
#![feature(min_type_alias_impl_trait)] #![feature(min_type_alias_impl_trait)]
#![feature(impl_trait_in_bindings)] #![feature(impl_trait_in_bindings)]
#![feature(type_alias_impl_trait)] #![feature(type_alias_impl_trait)]
#![allow(incomplete_features)]
use embassy::time::{Duration, Timer}; use embassy::time::{Duration, Timer};
use embassy::util::Forever; use embassy::util::Forever;