22//!
33//! **NOTE** This HAL is still is active development. Expect the traits presented here to be
44//! tweaked, split or be replaced wholesale before being stabilized, i.e. before hitting the 1.0.0
5- //! release. That being said there's a part of the HAL that's currently considered unproven and is
6- //! hidden behind an "unproven" Cargo feature. This API is even more volatile and it's exempt from
7- //! semver rules: it can change in a non-backward compatible fashion or even disappear in between
8- //! patch releases.
5+ //! release.
96//!
107//! # Design goals
118//!
@@ -702,8 +699,6 @@ pub mod watchdog;
702699
703700/// Input capture
704701///
705- /// *This trait is available if embedded-hal is built with the `"unproven"` feature.*
706- ///
707702/// # Examples
708703///
709704/// You can use this interface to measure the period of (quasi) periodic signals
@@ -742,17 +737,15 @@ pub mod watchdog;
742737/// # type Error = Infallible;
743738/// # type Capture = u16;
744739/// # type Channel = Channel;
745- /// # type Error = Infallible;
746740/// # type Time = MilliSeconds;
747741/// # fn try_capture(&mut self, _: Channel) -> ::nb::Result<u16, Self::Error> { Ok(0) }
748742/// # fn try_disable(&mut self, _: Channel) -> Result<(), Self::Error> { unimplemented!() }
749743/// # fn try_enable(&mut self, _: Channel) -> Result<(), Self::Error> { unimplemented!() }
750744/// # fn try_get_resolution(&self) -> Result<MilliSeconds, Self::Error> { unimplemented!() }
751- /// # fn try_set_resolution<T>(&mut self, _: T) -> Result<(), Self::Error> where T: Into<MilliSeconds> {}
745+ /// # fn try_set_resolution<T>(&mut self, _: T) -> Result<(), Self::Error> where T: Into<MilliSeconds> { Ok(()) }
752746/// # }
753747/// ```
754- #[ cfg( feature = "unproven" ) ]
755- // reason: pre-singletons API. With singletons a `CapturePin` (cf. `PwmPin`) trait seems more
748+ // unproven reason: pre-singletons API. With singletons a `CapturePin` (cf. `PwmPin`) trait seems more
756749// appropriate
757750pub trait Capture {
758751 /// Enumeration of `Capture` errors
@@ -799,8 +792,6 @@ pub trait Capture {
799792
800793/// Pulse Width Modulation
801794///
802- /// *This trait is available if embedded-hal is built with the `"unproven"` feature.*
803- ///
804795/// # Examples
805796///
806797/// Use this interface to control the power output of some actuator
@@ -841,14 +832,13 @@ pub trait Capture {
841832/// # fn try_disable(&mut self, _: Channel) -> Result<(), Self::Error> { unimplemented!() }
842833/// # fn try_enable(&mut self, _: Channel) -> Result<(), Self::Error> { unimplemented!() }
843834/// # fn try_get_duty(&self, _: Channel) -> Result<u16, Self::Error> { unimplemented!() }
844- /// # fn try_get_max_duty(&self) -> Result<u16, Self::Error> { 0 }
845- /// # fn try_set_duty(&mut self, _: Channel, _: u16) -> Result<(), Self::Error> {}
835+ /// # fn try_get_max_duty(&self) -> Result<u16, Self::Error> { Ok(0) }
836+ /// # fn try_set_duty(&mut self, _: Channel, _: u16) -> Result<(), Self::Error> { Ok(()) }
846837/// # fn try_get_period(&self) -> Result<KiloHertz, Self::Error> { unimplemented!() }
847- /// # fn try_set_period<T>(&mut self, _: T) -> Result<(), Self::Error> where T: Into<KiloHertz> {}
838+ /// # fn try_set_period<T>(&mut self, _: T) -> Result<(), Self::Error> where T: Into<KiloHertz> { Ok(()) }
848839/// # }
849840/// ```
850- #[ cfg( feature = "unproven" ) ]
851- // reason: pre-singletons API. The `PwmPin` trait seems more useful because it models independent
841+ // unproven reason: pre-singletons API. The `PwmPin` trait seems more useful because it models independent
852842// PWM channels. Here a certain number of channels are multiplexed in a single implementer.
853843pub trait Pwm {
854844 /// Enumeration of `Pwm` errors
@@ -925,8 +915,6 @@ pub trait PwmPin {
925915
926916/// Quadrature encoder interface
927917///
928- /// *This trait is available if embedded-hal is built with the `"unproven"` feature.*
929- ///
930918/// # Examples
931919///
932920/// You can use this interface to measure the speed of a motor
@@ -971,13 +959,13 @@ pub trait PwmPin {
971959/// # }
972960/// # struct Timer6;
973961/// # impl hal::timer::CountDown for Timer6 {
962+ /// # type Error = Infallible;
974963/// # type Time = Seconds;
975964/// # fn try_start<T>(&mut self, _: T) -> Result<(), Infallible> where T: Into<Seconds> { Ok(()) }
976965/// # fn try_wait(&mut self) -> ::nb::Result<(), Infallible> { Ok(()) }
977966/// # }
978967/// ```
979- #[ cfg( feature = "unproven" ) ]
980- // reason: needs to be re-evaluated in the new singletons world. At the very least this needs a
968+ // unproven reason: needs to be re-evaluated in the new singletons world. At the very least this needs a
981969// reference implementation
982970pub trait Qei {
983971 /// Enumeration of `Qei` errors
@@ -994,11 +982,7 @@ pub trait Qei {
994982}
995983
996984/// Count direction
997- ///
998- /// *This enumeration is available if embedded-hal is built with the `"unproven"` feature.*
999985#[ derive( Clone , Copy , Debug , Eq , PartialEq ) ]
1000- #[ cfg( feature = "unproven" ) ]
1001- // reason: part of the unproven `Qei` interface
1002986pub enum Direction {
1003987 /// 3, 2, 1
1004988 Downcounting ,
0 commit comments