aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMagnus Nordlander <[email protected]>2025-08-05 09:58:33 +0200
committerMagnus Nordlander <[email protected]>2025-08-05 09:58:33 +0200
commit1e918331184f6fb11c08e5c5c7019d50452239dc (patch)
tree662760fa445db96af0469da91b032045ee5212a9 /examples
parent8965a13da4149a6f1a56c5abcf879ff8ad822844 (diff)
Apply rustfmt
Diffstat (limited to 'examples')
-rw-r--r--examples/rp235x/src/bin/psram.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/rp235x/src/bin/psram.rs b/examples/rp235x/src/bin/psram.rs
index c0e41dd9e..b2ddf91c9 100644
--- a/examples/rp235x/src/bin/psram.rs
+++ b/examples/rp235x/src/bin/psram.rs
@@ -6,11 +6,11 @@
6#![no_std] 6#![no_std]
7#![no_main] 7#![no_main]
8 8
9use core::slice;
9use defmt::*; 10use defmt::*;
10use embassy_executor::Spawner; 11use embassy_executor::Spawner;
11use embassy_time::Timer; 12use embassy_time::Timer;
12use {defmt_rtt as _, panic_probe as _}; 13use {defmt_rtt as _, panic_probe as _};
13use core::slice;
14 14
15#[embassy_executor::main] 15#[embassy_executor::main]
16async fn main(_spawner: Spawner) { 16async fn main(_spawner: Spawner) {
@@ -23,13 +23,12 @@ async fn main(_spawner: Spawner) {
23 error!("PSRAM not found"); 23 error!("PSRAM not found");
24 loop { 24 loop {
25 Timer::after_secs(1).await; 25 Timer::after_secs(1).await;
26 }; 26 }
27 }; 27 };
28 28
29 let psram_slice = unsafe { 29 let psram_slice = unsafe {
30 let psram_ptr = psram.base_address(); 30 let psram_ptr = psram.base_address();
31 let slice: &'static mut [u8] = 31 let slice: &'static mut [u8] = slice::from_raw_parts_mut(psram_ptr, psram.size() as usize);
32 slice::from_raw_parts_mut(psram_ptr, psram.size() as usize);
33 slice 32 slice
34 }; 33 };
35 34