mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 16:23:10 +00:00
stm32/test: add h5 hil tests.
This commit is contained in:
parent
4ef8e008e8
commit
dbfd28130f
1
ci.sh
1
ci.sh
@ -119,6 +119,7 @@ cargo batch \
|
||||
--- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32g071rb --out-dir out/tests/nucleo-stm32g071rb \
|
||||
--- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32h755zi --out-dir out/tests/nucleo-stm32h755zi \
|
||||
--- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32wb55rg --out-dir out/tests/nucleo-stm32wb55rg \
|
||||
--- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32h563zi --out-dir out/tests/nucleo-stm32h563zi \
|
||||
--- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32u585ai --out-dir out/tests/iot-stm32u585ai \
|
||||
--- build --release --manifest-path tests/rp/Cargo.toml --target thumbv6m-none-eabi --out-dir out/tests/rpi-pico \
|
||||
--- build --release --manifest-path tests/nrf/Cargo.toml --target thumbv7em-none-eabi --out-dir out/tests/nrf52840-dk \
|
||||
|
@ -11,6 +11,7 @@ stm32g071rb = ["embassy-stm32/stm32g071rb"] # Nucleo
|
||||
stm32g491re = ["embassy-stm32/stm32g491re"] # Nucleo
|
||||
stm32h755zi = ["embassy-stm32/stm32h755zi-cm7"] # Nucleo
|
||||
stm32wb55rg = ["embassy-stm32/stm32wb55rg"] # Nucleo
|
||||
stm32h563zi = ["embassy-stm32/stm32h563zi"] # Nucleo
|
||||
stm32u585ai = ["embassy-stm32/stm32u585ai"] # IoT board
|
||||
|
||||
[dependencies]
|
||||
|
@ -30,6 +30,8 @@ async fn main(_spawner: Spawner) {
|
||||
let (mut a, mut b) = (p.PB6, p.PB7);
|
||||
#[cfg(feature = "stm32u585ai")]
|
||||
let (mut a, mut b) = (p.PD9, p.PD8);
|
||||
#[cfg(feature = "stm32h563zi")]
|
||||
let (mut a, mut b) = (p.PB6, p.PB7);
|
||||
|
||||
// Test initial output
|
||||
{
|
||||
|
@ -17,22 +17,25 @@ async fn main(_spawner: Spawner) {
|
||||
info!("Hello World!");
|
||||
|
||||
#[cfg(feature = "stm32f103c8")]
|
||||
let (sck, mosi, miso) = (p.PA5, p.PA7, p.PA6);
|
||||
let (spi, sck, mosi, miso) = (p.SPI1, p.PA5, p.PA7, p.PA6);
|
||||
#[cfg(feature = "stm32f429zi")]
|
||||
let (sck, mosi, miso) = (p.PA5, p.PA7, p.PA6);
|
||||
let (spi, sck, mosi, miso) = (p.SPI1, p.PA5, p.PA7, p.PA6);
|
||||
#[cfg(feature = "stm32h755zi")]
|
||||
let (sck, mosi, miso) = (p.PA5, p.PB5, p.PA6);
|
||||
let (spi, sck, mosi, miso) = (p.SPI1, p.PA5, p.PB5, p.PA6);
|
||||
#[cfg(feature = "stm32g491re")]
|
||||
let (sck, mosi, miso) = (p.PA5, p.PA7, p.PA6);
|
||||
let (spi, sck, mosi, miso) = (p.SPI1, p.PA5, p.PA7, p.PA6);
|
||||
#[cfg(feature = "stm32g071rb")]
|
||||
let (sck, mosi, miso) = (p.PA5, p.PA7, p.PA6);
|
||||
let (spi, sck, mosi, miso) = (p.SPI1, p.PA5, p.PA7, p.PA6);
|
||||
#[cfg(feature = "stm32wb55rg")]
|
||||
let (sck, mosi, miso) = (p.PA5, p.PA7, p.PA6);
|
||||
let (spi, sck, mosi, miso) = (p.SPI1, p.PA5, p.PA7, p.PA6);
|
||||
#[cfg(feature = "stm32u585ai")]
|
||||
let (sck, mosi, miso) = (p.PE13, p.PE15, p.PE14);
|
||||
let (spi, sck, mosi, miso) = (p.SPI1, p.PE13, p.PE15, p.PE14);
|
||||
#[cfg(feature = "stm32h563zi")]
|
||||
let (spi, sck, mosi, miso) = (p.SPI4, p.PE12, p.PE14, p.PE13);
|
||||
|
||||
info!("asdfa;");
|
||||
let mut spi = Spi::new(
|
||||
p.SPI1,
|
||||
spi,
|
||||
sck, // Arduino D13
|
||||
mosi, // Arduino D11
|
||||
miso, // Arduino D12
|
||||
|
@ -16,22 +16,24 @@ async fn main(_spawner: Spawner) {
|
||||
info!("Hello World!");
|
||||
|
||||
#[cfg(feature = "stm32f103c8")]
|
||||
let (sck, mosi, miso, tx_dma, rx_dma) = (p.PA5, p.PA7, p.PA6, p.DMA1_CH3, p.DMA1_CH2);
|
||||
let (spi, sck, mosi, miso, tx_dma, rx_dma) = (p.SPI1, p.PA5, p.PA7, p.PA6, p.DMA1_CH3, p.DMA1_CH2);
|
||||
#[cfg(feature = "stm32f429zi")]
|
||||
let (sck, mosi, miso, tx_dma, rx_dma) = (p.PA5, p.PA7, p.PA6, p.DMA2_CH3, p.DMA2_CH2);
|
||||
let (spi, sck, mosi, miso, tx_dma, rx_dma) = (p.SPI1, p.PA5, p.PA7, p.PA6, p.DMA2_CH3, p.DMA2_CH2);
|
||||
#[cfg(feature = "stm32h755zi")]
|
||||
let (sck, mosi, miso, tx_dma, rx_dma) = (p.PA5, p.PB5, p.PA6, p.DMA1_CH0, p.DMA1_CH1);
|
||||
let (spi, sck, mosi, miso, tx_dma, rx_dma) = (p.SPI1, p.PA5, p.PB5, p.PA6, p.DMA1_CH0, p.DMA1_CH1);
|
||||
#[cfg(feature = "stm32g491re")]
|
||||
let (sck, mosi, miso, tx_dma, rx_dma) = (p.PA5, p.PA7, p.PA6, p.DMA1_CH1, p.DMA1_CH2);
|
||||
let (spi, sck, mosi, miso, tx_dma, rx_dma) = (p.SPI1, p.PA5, p.PA7, p.PA6, p.DMA1_CH1, p.DMA1_CH2);
|
||||
#[cfg(feature = "stm32g071rb")]
|
||||
let (sck, mosi, miso, tx_dma, rx_dma) = (p.PA5, p.PA7, p.PA6, p.DMA1_CH1, p.DMA1_CH2);
|
||||
let (spi, sck, mosi, miso, tx_dma, rx_dma) = (p.SPI1, p.PA5, p.PA7, p.PA6, p.DMA1_CH1, p.DMA1_CH2);
|
||||
#[cfg(feature = "stm32wb55rg")]
|
||||
let (sck, mosi, miso, tx_dma, rx_dma) = (p.PA5, p.PA7, p.PA6, p.DMA1_CH1, p.DMA1_CH2);
|
||||
let (spi, sck, mosi, miso, tx_dma, rx_dma) = (p.SPI1, p.PA5, p.PA7, p.PA6, p.DMA1_CH1, p.DMA1_CH2);
|
||||
#[cfg(feature = "stm32u585ai")]
|
||||
let (sck, mosi, miso, tx_dma, rx_dma) = (p.PE13, p.PE15, p.PE14, p.GPDMA1_CH0, p.GPDMA1_CH1);
|
||||
let (spi, sck, mosi, miso, tx_dma, rx_dma) = (p.SPI1, p.PE13, p.PE15, p.PE14, p.GPDMA1_CH0, p.GPDMA1_CH1);
|
||||
#[cfg(feature = "stm32h563zi")]
|
||||
let (spi, sck, mosi, miso, tx_dma, rx_dma) = (p.SPI4, p.PE12, p.PE14, p.PE13, p.GPDMA1_CH0, p.GPDMA1_CH1);
|
||||
|
||||
let mut spi = Spi::new(
|
||||
p.SPI1,
|
||||
spi,
|
||||
sck, // Arduino D13
|
||||
mosi, // Arduino D11
|
||||
miso, // Arduino D12
|
||||
|
@ -32,6 +32,8 @@ async fn main(_spawner: Spawner) {
|
||||
let (tx, rx, usart, irq) = (p.PB6, p.PB7, p.USART1, interrupt::take!(USART1));
|
||||
#[cfg(feature = "stm32u585ai")]
|
||||
let (tx, rx, usart, irq) = (p.PD8, p.PD9, p.USART3, interrupt::take!(USART3));
|
||||
#[cfg(feature = "stm32h563zi")]
|
||||
let (tx, rx, usart, irq) = (p.PB6, p.PB7, p.LPUART1, interrupt::take!(LPUART1));
|
||||
|
||||
let config = Config::default();
|
||||
let mut usart = Uart::new(usart, rx, tx, irq, NoDma, NoDma, config);
|
||||
|
@ -62,6 +62,15 @@ async fn main(_spawner: Spawner) {
|
||||
p.GPDMA1_CH0,
|
||||
p.GPDMA1_CH1,
|
||||
);
|
||||
#[cfg(feature = "stm32h563zi")]
|
||||
let (tx, rx, usart, irq, tx_dma, rx_dma) = (
|
||||
p.PB6,
|
||||
p.PB7,
|
||||
p.LPUART1,
|
||||
interrupt::take!(LPUART1),
|
||||
p.GPDMA1_CH0,
|
||||
p.GPDMA1_CH1,
|
||||
);
|
||||
|
||||
let config = Config::default();
|
||||
let mut usart = Uart::new(usart, rx, tx, irq, tx_dma, rx_dma, config);
|
||||
|
Loading…
Reference in New Issue
Block a user