Add embedded-storage trait impls for QSPI
* Adds implementations of embedded-storage and embedded-storage-async for QSPI * Add blocking implementations of QSPI * Use blocking implementation in new() and embedded-storage impls * Use async implementation in embedded-storage-async impls * Add FLASH_SIZE const generic parameter * Own IRQ in Qspi to disable it on drop
This commit is contained in:
@ -26,10 +26,9 @@ async fn main(_spawner: Spawner, p: Peripherals) {
|
||||
config.write_page_size = qspi::WritePageSize::_256BYTES;
|
||||
|
||||
let irq = interrupt::take!(QSPI);
|
||||
let mut q = qspi::Qspi::new(
|
||||
let mut q: qspi::Qspi<_, 67108864> = qspi::Qspi::new(
|
||||
p.QSPI, irq, p.P0_19, p.P0_17, p.P0_20, p.P0_21, p.P0_22, p.P0_23, config,
|
||||
)
|
||||
.await;
|
||||
);
|
||||
|
||||
let mut id = [1; 3];
|
||||
unwrap!(q.custom_instruction(0x9F, &[], &mut id).await);
|
||||
|
@ -32,7 +32,7 @@ async fn main(_spawner: Spawner, mut p: Peripherals) {
|
||||
exit_time: 3, // tRDP = 35uS
|
||||
});
|
||||
|
||||
let mut q = qspi::Qspi::new(
|
||||
let mut q: qspi::Qspi<_, 67108864> = qspi::Qspi::new(
|
||||
&mut p.QSPI,
|
||||
&mut irq,
|
||||
&mut p.P0_19,
|
||||
@ -42,8 +42,7 @@ async fn main(_spawner: Spawner, mut p: Peripherals) {
|
||||
&mut p.P0_22,
|
||||
&mut p.P0_23,
|
||||
config,
|
||||
)
|
||||
.await;
|
||||
);
|
||||
|
||||
let mut id = [1; 3];
|
||||
unwrap!(q.custom_instruction(0x9F, &[], &mut id).await);
|
||||
|
Reference in New Issue
Block a user