diff options
| author | Caleb Garrett <[email protected]> | 2024-02-04 17:16:33 -0500 |
|---|---|---|
| committer | Caleb Garrett <[email protected]> | 2024-02-04 17:16:33 -0500 |
| commit | 66f44b95d70547be8e32daac1ab611eec5fbe28a (patch) | |
| tree | 5c917f26dd348b753025ecaf6bcb02131199846c /examples/stm32f7/src | |
| parent | 72bbfec39d3f826c1a8dd485af2da4bcbdd32e35 (diff) | |
Addressed hash CI build issues.
Diffstat (limited to 'examples/stm32f7/src')
| -rw-r--r-- | examples/stm32f7/src/bin/eth.rs | 2 | ||||
| -rw-r--r-- | examples/stm32f7/src/bin/hash.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/stm32f7/src/bin/eth.rs b/examples/stm32f7/src/bin/eth.rs index 5bff48197..9a608e909 100644 --- a/examples/stm32f7/src/bin/eth.rs +++ b/examples/stm32f7/src/bin/eth.rs | |||
| @@ -19,7 +19,7 @@ use {defmt_rtt as _, panic_probe as _}; | |||
| 19 | 19 | ||
| 20 | bind_interrupts!(struct Irqs { | 20 | bind_interrupts!(struct Irqs { |
| 21 | ETH => eth::InterruptHandler; | 21 | ETH => eth::InterruptHandler; |
| 22 | RNG => rng::InterruptHandler<peripherals::RNG>; | 22 | HASH_RNG => rng::InterruptHandler<peripherals::RNG>; |
| 23 | }); | 23 | }); |
| 24 | 24 | ||
| 25 | type Device = Ethernet<'static, ETH, GenericSMI>; | 25 | type Device = Ethernet<'static, ETH, GenericSMI>; |
diff --git a/examples/stm32f7/src/bin/hash.rs b/examples/stm32f7/src/bin/hash.rs index a9f5aa197..cf52cea5c 100644 --- a/examples/stm32f7/src/bin/hash.rs +++ b/examples/stm32f7/src/bin/hash.rs | |||
| @@ -3,12 +3,12 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::info; | 4 | use defmt::info; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_stm32::hash::*; | ||
| 6 | use embassy_stm32::Config; | 7 | use embassy_stm32::Config; |
| 7 | use embassy_time::Instant; | 8 | use embassy_time::Instant; |
| 8 | use {defmt_rtt as _, panic_probe as _}; | ||
| 9 | 9 | ||
| 10 | use embassy_stm32::hash::*; | ||
| 11 | use sha2::{Digest, Sha256}; | 10 | use sha2::{Digest, Sha256}; |
| 11 | use {defmt_rtt as _, panic_probe as _}; | ||
| 12 | 12 | ||
| 13 | #[embassy_executor::main] | 13 | #[embassy_executor::main] |
| 14 | async fn main(_spawner: Spawner) -> ! { | 14 | async fn main(_spawner: Spawner) -> ! { |
| @@ -26,7 +26,7 @@ async fn main(_spawner: Spawner) -> ! { | |||
| 26 | let mut context = hw_hasher.start(Algorithm::SHA256, DataType::Width8).await; | 26 | let mut context = hw_hasher.start(Algorithm::SHA256, DataType::Width8).await; |
| 27 | hw_hasher.update(&mut context, test_1).await; | 27 | hw_hasher.update(&mut context, test_1).await; |
| 28 | hw_hasher.update(&mut context, test_2).await; | 28 | hw_hasher.update(&mut context, test_2).await; |
| 29 | let mut buffer: [u8; 32] = [0; 32]; | 29 | let mut buffer: [u8; 64] = [0; 64]; |
| 30 | let hw_digest = hw_hasher.finish(context, &mut buffer).await; | 30 | let hw_digest = hw_hasher.finish(context, &mut buffer).await; |
| 31 | 31 | ||
| 32 | let hw_end_time = Instant::now(); | 32 | let hw_end_time = Instant::now(); |
