Skip to content

Commit 60c9263

Browse files
committed
Expose capture, pwm and qei modules only for consistency
1 parent 39f215e commit 60c9263

File tree

5 files changed

+11
-17
lines changed

5 files changed

+11
-17
lines changed

src/capture.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ use nb;
3838
/// # impl U32Ext for u32 { fn ms(self) -> MilliSeconds { MilliSeconds(self) } }
3939
/// # struct Capture1;
4040
/// # enum Channel { _1 }
41-
/// # impl hal::Capture for Capture1 {
41+
/// # impl hal::capture::Capture for Capture1 {
4242
/// # type Error = Infallible;
4343
/// # type Capture = u16;
4444
/// # type Channel = Channel;

src/lib.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -688,20 +688,14 @@ extern crate nb;
688688

689689
pub mod adc;
690690
pub mod blocking;
691+
pub mod capture;
691692
pub mod digital;
692693
pub mod fmt;
693694
pub mod prelude;
695+
pub mod pwm;
696+
pub mod qei;
694697
pub mod rng;
695698
pub mod serial;
696699
pub mod spi;
697700
pub mod timer;
698701
pub mod watchdog;
699-
700-
mod capture;
701-
pub use capture::Capture;
702-
703-
mod pwm;
704-
pub use pwm::{Pwm, PwmPin};
705-
706-
mod qei;
707-
pub use qei::{Direction, Qei};

src/prelude.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ pub use crate::blocking::serial::Write as _embedded_hal_blocking_serial_Write;
1515
pub use crate::blocking::spi::{
1616
Transfer as _embedded_hal_blocking_spi_Transfer, Write as _embedded_hal_blocking_spi_Write,
1717
};
18+
pub use crate::capture::Capture as _embedded_hal_Capture;
1819
pub use crate::digital::InputPin as _embedded_hal_digital_InputPin;
1920
pub use crate::digital::OutputPin as _embedded_hal_digital_OutputPin;
2021
pub use crate::digital::ToggleableOutputPin as _embedded_hal_digital_ToggleableOutputPin;
22+
pub use crate::pwm::Pwm as _embedded_hal_Pwm;
23+
pub use crate::pwm::PwmPin as _embedded_hal_PwmPin;
24+
pub use crate::qei::Qei as _embedded_hal_Qei;
2125
pub use crate::rng::Read as _embedded_hal_rng_Read;
2226
pub use crate::serial::Read as _embedded_hal_serial_Read;
2327
pub use crate::serial::Write as _embedded_hal_serial_Write;
@@ -26,7 +30,3 @@ pub use crate::timer::CountDown as _embedded_hal_timer_CountDown;
2630
pub use crate::watchdog::Watchdog as _embedded_hal_watchdog_Watchdog;
2731
pub use crate::watchdog::WatchdogDisable as _embedded_hal_watchdog_WatchdogDisable;
2832
pub use crate::watchdog::WatchdogEnable as _embedded_hal_watchdog_WatchdogEnable;
29-
pub use crate::Capture as _embedded_hal_Capture;
30-
pub use crate::Pwm as _embedded_hal_Pwm;
31-
pub use crate::PwmPin as _embedded_hal_PwmPin;
32-
pub use crate::Qei as _embedded_hal_Qei;

src/pwm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
/// # impl U32Ext for u32 { fn khz(self) -> KiloHertz { KiloHertz(self) } }
3535
/// # enum Channel { _1, _2 }
3636
/// # struct Pwm1;
37-
/// # impl hal::Pwm for Pwm1 {
37+
/// # impl hal::pwm::Pwm for Pwm1 {
3838
/// # type Error = Infallible;
3939
/// # type Channel = Channel;
4040
/// # type Time = KiloHertz;

src/qei.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@
3838
/// # trait U32Ext { fn s(self) -> Seconds; }
3939
/// # impl U32Ext for u32 { fn s(self) -> Seconds { Seconds(self) } }
4040
/// # struct Qei1;
41-
/// # impl hal::Qei for Qei1 {
41+
/// # impl hal::qei::Qei for Qei1 {
4242
/// # type Error = Infallible;
4343
/// # type Count = u16;
4444
/// # fn try_count(&self) -> Result<u16, Self::Error> { Ok(0) }
45-
/// # fn try_direction(&self) -> Result<::hal::Direction, Self::Error> { unimplemented!() }
45+
/// # fn try_direction(&self) -> Result<::hal::qei::Direction, Self::Error> { unimplemented!() }
4646
/// # }
4747
/// # struct Timer6;
4848
/// # impl hal::timer::CountDown for Timer6 {

0 commit comments

Comments
 (0)