stm32/spi: remove DMA generic params.
This commit is contained in:
.vscode
embassy-stm32/src
examples
stm32f4
src
stm32g0
src
stm32h7
src
stm32l0
src
bin
stm32l1
src
bin
stm32l4
tests/stm32/src/bin
@ -3,7 +3,6 @@
|
||||
|
||||
use cortex_m_rt::entry;
|
||||
use defmt::*;
|
||||
use embassy_stm32::dma::NoDma;
|
||||
use embassy_stm32::gpio::{Level, Output, Speed};
|
||||
use embassy_stm32::spi::{Config, Spi};
|
||||
use embassy_stm32::time::Hertz;
|
||||
@ -18,7 +17,7 @@ fn main() -> ! {
|
||||
let mut spi_config = Config::default();
|
||||
spi_config.frequency = Hertz(1_000_000);
|
||||
|
||||
let mut spi = Spi::new(p.SPI3, p.PC10, p.PC12, p.PC11, NoDma, NoDma, spi_config);
|
||||
let mut spi = Spi::new_blocking(p.SPI3, p.PC10, p.PC12, p.PC11, spi_config);
|
||||
|
||||
let mut cs = Output::new(p.PE0, Level::High, Speed::VeryHigh);
|
||||
|
||||
|
@ -13,8 +13,8 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use embassy_stm32::spi;
|
||||
use embassy_stm32::time::khz;
|
||||
use embassy_stm32::{dma, spi};
|
||||
use embassy_time::{Duration, Ticker, Timer};
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
|
||||
@ -78,7 +78,7 @@ async fn main(_spawner: embassy_executor::Spawner) {
|
||||
spi_config.frequency = khz(12_800);
|
||||
|
||||
// Since we only output waveform, then the Rx and Sck and RxDma it is not considered
|
||||
let mut ws2812_spi = spi::Spi::new_txonly_nosck(dp.SPI1, dp.PB5, dp.DMA2_CH3, dma::NoDma, spi_config);
|
||||
let mut ws2812_spi = spi::Spi::new_txonly_nosck(dp.SPI1, dp.PB5, dp.DMA2_CH3, spi_config);
|
||||
|
||||
// flip color at 2 Hz
|
||||
let mut ticker = Ticker::every(Duration::from_millis(500));
|
||||
|
Reference in New Issue
Block a user