Skip to content

Commit 3426821

Browse files
committed
Fix some warnings
1 parent 6add5b8 commit 3426821

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/capture.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ pub trait HrCapture {
129129
/// <-------------- 0 --------------> t
130130
/// Negative result | positive result
131131
/// ```
132-
fn get_last_signed(&self, period: u16) -> i32 {
132+
fn get_last_signed(&self, #[allow(unused_variables)] period: u16) -> i32 {
133133
let (value, dir) = self.get_last();
134134

135135
// The capture counter always counts up and restarts at period
@@ -157,7 +157,7 @@ pub fn dma_value_to_dir_and_value(x: u32) -> (u16, CountingDirection) {
157157
(value, CountingDirection::Up)
158158
}
159159

160-
pub fn dma_value_to_signed(x: u32, period: u16) -> i32 {
160+
pub fn dma_value_to_signed(x: u32, #[allow(unused_variables)] period: u16) -> i32 {
161161
let (value, dir) = dma_value_to_dir_and_value(x);
162162

163163
// The capture counter always counts up and restarts at period

src/control.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::fault::{
66

77
use crate::{hal, stm32};
88
use hal::rcc::{Enable, Rcc, Reset};
9-
use stm32::{HRTIM_COMMON, RCC};
9+
use stm32::HRTIM_COMMON;
1010

1111
use super::{external_event::EevInputs, fault::FaultInputs};
1212

@@ -15,15 +15,15 @@ pub trait HrControltExt {
1515
}
1616

1717
impl HrControltExt for HRTIM_COMMON {
18-
fn hr_control(self, _rcc: &mut Rcc) -> HrTimOngoingCalibration {
18+
fn hr_control(self, #[allow(unused_variables)] rcc: &mut Rcc) -> HrTimOngoingCalibration {
1919
let common = unsafe { &*HRTIM_COMMON::ptr() };
2020

2121
unsafe {
2222
#[cfg(feature = "stm32g4")]
23-
let rcc_ptr = &*RCC::ptr();
23+
let rcc_ptr = &*stm32::RCC::ptr();
2424

2525
#[cfg(feature = "stm32f3")]
26-
let rcc_ptr = &mut *RCC::ptr();
26+
let rcc_ptr = &mut rcc.apb2;
2727

2828
<HRTIM_COMMON as Enable>::enable(rcc_ptr);
2929
<HRTIM_COMMON as Reset>::reset(rcc_ptr);

0 commit comments

Comments
 (0)