1
-
2
1
#[ cfg( feature = "hrtim_v2" ) ]
3
2
use crate :: stm32:: HRTIM_TIMF ;
4
3
use crate :: {
@@ -155,13 +154,13 @@ pub trait ToHrOut<TIM>: sealed::Sealed<TIM> {
155
154
#[ cfg( feature = "stm32f3" ) ]
156
155
type Afr ;
157
156
158
- fn connect_to_hrtim ( self ,
157
+ fn connect_to_hrtim (
158
+ self ,
159
159
#[ cfg( feature = "stm32f3" ) ]
160
160
moder : & mut <Self :: GpioX as hal:: gpio:: marker:: GpioStatic >:: MODER ,
161
161
#[ cfg( feature = "stm32f3" ) ]
162
162
otyper : & mut <Self :: GpioX as hal:: gpio:: marker:: GpioStatic >:: OTYPER ,
163
- #[ cfg( feature = "stm32f3" ) ]
164
- afr : & mut Self :: Afr
163
+ #[ cfg( feature = "stm32f3" ) ] afr : & mut Self :: Afr ,
165
164
) ;
166
165
}
167
166
@@ -176,22 +175,23 @@ where
176
175
impl < TIM , PA , PB > ToHrOut < TIM > for ( PA , PB )
177
176
where
178
177
PA : ToHrOut < TIM > ,
179
- PB : ToHrOut < TIM , GpioX = PA :: GpioX , Afr = PA :: Afr > ,
178
+ PB : ToHrOut < TIM , GpioX = PA :: GpioX , Afr = PA :: Afr > ,
180
179
{
181
180
type Out < PSCL > = ( PA :: Out < PSCL > , PB :: Out < PSCL > ) ;
182
181
type GpioX = PA :: GpioX ;
183
182
type Afr = PA :: Afr ;
184
183
185
- fn connect_to_hrtim ( self ,
186
-
184
+ fn connect_to_hrtim (
185
+ self ,
186
+
187
187
moder : & mut <Self :: GpioX as hal:: gpio:: marker:: GpioStatic >:: MODER ,
188
-
188
+
189
189
otyper : & mut <Self :: GpioX as hal:: gpio:: marker:: GpioStatic >:: OTYPER ,
190
-
191
- afr : & mut Self :: Afr
190
+
191
+ afr : & mut Self :: Afr ,
192
192
) {
193
- self . 0 . connect_to_hrtim ( moder, otyper, afr) ;
194
- self . 1 . connect_to_hrtim ( moder, otyper, afr) ;
193
+ self . 0 . connect_to_hrtim ( moder, otyper, afr) ;
194
+ self . 1 . connect_to_hrtim ( moder, otyper, afr) ;
195
195
}
196
196
}
197
197
@@ -222,7 +222,7 @@ macro_rules! pins_helper {
222
222
#[ cfg( feature = "stm32f3" ) ]
223
223
type GpioX = hal:: gpio:: $GpioX;
224
224
#[ cfg( feature = "stm32f3" ) ]
225
- type Afr = <Self as hal:: gpio:: marker:: IntoAf <{ $CHY_AF} >>:: AFR ;
225
+ type Afr = <Self as hal:: gpio:: marker:: IntoAf <{ $CHY_AF } >>:: AFR ;
226
226
227
227
// Pin<Gpio, Index, Alternate<PushPull, AF>>
228
228
fn connect_to_hrtim(
@@ -231,17 +231,17 @@ macro_rules! pins_helper {
231
231
moder: & mut <Self :: GpioX as hal:: gpio:: marker:: GpioStatic >:: MODER ,
232
232
#[ cfg( feature = "stm32f3" ) ]
233
233
otyper: & mut <Self :: GpioX as hal:: gpio:: marker:: GpioStatic >:: OTYPER ,
234
- #[ cfg( feature = "stm32f3" ) ]
235
- afr: & mut Self :: Afr
234
+ #[ cfg( feature = "stm32f3" ) ] afr: & mut Self :: Afr ,
236
235
) {
237
236
#[ allow( non_snake_case, unused_variables) ]
238
237
let $GpioX = ( ) ;
239
238
240
239
#[ cfg( feature = "stm32f3" ) ]
241
- let _: $CHY<hal:: gpio:: Alternate <hal:: gpio:: PushPull , $CHY_AF>> = self . into_af_push_pull( moder, otyper, afr) ;
240
+ let _: $CHY<hal:: gpio:: Alternate <hal:: gpio:: PushPull , $CHY_AF>> =
241
+ self . into_af_push_pull( moder, otyper, afr) ;
242
242
243
243
#[ cfg( feature = "stm32g4" ) ]
244
- let _: $CHY<hal:: gpio:: Alternate <{ $CHY_AF} >> = self . into_alternate( ) ;
244
+ let _: $CHY<hal:: gpio:: Alternate <{ $CHY_AF } >> = self . into_alternate( ) ;
245
245
}
246
246
}
247
247
} ;
@@ -276,14 +276,15 @@ impl<T> ToHrOut<T> for () {
276
276
#[ cfg( feature = "stm32f3" ) ]
277
277
type Afr = ( ) ;
278
278
279
- fn connect_to_hrtim ( self ,
279
+ fn connect_to_hrtim (
280
+ self ,
280
281
#[ cfg( feature = "stm32f3" ) ]
281
282
_moder : & mut <Self :: GpioX as hal:: gpio:: marker:: GpioStatic >:: MODER ,
282
283
#[ cfg( feature = "stm32f3" ) ]
283
284
_otyper : & mut <Self :: GpioX as hal:: gpio:: marker:: GpioStatic >:: OTYPER ,
284
- #[ cfg( feature = "stm32f3" ) ]
285
- _afr : & mut Self :: Afr
286
- ) { }
285
+ #[ cfg( feature = "stm32f3" ) ] _afr : & mut Self :: Afr ,
286
+ ) {
287
+ }
287
288
}
288
289
289
290
pub struct CH1 < PSCL > ( PhantomData < PSCL > ) ;
0 commit comments