File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -893,26 +893,29 @@ pub trait Pwm {
893
893
///
894
894
/// See `Pwm` for details
895
895
pub trait PwmPin {
896
+ /// Enumeration of `PwmPin` errors
897
+ type Error ;
898
+
896
899
/// Type for the `duty` methods
897
900
///
898
901
/// The implementer is free to choose a float / percentage representation
899
902
/// (e.g. `0.0 .. 1.0`) or an integer representation (e.g. `0 .. 65535`)
900
903
type Duty ;
901
904
902
905
/// Disables a PWM `channel`
903
- fn disable ( & mut self ) ;
906
+ fn disable ( & mut self ) -> Result < ( ) , Self :: Error > ;
904
907
905
908
/// Enables a PWM `channel`
906
- fn enable ( & mut self ) ;
909
+ fn enable ( & mut self ) -> Result < ( ) , Self :: Error > ;
907
910
908
911
/// Returns the current duty cycle
909
- fn get_duty ( & self ) -> Self :: Duty ;
912
+ fn get_duty ( & self ) -> Result < Self :: Duty , Self :: Error > ;
910
913
911
914
/// Returns the maximum duty cycle value
912
- fn get_max_duty ( & self ) -> Self :: Duty ;
915
+ fn get_max_duty ( & self ) -> Result < Self :: Duty , Self :: Error > ;
913
916
914
917
/// Sets a new duty cycle
915
- fn set_duty ( & mut self , duty : Self :: Duty ) ;
918
+ fn set_duty ( & mut self , duty : Self :: Duty ) -> Result < ( ) , Self :: Error > ;
916
919
}
917
920
918
921
/// Quadrature encoder interface
You can’t perform that action at this time.
0 commit comments