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"]
mod example_common;
use defmt::*;
use embassy::executor::Spawner;
use embassy_rp::gpio::{Input, Level, Output, Pull};
use embassy_rp::Peripherals;

View File

@ -9,7 +9,6 @@
#[path = "../example_common.rs"]
mod example_common;
use defmt::*;
use embassy::executor::Spawner;
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::path::{Path, PathBuf};
use std::{env, ffi::OsStr};
use std::path::PathBuf;
fn main() {
// Put the linker script somewhere the linker can find it

View File

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

View File

@ -3,6 +3,7 @@
#![feature(asm)]
#![feature(type_alias_impl_trait)]
#![feature(never_type)]
#![allow(incomplete_features)]
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
// before doing anything important.
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;
const XOSC_MHZ: u32 = 12;

View File

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

View File

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