@@ -55,7 +55,7 @@ mod app {
5555 use super :: { enqueue_frame, PriorityFrame } ;
5656 use bxcan:: { filter:: Mask32 , ExtendedId , Fifo , Frame , Interrupts , Rx0 , StandardId , Tx } ;
5757 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:: * } ;
5959
6060 #[ local]
6161 struct Local {
@@ -86,17 +86,12 @@ mod app {
8686 let gpioa = cx. device . GPIOA . split ( ) ;
8787 let can_rx_pin = gpioa. pa11 ;
8888 let can_tx_pin = gpioa. pa12 ;
89- let mut afio = cx. device . AFIO . constrain ( ) ;
9089
9190 #[ 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) ) ;
9792
9893 #[ 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) ) ;
10095
10196 // APB1 (PCLK1): 16MHz, Bit rate: 1000kBit/s, Sample Point 87.5%
10297 // Value was calculated with http://www.bittiming.can-wiki.info/
0 commit comments