Skip to content

Commit 8a49086

Browse files
committed
Move comparator into analog
1 parent 7bf393c commit 8a49086

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

examples/comp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ extern crate cortex_m_rt as rt;
88
extern crate panic_halt;
99
extern crate stm32g0xx_hal as hal;
1010

11-
use hal::comparator::{Config, Hysteresis, RefintInput};
11+
use hal::analog::comparator::{Config, Hysteresis, RefintInput};
1212
use hal::prelude::*;
1313
use hal::stm32;
1414
use rt::entry;

examples/comp_window.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ extern crate cortex_m_rt as rt;
88
extern crate panic_halt;
99
extern crate stm32g0xx_hal as hal;
1010

11-
use hal::comparator::{self, Config, Hysteresis, RefintInput};
11+
use hal::analog::comparator::{self, Config, Hysteresis, RefintInput};
1212
use hal::prelude::*;
1313
use hal::stm32;
1414
use rt::entry;
File renamed without changes.

src/analog/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
pub mod adc;
22
#[cfg(any(feature = "stm32g071", feature = "stm32g081"))]
3+
pub mod comparator;
4+
#[cfg(any(feature = "stm32g071", feature = "stm32g081"))]
35
pub mod dac;

src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ pub use stm32g0::stm32g070 as stm32;
4545
pub use crate::stm32::interrupt;
4646

4747
pub mod analog;
48-
#[cfg(any(feature = "stm32g071", feature = "stm32g081"))]
49-
pub mod comparator;
5048
pub mod crc;
5149
pub mod delay;
5250
pub mod dma;

src/prelude.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ pub use hal::watchdog::WatchdogEnable as _;
66

77
pub use crate::analog::adc::AdcExt as _;
88
#[cfg(any(feature = "stm32g071", feature = "stm32g081"))]
9-
pub use crate::analog::dac::DacExt as _;
9+
pub use crate::analog::comparator::ComparatorExt as _;
1010
#[cfg(any(feature = "stm32g071", feature = "stm32g081"))]
11-
pub use crate::analog::dac::DacOut as _;
11+
pub use crate::analog::comparator::ComparatorSplit as _;
1212
#[cfg(any(feature = "stm32g071", feature = "stm32g081"))]
13-
pub use crate::comparator::ComparatorExt as _;
13+
pub use crate::analog::comparator::WindowComparatorExt as _;
1414
#[cfg(any(feature = "stm32g071", feature = "stm32g081"))]
15-
pub use crate::comparator::ComparatorSplit as _;
15+
pub use crate::analog::dac::DacExt as _;
1616
#[cfg(any(feature = "stm32g071", feature = "stm32g081"))]
17-
pub use crate::comparator::WindowComparatorExt as _;
17+
pub use crate::analog::dac::DacOut as _;
1818
pub use crate::crc::CrcExt as _;
1919
pub use crate::delay::DelayExt as _;
2020
// pub use crate::dma::CopyDma as _;

0 commit comments

Comments
 (0)