diff options
| author | Bob McWhirter <[email protected]> | 2021-09-01 09:39:33 -0400 |
|---|---|---|
| committer | Bob McWhirter <[email protected]> | 2021-09-01 09:39:33 -0400 |
| commit | 37ceae908b39fcf1ef3b38680cef240ed6b1e867 (patch) | |
| tree | ec7fe229b9ebc2892dc7c57732ab01f8f611ae4b /examples/stm32h7/src/bin/eth.rs | |
| parent | fd7a76c59e8a190781aea476d199bda826dd5031 (diff) | |
Rename Random impl to Rng.
Create Random struct providing next_x(range) for all T:Rng.
Diffstat (limited to 'examples/stm32h7/src/bin/eth.rs')
| -rw-r--r-- | examples/stm32h7/src/bin/eth.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/stm32h7/src/bin/eth.rs b/examples/stm32h7/src/bin/eth.rs index 4a9f261c2..df4931455 100644 --- a/examples/stm32h7/src/bin/eth.rs +++ b/examples/stm32h7/src/bin/eth.rs | |||
| @@ -21,7 +21,7 @@ use embassy_net::{ | |||
| 21 | }; | 21 | }; |
| 22 | use embassy_stm32::eth::lan8742a::LAN8742A; | 22 | use embassy_stm32::eth::lan8742a::LAN8742A; |
| 23 | use embassy_stm32::eth::{Ethernet, State}; | 23 | use embassy_stm32::eth::{Ethernet, State}; |
| 24 | use embassy_stm32::rng::Random; | 24 | use embassy_stm32::rng::Rng; |
| 25 | use embassy_stm32::{interrupt, peripherals}; | 25 | use embassy_stm32::{interrupt, peripherals}; |
| 26 | use heapless::Vec; | 26 | use heapless::Vec; |
| 27 | use panic_probe as _; | 27 | use panic_probe as _; |
| @@ -81,7 +81,7 @@ fn _embassy_rand(buf: &mut [u8]) { | |||
| 81 | }); | 81 | }); |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | static mut RNG_INST: Option<Random<RNG>> = None; | 84 | static mut RNG_INST: Option<Rng<RNG>> = None; |
| 85 | 85 | ||
| 86 | static EXECUTOR: Forever<Executor> = Forever::new(); | 86 | static EXECUTOR: Forever<Executor> = Forever::new(); |
| 87 | static STATE: Forever<State<'static, 4, 4>> = Forever::new(); | 87 | static STATE: Forever<State<'static, 4, 4>> = Forever::new(); |
| @@ -97,7 +97,7 @@ fn main() -> ! { | |||
| 97 | 97 | ||
| 98 | let p = embassy_stm32::init(config()); | 98 | let p = embassy_stm32::init(config()); |
| 99 | 99 | ||
| 100 | let rng = Random::new(p.RNG); | 100 | let rng = Rng::new(p.RNG); |
| 101 | unsafe { | 101 | unsafe { |
| 102 | RNG_INST.replace(rng); | 102 | RNG_INST.replace(rng); |
| 103 | } | 103 | } |
