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;
20
20
use nb:: { self , Error } ;
21
21
22
22
use core:: sync:: atomic:: { AtomicU8 , Ordering } ;
23
+ use stm32:: can:: btr:: LBKM_A ;
23
24
24
25
const EXID_MASK : u32 = 0b1_1111_1111_1100_0000_0000_0000_0000 ;
25
26
const MAX_EXTENDED_ID : u32 = 0x1FFF_FFFF ;
@@ -33,7 +34,7 @@ pub struct CanOpts {
33
34
pub sjw : u8 ,
34
35
pub ts1 : u8 ,
35
36
pub ts2 : u8 ,
36
- pub lbkm : bool ,
37
+ pub lbkm : LBKM_A ,
37
38
}
38
39
39
40
impl CanOpts {
@@ -61,7 +62,7 @@ impl CanOpts {
61
62
self
62
63
}
63
64
64
- pub fn lbkm ( mut self , lbkm : bool ) -> Self {
65
+ pub fn lbkm ( mut self , lbkm : LBKM_A ) -> Self {
65
66
self . lbkm = lbkm;
66
67
self
67
68
}
@@ -74,7 +75,7 @@ impl Default for CanOpts {
74
75
sjw : 0 ,
75
76
ts1 : 10 ,
76
77
ts2 : 3 ,
77
- lbkm : false ,
78
+ lbkm : LBKM_A :: DISABLED ,
78
79
}
79
80
}
80
81
}
@@ -338,7 +339,7 @@ impl Can {
338
339
. ts2 ( )
339
340
. bits ( ts2)
340
341
. lbkm ( )
341
- . bit ( lbkm)
342
+ . variant ( lbkm)
342
343
} ) ;
343
344
344
345
// Leave initialization mode by clearing INRQ and switch to normal mode
You can’t perform that action at this time.
0 commit comments