Skip to content

Commit 303e721

Browse files
committed
Re-export embedded_time
1 parent 2caf4f2 commit 303e721

File tree

9 files changed

+10
-12
lines changed

9 files changed

+10
-12
lines changed

src/i2c.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
77
use core::convert::TryFrom;
88
use core::ops::Deref;
9-
use embedded_time::rate::Hertz;
109

1110
use crate::{
1211
gpio::{gpioa, gpiob, AF4},
1312
hal::blocking::i2c::{Read, Write, WriteRead},
1413
pac::{i2c1::RegisterBlock, rcc::cfgr3::I2C1SW_A, I2C1, RCC},
1514
rcc::{Clocks, APB1},
15+
time::rate::Hertz,
1616
};
1717

1818
#[cfg(not(feature = "gpio-f333"))]

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ pub use embedded_hal as hal;
101101
pub use nb;
102102
pub use nb::block;
103103

104+
pub use embedded_time as time;
105+
104106
#[cfg(feature = "defmt")]
105107
pub(crate) use defmt::{assert, panic, unreachable, unwrap};
106108
#[cfg(feature = "defmt")]
@@ -187,7 +189,6 @@ cfg_if::cfg_if! {
187189
pub mod rtc;
188190
pub mod serial;
189191
pub mod spi;
190-
pub mod time;
191192
pub mod timer;
192193
}
193194
}

src/prelude.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ pub use crate::flash::FlashExt as _stm32f3xx_hal_flash_FlashExt;
66
pub use crate::gpio::GpioExt as _stm32f3xx_hal_gpio_GpioExt;
77
pub use crate::hal::prelude::*;
88
pub use crate::rcc::RccExt as _stm32f3xx_hal_rcc_RccExt;
9-
pub use embedded_time::duration::*;
10-
pub use embedded_time::rate::*;
119
#[cfg(feature = "unproven")]
1210
pub use crate::{
1311
hal::digital::v2::InputPin as _embedded_hal_digital_InputPin,

src/pwm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ use crate::{
159159
gpio::{self, gpioa, gpiob},
160160
hal::PwmPin,
161161
pac::{RCC, TIM15, TIM16, TIM17, TIM2},
162-
rcc::Clocks
162+
rcc::Clocks,
163+
time::rate::Hertz,
163164
};
164165
use core::marker::PhantomData;
165-
use embedded_time::rate::Hertz;
166166

167167
#[cfg(any(
168168
feature = "stm32f302xb",

src/rcc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ use crate::pac::{
6060
};
6161

6262
use crate::flash::ACR;
63-
use embedded_time::rate::Hertz;
63+
use crate::time::rate::Hertz;
6464

6565
/// Extension trait that constrains the `RCC` peripheral
6666
pub trait RccExt {

src/serial.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ use crate::{
55
hal::{blocking, serial},
66
pac::{USART1, USART2, USART3},
77
rcc::{Clocks, APB1, APB2},
8+
time::rate::Baud
89
};
910

1011
use cfg_if::cfg_if;
1112
use core::{convert::Infallible, marker::PhantomData, ptr};
12-
use embedded_time::rate::Baud;
1313

1414
cfg_if! {
1515
if #[cfg(any(feature = "stm32f302", feature = "stm32f303"))] {

src/spi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ use crate::rcc::APB1;
132132
))]
133133
use crate::rcc::APB2;
134134
use core::marker::PhantomData;
135-
use embedded_time::rate::Hertz;
135+
use crate::time::rate::Hertz;
136136

137137
/// SPI error
138138
#[derive(Debug)]

src/timer.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ use crate::pac::{TIM15, TIM16, TIM17, TIM2, TIM6};
5252
use crate::pac::{TIM3, TIM7};
5353

5454
use void::Void;
55-
use embedded_time::rate::Hertz;
56-
55+
use crate::time::rate::Hertz;
5756
use crate::rcc::{Clocks, APB1, APB2};
5857

5958

src/watchdog.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use crate::hal::watchdog::{Watchdog, WatchdogEnable};
88

99
use crate::pac::{DBGMCU, IWDG};
10-
use embedded_time::duration::Milliseconds;
10+
use crate::time::duration::Milliseconds;
1111

1212
const LSI_KHZ: u32 = 40;
1313
const MAX_PR: u8 = 8;

0 commit comments

Comments
 (0)