File tree 1 file changed +0
-27
lines changed
1 file changed +0
-27
lines changed Original file line number Diff line number Diff line change @@ -321,33 +321,6 @@ where
321
321
self . instance
322
322
}
323
323
324
- /// Configure bit timings and silent/loop-back mode.
325
- ///
326
- /// Acutal configuration happens on the `CanConfig` that is passed to the
327
- /// closure. It must be done this way because those configuration bits can
328
- /// only be set if the CAN controller is in a special init mode.
329
- /// Puts the peripheral in sleep mode afterwards. `Can::enable()` must be
330
- /// called to exit sleep mode and start reception and transmission.
331
- pub fn configure < F > ( & mut self , f : F )
332
- where
333
- F : FnOnce ( & mut CanConfig < I > ) ,
334
- {
335
- let can = self . registers ( ) ;
336
-
337
- // Enter init mode.
338
- can. mcr
339
- . modify ( |_, w| w. sleep ( ) . clear_bit ( ) . inrq ( ) . set_bit ( ) ) ;
340
- loop {
341
- let msr = can. msr . read ( ) ;
342
- if msr. slak ( ) . bit_is_clear ( ) && msr. inak ( ) . bit_is_set ( ) {
343
- break ;
344
- }
345
- }
346
-
347
- let mut config = CanConfig { _can : PhantomData } ;
348
- f ( & mut config) ;
349
- }
350
-
351
324
/// Configure bit timings and silent/loop-back mode.
352
325
pub fn modify_config ( & mut self ) -> CanConfig < ' _ , I > {
353
326
let can = self . registers ( ) ;
You can’t perform that action at this time.
0 commit comments