@@ -55,7 +55,7 @@ mod app {
55
55
use super :: { enqueue_frame, PriorityFrame } ;
56
56
use bxcan:: { filter:: Mask32 , ExtendedId , Fifo , Frame , Interrupts , Rx0 , StandardId , Tx } ;
57
57
use heapless:: binary_heap:: { BinaryHeap , Max } ;
58
- use stm32f1xx_hal:: { can:: Can , gpio :: Floating , pac:: CAN1 , prelude:: * } ;
58
+ use stm32f1xx_hal:: { can:: Can , pac:: CAN1 , prelude:: * } ;
59
59
60
60
#[ local]
61
61
struct Local {
@@ -86,17 +86,12 @@ mod app {
86
86
let gpioa = cx. device . GPIOA . split ( ) ;
87
87
let can_rx_pin = gpioa. pa11 ;
88
88
let can_tx_pin = gpioa. pa12 ;
89
- let mut afio = cx. device . AFIO . constrain ( ) ;
90
89
91
90
#[ cfg( not( feature = "connectivity" ) ) ]
92
- let can = Can :: < _ , Floating > :: new (
93
- cx. device . CAN1 ,
94
- cx. device . USB ,
95
- ( can_tx_pin, can_rx_pin, & mut afio. mapr ) ,
96
- ) ;
91
+ let can = Can :: new ( cx. device . CAN1 , cx. device . USB , ( can_tx_pin, can_rx_pin) ) ;
97
92
98
93
#[ cfg( feature = "connectivity" ) ]
99
- let can = Can :: < _ , Floating > :: new ( cx. device . CAN1 , ( can_tx_pin, can_rx_pin, & mut afio . mapr ) ) ;
94
+ let can = Can :: new ( cx. device . CAN1 , ( can_tx_pin, can_rx_pin) ) ;
100
95
101
96
// APB1 (PCLK1): 16MHz, Bit rate: 1000kBit/s, Sample Point 87.5%
102
97
// Value was calculated with http://www.bittiming.can-wiki.info/
0 commit comments