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:
@ -22,15 +22,12 @@ pub struct I2c<'d, T: Instance> {
|
||||
}
|
||||
|
||||
impl<'d, T: Instance> I2c<'d, T> {
|
||||
pub fn new<F>(
|
||||
pub fn new(
|
||||
_peri: impl Unborrow<Target = T> + 'd,
|
||||
scl: impl Unborrow<Target = impl SclPin<T>> + 'd,
|
||||
sda: impl Unborrow<Target = impl SdaPin<T>> + 'd,
|
||||
freq: F,
|
||||
) -> Self
|
||||
where
|
||||
F: Into<Hertz>,
|
||||
{
|
||||
freq: Hertz,
|
||||
) -> Self {
|
||||
unborrow!(scl, sda);
|
||||
|
||||
T::enable();
|
||||
|
Reference in New Issue
Block a user