stm32-rs / stm32f7xx-hal

A Rust embedded-hal HAL for all MCUs in the STM32 F7 family
Apache License 2.0
115 stars 67 forks source link

Make `qspi.rs` DMA APIs Non-Blocking #142

Closed bbrown1867 closed 3 years ago

bbrown1867 commented 3 years ago

The qspi.rs driver was initially written somewhat hastily and the API was a bit different than other bus drivers like serial.rs and spi.rs. This PR modifies the API to provide some consistency with the other drivers - the biggest change is making the API non-blocking: This allows the caller to decide when to wait for the DMA transfer to finish.

Also APIs are renamed to write_all, read_all for DMA and simply write and read for polling variants.

The example is modified to accommodate this.