@@ -660,21 +660,21 @@ pub trait Capture {
660
660
/// NOTE that you must multiply the returned value by the *resolution* of
661
661
/// this `Capture` interface to get a human time unit (e.g. seconds)
662
662
fn capture (
663
- & self ,
663
+ & mut self ,
664
664
channel : Self :: Channel ,
665
665
) -> nb:: Result < Self :: Capture , Self :: Error > ;
666
666
667
667
/// Disables a capture `channel`
668
- fn disable ( & self , channel : Self :: Channel ) ;
668
+ fn disable ( & mut self , channel : Self :: Channel ) ;
669
669
670
670
/// Enables a capture `channel`
671
- fn enable ( & self , channel : Self :: Channel ) ;
671
+ fn enable ( & mut self , channel : Self :: Channel ) ;
672
672
673
673
/// Returns the current resolution
674
674
fn get_resolution ( & self ) -> Self :: Time ;
675
675
676
676
/// Sets the resolution of the capture timer
677
- fn set_resolution < R > ( & self , resolution : R )
677
+ fn set_resolution < R > ( & mut self , resolution : R )
678
678
where
679
679
R : Into < Self :: Time > ;
680
680
}
@@ -715,10 +715,10 @@ pub trait Pwm {
715
715
type Duty ;
716
716
717
717
/// Disables a PWM `channel`
718
- fn disable ( & self , channel : Self :: Channel ) ;
718
+ fn disable ( & mut self , channel : Self :: Channel ) ;
719
719
720
720
/// Enables a PWM `channel`
721
- fn enable ( & self , channel : Self :: Channel ) ;
721
+ fn enable ( & mut self , channel : Self :: Channel ) ;
722
722
723
723
/// Returns the current PWM period
724
724
fn get_period ( & self ) -> Self :: Time ;
@@ -730,10 +730,10 @@ pub trait Pwm {
730
730
fn get_max_duty ( & self ) -> Self :: Duty ;
731
731
732
732
/// Sets a new duty cycle
733
- fn set_duty ( & self , channel : Self :: Channel , duty : Self :: Duty ) ;
733
+ fn set_duty ( & mut self , channel : Self :: Channel , duty : Self :: Duty ) ;
734
734
735
735
/// Sets a new PWM period
736
- fn set_period < P > ( & self , period : P )
736
+ fn set_period < P > ( & mut self , period : P )
737
737
where
738
738
P : Into < Self :: Time > ;
739
739
}
@@ -805,10 +805,10 @@ pub trait Spi<Word> {
805
805
///
806
806
/// **NOTE** A word must be sent to the slave before attempting to call this
807
807
/// method.
808
- fn read ( & self ) -> nb:: Result < Word , Self :: Error > ;
808
+ fn read ( & mut self ) -> nb:: Result < Word , Self :: Error > ;
809
809
810
810
/// Sends a word to the slave
811
- fn send ( & self , word : Word ) -> nb:: Result < ( ) , Self :: Error > ;
811
+ fn send ( & mut self , word : Word ) -> nb:: Result < ( ) , Self :: Error > ;
812
812
}
813
813
814
814
/// Timer used for timeouts
@@ -837,16 +837,16 @@ pub trait Timer {
837
837
fn get_timeout ( & self ) -> Self :: Time ;
838
838
839
839
/// Pauses the timer
840
- fn pause ( & self ) ;
840
+ fn pause ( & mut self ) ;
841
841
842
842
/// Restarts the timer count to zero
843
- fn restart ( & self ) ;
843
+ fn restart ( & mut self ) ;
844
844
845
845
/// Resumes the timer count
846
- fn resume ( & self ) ;
846
+ fn resume ( & mut self ) ;
847
847
848
848
/// Sets a new timeout
849
- fn set_timeout < T > ( & self , timeout : T )
849
+ fn set_timeout < T > ( & mut self , timeout : T )
850
850
where
851
851
T : Into < Self :: Time > ;
852
852
0 commit comments