aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2023-05-16 09:36:06 +0000
committerGitHub <[email protected]>2023-05-16 09:36:06 +0000
commit56f2e0c9a02f6db9fe4e3a72a9b7fdd160a90aa8 (patch)
tree08c779b0eb667841d33131a0d4f302d3a7b234a7 /tests
parentb0541c01bed231e0e6355db83c87e3ec2b196e70 (diff)
parentb950d6d72bf92f1943f885ce700685fedf4b6cd9 (diff)
Merge #1462
1462: rp: Read flash unique id and jedec id r=Dirbaio a=kalkyl Co-authored-by: kalkyl <[email protected]>
Diffstat (limited to 'tests')
-rw-r--r--tests/rp/src/bin/flash.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/rp/src/bin/flash.rs b/tests/rp/src/bin/flash.rs
index 897e3804f..00bebe2b6 100644
--- a/tests/rp/src/bin/flash.rs
+++ b/tests/rp/src/bin/flash.rs
@@ -23,6 +23,15 @@ async fn main(_spawner: Spawner) {
23 23
24 let mut flash = embassy_rp::flash::Flash::<_, { 2 * 1024 * 1024 }>::new(p.FLASH); 24 let mut flash = embassy_rp::flash::Flash::<_, { 2 * 1024 * 1024 }>::new(p.FLASH);
25 25
26 // Get JEDEC id
27 let jedec = defmt::unwrap!(flash.jedec_id());
28 info!("jedec id: 0x{:x}", jedec);
29
30 // Get unique id
31 let mut uid = [0; 8];
32 defmt::unwrap!(flash.unique_id(&mut uid));
33 info!("unique id: {:?}", uid);
34
26 let mut buf = [0u8; ERASE_SIZE]; 35 let mut buf = [0u8; ERASE_SIZE];
27 defmt::unwrap!(flash.read(ADDR_OFFSET, &mut buf)); 36 defmt::unwrap!(flash.read(ADDR_OFFSET, &mut buf));
28 37