File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ use crate::stm32;
2020use nb:: { self , Error } ;
2121
2222use core:: sync:: atomic:: { AtomicU8 , Ordering } ;
23+ use stm32:: can:: btr:: LBKM_A ;
2324
2425const EXID_MASK : u32 = 0b1_1111_1111_1100_0000_0000_0000_0000 ;
2526const MAX_EXTENDED_ID : u32 = 0x1FFF_FFFF ;
@@ -33,7 +34,7 @@ pub struct CanOpts {
3334 pub sjw : u8 ,
3435 pub ts1 : u8 ,
3536 pub ts2 : u8 ,
36- pub lbkm : bool ,
37+ pub lbkm : LBKM_A ,
3738}
3839
3940impl CanOpts {
@@ -61,7 +62,7 @@ impl CanOpts {
6162 self
6263 }
6364
64- pub fn lbkm ( mut self , lbkm : bool ) -> Self {
65+ pub fn lbkm ( mut self , lbkm : LBKM_A ) -> Self {
6566 self . lbkm = lbkm;
6667 self
6768 }
@@ -74,7 +75,7 @@ impl Default for CanOpts {
7475 sjw : 0 ,
7576 ts1 : 10 ,
7677 ts2 : 3 ,
77- lbkm : false ,
78+ lbkm : LBKM_A :: DISABLED ,
7879 }
7980 }
8081}
@@ -338,7 +339,7 @@ impl Can {
338339 . ts2 ( )
339340 . bits ( ts2)
340341 . lbkm ( )
341- . bit ( lbkm)
342+ . variant ( lbkm)
342343 } ) ;
343344
344345 // Leave initialization mode by clearing INRQ and switch to normal mode
You can’t perform that action at this time.
0 commit comments