clippy + dependency updates

This commit is contained in:
2025-06-26 19:44:36 +02:00
parent 61ffe06343
commit 4120b0d40a
19 changed files with 37 additions and 36 deletions

View File

@ -11,7 +11,7 @@ keywords = ["no-std", "arm", "cortex-a", "amd", "zynq7000"]
categories = ["embedded", "no-std", "hardware-support"]
[dependencies]
cortex-ar = { git = "https://github.com/rust-embedded/cortex-ar", branch = "main", features = ["critical-section-single-core"] }
cortex-ar = "0.2"
zynq7000-rt = { path = "../../zynq7000-rt" }
zynq7000 = { path = "../../zynq7000" }
zynq7000-hal = { path = "../../zynq7000-hal" }

View File

@ -144,7 +144,7 @@ async fn main(_spawner: Spawner) -> ! {
mio_led.toggle().unwrap();
let measurements = l3gd20.all().unwrap();
info!("L3GD20: {:?}", measurements);
info!("L3GD20: {measurements:?}");
info!("L3GD20 Temp: {:?}", measurements.temp_celcius());
for led in emio_leds.iter_mut() {
led.toggle().unwrap();
@ -198,6 +198,6 @@ pub extern "C" fn _prefetch_handler() {
/// Panic handler
#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
error!("Panic: {:?}", info);
error!("Panic: {info:?}");
loop {}
}

View File

@ -185,7 +185,7 @@ pub async fn blocking_application(
let spi_dev = SpiWithHwCs::new(spi, spi::ChipSelect::Slave0, delay.clone());
let mut l3gd20 = l3gd20::spi::L3gd20::new(spi_dev).unwrap();
let who_am_i = l3gd20.who_am_i().unwrap();
info!("L3GD20 WHO_AM_I: 0x{:02X}", who_am_i);
info!("L3GD20 WHO_AM_I: 0x{who_am_i:02X}");
let mut ticker = Ticker::every(Duration::from_millis(400));
@ -195,7 +195,7 @@ pub async fn blocking_application(
mio_led.toggle().unwrap();
let measurements = l3gd20.all().unwrap();
info!("L3GD20: {:?}", measurements);
info!("L3GD20: {measurements:?}");
info!("L3GD20 Temp: {:?}", measurements.temp_celcius());
for led in emio_leds.iter_mut() {
led.toggle().unwrap();
@ -217,7 +217,7 @@ pub async fn non_blocking_application(
.await
.unwrap();
let who_am_i = l3gd20.who_am_i().await.unwrap();
info!("L3GD20 WHO_AM_I: 0x{:02X}", who_am_i);
info!("L3GD20 WHO_AM_I: 0x{who_am_i:02X}");
let mut ticker = Ticker::every(Duration::from_millis(400));
@ -227,7 +227,7 @@ pub async fn non_blocking_application(
mio_led.toggle().unwrap();
let measurements = l3gd20.all().await.unwrap();
info!("L3GD20: {:?}", measurements);
info!("L3GD20: {measurements:?}");
info!("L3GD20 Temp: {:?}", measurements.temp_celcius());
for led in emio_leds.iter_mut() {
led.toggle().unwrap();
@ -287,6 +287,6 @@ pub extern "C" fn _prefetch_handler() {
/// Panic handler
#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
error!("Panic: {:?}", info);
error!("Panic: {info:?}");
loop {}
}

View File

@ -259,6 +259,6 @@ pub extern "C" fn _prefetch_handler() {
/// Panic handler
#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
error!("Panic: {:?}", info);
error!("Panic: {info:?}");
loop {}
}

View File

@ -309,7 +309,7 @@ async fn main(spawner: Spawner) -> ! {
read_buf[i] = unsafe { uart_0_cons.dequeue_unchecked() };
});
if read_bytes > 0 {
info!("Received {} bytes on UART0", read_bytes);
info!("Received {read_bytes} bytes on UART0");
info!(
"Data: {:?}",
core::str::from_utf8(&read_buf[0..read_bytes]).unwrap()
@ -321,7 +321,7 @@ async fn main(spawner: Spawner) -> ! {
read_buf[i] = unsafe { uartlite_cons.dequeue_unchecked() };
});
if read_bytes > 0 {
info!("Received {} bytes on UARTLITE", read_bytes);
info!("Received {read_bytes} bytes on UARTLITE");
info!(
"Data: {:?}",
core::str::from_utf8(&read_buf[0..read_bytes]).unwrap()
@ -333,7 +333,7 @@ async fn main(spawner: Spawner) -> ! {
read_buf[i] = unsafe { uart16550_cons.dequeue_unchecked() };
});
if read_bytes > 0 {
info!("Received {} bytes on UART16550", read_bytes);
info!("Received {read_bytes} bytes on UART16550");
info!(
"Data: {:?}",
core::str::from_utf8(&read_buf[0..read_bytes]).unwrap()
@ -344,7 +344,7 @@ async fn main(spawner: Spawner) -> ! {
}
fn build_print_string(prefix: &str, base_str: &str) -> alloc::string::String {
format!("{} {}\n\r", prefix, base_str)
format!("{prefix} {base_str}\n\r")
}
#[embassy_executor::task]
@ -490,7 +490,7 @@ pub fn on_interrupt_axi_16550() {
match int_id {
axi_uart16550::registers::IntId2::ReceiverLineStatus => {
let errors = rx.on_interrupt_receiver_line_status(iir);
warn!("Receiver line status error: {:?}", errors);
warn!("Receiver line status error: {errors:?}");
}
axi_uart16550::registers::IntId2::RxDataAvailable
| axi_uart16550::registers::IntId2::CharTimeout => {
@ -565,6 +565,6 @@ pub extern "C" fn _prefetch_handler() {
/// Panic handler
#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
error!("Panic: {:?}", info);
error!("Panic: {info:?}");
loop {}
}

View File

@ -148,6 +148,6 @@ pub extern "C" fn _prefetch_handler() {
/// Panic handler
#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
error!("Panic: {:?}", info);
error!("Panic: {info:?}");
loop {}
}