embassy-stm32: Simplify time
- Remove unused `MilliSeconds`, `MicroSeconds`, and `NanoSeconds` types - Remove `Bps`, `KiloHertz`, and `MegaHertz` types that were only used for converting to `Hertz` - Replace all instances of `impl Into<Hertz>` with `Hertz` - Add `hz`, `khz`, and `mhz` methods to `Hertz`, as well as free function shortcuts - Remove `U32Ext` extension trait
This commit is contained in:
@ -12,7 +12,7 @@ use embassy_stm32::eth::generic_smi::GenericSMI;
|
||||
use embassy_stm32::eth::{Ethernet, State};
|
||||
use embassy_stm32::peripherals::ETH;
|
||||
use embassy_stm32::rng::Rng;
|
||||
use embassy_stm32::time::U32Ext;
|
||||
use embassy_stm32::time::mhz;
|
||||
use embassy_stm32::{interrupt, Config, Peripherals};
|
||||
use embedded_io::asynch::Write;
|
||||
use rand_core::RngCore;
|
||||
@ -35,7 +35,7 @@ async fn net_task(stack: &'static Stack<Device>) -> ! {
|
||||
|
||||
fn config() -> Config {
|
||||
let mut config = Config::default();
|
||||
config.rcc.sys_ck = Some(200.mhz().into());
|
||||
config.rcc.sys_ck = Some(mhz(200));
|
||||
config
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user