diff options
| author | Dario Nieuwenhuis <[email protected]> | 2020-12-29 15:32:23 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-12-29 15:32:23 +0100 |
| commit | 2bf9b14ef07c4d2a33ee8a45b2f07b4cdd050e9e (patch) | |
| tree | 8229727035f1aa26a9477fa702f02dd53592dd99 /examples/src/bin/qspi.rs | |
| parent | b01a88a839c2ac1eec68442f6cddf0c0a887cfa7 (diff) | |
| parent | 7dc81faa4ec46074c3500a868df18e0d123f0ba6 (diff) | |
Merge pull request #7 from akiles/irq
Owned IRQs
Diffstat (limited to 'examples/src/bin/qspi.rs')
| -rw-r--r-- | examples/src/bin/qspi.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/src/bin/qspi.rs b/examples/src/bin/qspi.rs index 644018e2d..a7d47f79c 100644 --- a/examples/src/bin/qspi.rs +++ b/examples/src/bin/qspi.rs | |||
| @@ -13,7 +13,7 @@ use nrf52840_hal::gpio; | |||
| 13 | use embassy::executor::{task, Executor}; | 13 | use embassy::executor::{task, Executor}; |
| 14 | use embassy::flash::Flash; | 14 | use embassy::flash::Flash; |
| 15 | use embassy::util::Forever; | 15 | use embassy::util::Forever; |
| 16 | use embassy_nrf::qspi; | 16 | use embassy_nrf::{interrupt, qspi}; |
| 17 | 17 | ||
| 18 | const PAGE_SIZE: usize = 4096; | 18 | const PAGE_SIZE: usize = 4096; |
| 19 | 19 | ||
| @@ -68,7 +68,8 @@ async fn run() { | |||
| 68 | deep_power_down: None, | 68 | deep_power_down: None, |
| 69 | }; | 69 | }; |
| 70 | 70 | ||
| 71 | let mut q = qspi::Qspi::new(p.QSPI, config); | 71 | let irq = interrupt::take!(QSPI); |
| 72 | let mut q = qspi::Qspi::new(p.QSPI, irq, config); | ||
| 72 | 73 | ||
| 73 | let mut id = [1; 3]; | 74 | let mut id = [1; 3]; |
| 74 | q.custom_instruction(0x9F, &[], &mut id).await.unwrap(); | 75 | q.custom_instruction(0x9F, &[], &mut id).await.unwrap(); |
