File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ pub trait HrCapture {
129
129
/// <-------------- 0 --------------> t
130
130
/// Negative result | positive result
131
131
/// ```
132
- fn get_last_signed ( & self , period : u16 ) -> i32 {
132
+ fn get_last_signed ( & self , # [ allow ( unused_variables ) ] period : u16 ) -> i32 {
133
133
let ( value, dir) = self . get_last ( ) ;
134
134
135
135
// 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) {
157
157
( value, CountingDirection :: Up )
158
158
}
159
159
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 {
161
161
let ( value, dir) = dma_value_to_dir_and_value ( x) ;
162
162
163
163
// The capture counter always counts up and restarts at period
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ use crate::fault::{
6
6
7
7
use crate :: { hal, stm32} ;
8
8
use hal:: rcc:: { Enable , Rcc , Reset } ;
9
- use stm32:: { HRTIM_COMMON , RCC } ;
9
+ use stm32:: HRTIM_COMMON ;
10
10
11
11
use super :: { external_event:: EevInputs , fault:: FaultInputs } ;
12
12
@@ -15,15 +15,15 @@ pub trait HrControltExt {
15
15
}
16
16
17
17
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 {
19
19
let common = unsafe { & * HRTIM_COMMON :: ptr ( ) } ;
20
20
21
21
unsafe {
22
22
#[ cfg( feature = "stm32g4" ) ]
23
- let rcc_ptr = & * RCC :: ptr ( ) ;
23
+ let rcc_ptr = & * stm32 :: RCC :: ptr ( ) ;
24
24
25
25
#[ cfg( feature = "stm32f3" ) ]
26
- let rcc_ptr = & mut * RCC :: ptr ( ) ;
26
+ let rcc_ptr = & mut rcc . apb2 ;
27
27
28
28
<HRTIM_COMMON as Enable >:: enable ( rcc_ptr) ;
29
29
<HRTIM_COMMON as Reset >:: reset ( rcc_ptr) ;
You can’t perform that action at this time.
0 commit comments