Skip to content

Commit

Permalink
HRTIM - Fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
usbalbin committed Nov 9, 2024
1 parent 2ff3d07 commit 0a893cc
Show file tree
Hide file tree
Showing 8 changed files with 961 additions and 39 deletions.
3 changes: 2 additions & 1 deletion src/hrtim/capture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ pub enum CountingDirection {
/// Implemented for
/// * TIM's update event
/// * EEVT1-10
/// TODO: This sould be implemeted
///
/// TODO:
/// * All neighbor timers CMP1, CPM2, OUT1_RST and OUT1_SET events
pub trait CaptureEvent<TIM, PSCL> {
const BITS: u32;
Expand Down
6 changes: 3 additions & 3 deletions src/hrtim/control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ impl HrTimCalibrated {
}
}

impl<'a> Into<&'a mut HrPwmCtrl> for &'a mut HrPwmControl {
fn into(self) -> &'a mut HrPwmCtrl {
&mut self.control
impl<'a> From<&'a mut HrPwmControl> for &'a mut HrPwmCtrl {
fn from(val: &'a mut HrPwmControl) -> Self {
&mut val.control
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/hrtim/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ pub trait EventSource<DST, PSCL> {
const BITS: u32;
}

/// Event that can be used reset the timer counter
///
/// Done:
/// * [x] Eev1-10
/// * [x] Master period
/// * [x] Master CMP1-4
/// * [x] Cmp2, Cmp4
/// * [x] Timer Update
/// * [ ] Neighbor timers compare events
/// Event that can be used reset the timer counter
pub trait TimerResetEventSource<DST, PSCL> {
const BITS: u32;
}
Loading

0 comments on commit 0a893cc

Please sign in to comment.