diff options
| author | kalkyl <[email protected]> | 2023-05-16 11:28:35 +0200 |
|---|---|---|
| committer | kalkyl <[email protected]> | 2023-05-16 11:28:35 +0200 |
| commit | b950d6d72bf92f1943f885ce700685fedf4b6cd9 (patch) | |
| tree | 08c779b0eb667841d33131a0d4f302d3a7b234a7 /tests/rp/src/bin/flash.rs | |
| parent | ab63f3832fdceeea994500042594e0b7c0acac95 (diff) | |
Add HIL test
Diffstat (limited to 'tests/rp/src/bin/flash.rs')
| -rw-r--r-- | tests/rp/src/bin/flash.rs | 9 |
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 | ||
