Get rid of some warnings
This commit is contained in:
@ -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...");
|
||||
|
@ -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]
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
@ -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};
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user