diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-10-03 01:42:46 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2023-10-03 02:11:58 +0200 |
| commit | c0a6c78a146a6e0ec57a03e64ff83a3fa87b4bdd (patch) | |
| tree | 202bc5e35334d67aa868ecfe7280843c5fa52a31 /tests/stm32/src/bin/eth.rs | |
| parent | 58280048e332fadd73dc8b48588b0112c61b8ff9 (diff) | |
stm32/hil: add f2, f3, f7, l49
Diffstat (limited to 'tests/stm32/src/bin/eth.rs')
| -rw-r--r-- | tests/stm32/src/bin/eth.rs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/stm32/src/bin/eth.rs b/tests/stm32/src/bin/eth.rs index 0b32b60b3..139192381 100644 --- a/tests/stm32/src/bin/eth.rs +++ b/tests/stm32/src/bin/eth.rs | |||
| @@ -19,12 +19,12 @@ use {defmt_rtt as _, panic_probe as _}; | |||
| 19 | 19 | ||
| 20 | teleprobe_meta::timeout!(120); | 20 | teleprobe_meta::timeout!(120); |
| 21 | 21 | ||
| 22 | #[cfg(not(feature = "stm32h563zi"))] | 22 | #[cfg(not(any(feature = "stm32h563zi", feature = "stm32f767zi", feature = "stm32f207zg")))] |
| 23 | bind_interrupts!(struct Irqs { | 23 | bind_interrupts!(struct Irqs { |
| 24 | ETH => eth::InterruptHandler; | 24 | ETH => eth::InterruptHandler; |
| 25 | HASH_RNG => rng::InterruptHandler<peripherals::RNG>; | 25 | HASH_RNG => rng::InterruptHandler<peripherals::RNG>; |
| 26 | }); | 26 | }); |
| 27 | #[cfg(feature = "stm32h563zi")] | 27 | #[cfg(any(feature = "stm32h563zi", feature = "stm32f767zi", feature = "stm32f207zg"))] |
| 28 | bind_interrupts!(struct Irqs { | 28 | bind_interrupts!(struct Irqs { |
| 29 | ETH => eth::InterruptHandler; | 29 | ETH => eth::InterruptHandler; |
| 30 | RNG => rng::InterruptHandler<peripherals::RNG>; | 30 | RNG => rng::InterruptHandler<peripherals::RNG>; |
| @@ -56,11 +56,21 @@ async fn main(spawner: Spawner) { | |||
| 56 | let n = 2; | 56 | let n = 2; |
| 57 | #[cfg(feature = "stm32h563zi")] | 57 | #[cfg(feature = "stm32h563zi")] |
| 58 | let n = 3; | 58 | let n = 3; |
| 59 | #[cfg(feature = "stm32f767zi")] | ||
| 60 | let n = 4; | ||
| 61 | #[cfg(feature = "stm32f207zg")] | ||
| 62 | let n = 5; | ||
| 59 | 63 | ||
| 60 | let mac_addr = [0x00, n, 0xDE, 0xAD, 0xBE, 0xEF]; | 64 | let mac_addr = [0x00, n, 0xDE, 0xAD, 0xBE, 0xEF]; |
| 61 | 65 | ||
| 66 | // F2 runs out of RAM | ||
| 67 | #[cfg(feature = "stm32f207zg")] | ||
| 68 | const PACKET_QUEUE_SIZE: usize = 2; | ||
| 69 | #[cfg(not(feature = "stm32f207zg"))] | ||
| 70 | const PACKET_QUEUE_SIZE: usize = 4; | ||
| 71 | |||
| 62 | let device = Ethernet::new( | 72 | let device = Ethernet::new( |
| 63 | make_static!(PacketQueue::<4, 4>::new()), | 73 | make_static!(PacketQueue::<PACKET_QUEUE_SIZE, PACKET_QUEUE_SIZE>::new()), |
| 64 | p.ETH, | 74 | p.ETH, |
| 65 | Irqs, | 75 | Irqs, |
| 66 | p.PA1, | 76 | p.PA1, |
