Skip to content

Commit 101960f

Browse files
hannobraunYatekii
authored andcommitted
Remove SaadcExt
1 parent 2d83032 commit 101960f

File tree

4 files changed

+1
-15
lines changed

4 files changed

+1
-15
lines changed

nrf52-hal-common/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ pub mod prelude {
2929

3030
pub use crate::clocks::ClocksExt;
3131
pub use crate::gpio::GpioExt;
32-
pub use crate::saadc::SaadcExt;
3332
pub use crate::spim::SpimExt;
3433
pub use crate::time::U32Ext;
3534
pub use crate::timer::TimerExt;

nrf52-hal-common/src/saadc.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
use crate::{
22
gpio::{Floating, Input},
3-
target::{saadc, SAADC},
3+
target::SAADC,
44
};
55
use core::{
66
hint::unreachable_unchecked,
7-
ops::Deref,
87
sync::atomic::{compiler_fence, Ordering::SeqCst},
98
};
109
use embedded_hal::adc::{Channel, OneShot};
@@ -19,16 +18,6 @@ pub use crate::target::saadc::{
1918
// multiple channels should work (See "scan mode" in the datasheet)
2019
// Issue: https://github.com/nrf-rs/nrf52-hal/issues/82
2120

22-
pub trait SaadcExt: Deref<Target = saadc::RegisterBlock> + Sized {
23-
fn constrain(self) -> Saadc;
24-
}
25-
26-
impl SaadcExt for SAADC {
27-
fn constrain(self) -> Saadc {
28-
Saadc::new(self, SaadcConfig::default())
29-
}
30-
}
31-
3221
pub struct Saadc(SAADC);
3322

3423
impl Saadc {

nrf52810-hal/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ pub mod prelude {
1414
pub use crate::time::U32Ext;
1515
pub use crate::timer::TimerExt;
1616
pub use crate::uarte::UarteExt;
17-
pub use crate::saadc::SaadcExt;
1817
}
1918

2019
pub use crate::clocks::Clocks;

nrf52840-hal/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ pub mod prelude {
1414
pub use crate::time::U32Ext;
1515
pub use crate::timer::TimerExt;
1616
pub use crate::uarte::UarteExt;
17-
pub use crate::saadc::SaadcExt;
1817
}
1918

2019
pub use crate::clocks::Clocks;

0 commit comments

Comments
 (0)