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

@ -66,9 +66,7 @@ async fn run() {
// Reverse buf
for i in 0..4 {
let tmp = buf[i];
buf[i] = buf[7 - i];
buf[7 - i] = tmp;
buf.swap(i, 7 - i);
}
info!("writing...");

View File

@ -12,7 +12,7 @@ use nrf52840_hal::gpio;
use embassy::executor::{task, Executor};
use embassy::util::Forever;
use embassy_nrf::gpiote::{Channels, Gpiote, InputChannel, InputChannelPolarity};
use embassy_nrf::gpiote::{Gpiote, InputChannel, InputChannelPolarity};
use embassy_nrf::interrupt;
#[task]

View File

@ -6,7 +6,6 @@
mod example_common;
use example_common::*;
use core::mem;
use core::pin::Pin;
use cortex_m_rt::entry;
use defmt::panic;

View File

@ -61,7 +61,6 @@
mod example_common;
use example_common::*;
use cortex_m::peripheral::NVIC;
use cortex_m_rt::entry;
use defmt::panic;
use nrf52840_hal::clocks;

View File

@ -7,7 +7,7 @@ mod example_common;
use example_common::*;
use cortex_m_rt::entry;
use defmt::{assert_eq, panic, *};
use defmt::{assert_eq, panic};
use nrf52840_hal::gpio;
use embassy::executor::{task, Executor};

View File

@ -6,11 +6,10 @@
mod example_common;
use example_common::*;
use core::mem::MaybeUninit;
use cortex_m_rt::entry;
use defmt::panic;
use embassy::executor::{task, Executor};
use embassy::time::{Clock, Duration, Timer};
use embassy::time::{Duration, Timer};
use embassy::util::Forever;
use embassy_nrf::pac;
use embassy_nrf::{interrupt, rtc};

View File

@ -75,7 +75,7 @@ async fn run(uart: pac::UARTE0, port: pac::P0) {
};
let received = &mut buf[..received_len];
if received.len() > 0 {
if !received.is_empty() {
info!("read done, got {:[u8]}", received);
// Echo back received data