File tree Expand file tree Collapse file tree 1 file changed +6
-21
lines changed
Expand file tree Collapse file tree 1 file changed +6
-21
lines changed Original file line number Diff line number Diff line change 33
44extern crate panic_rtt_target;
55
6- use heapless:: {
7- consts:: U8 ,
8- spsc,
9- } ;
6+ use heapless:: { consts:: U8 , spsc} ;
107use nb:: block;
11- use rtt_target:: {
12- rprint,
13- rprintln,
14- } ;
8+ use rtt_target:: { rprint, rprintln} ;
159use stm32l4xx_hal:: {
10+ pac:: { self , USART2 } ,
1611 prelude:: * ,
17- pac:: {
18- self ,
19- USART2 ,
20- } ,
21- serial:: {
22- self ,
23- Config ,
24- Serial ,
25- } ,
12+ serial:: { self , Config , Serial } ,
2613} ;
2714
2815#[ rtic:: app( device = stm32l4xx_hal:: pac) ]
@@ -37,8 +24,7 @@ const APP: () = {
3724
3825 #[ init]
3926 fn init ( _: init:: Context ) -> init:: LateResources {
40- static mut RX_QUEUE : spsc:: Queue < u8 , U8 > =
41- spsc:: Queue ( heapless:: i:: Queue :: new ( ) ) ;
27+ static mut RX_QUEUE : spsc:: Queue < u8 , U8 > = spsc:: Queue ( heapless:: i:: Queue :: new ( ) ) ;
4228
4329 rtt_target:: rtt_init_print!( ) ;
4430 rprint ! ( "Initializing... " ) ;
@@ -59,8 +45,7 @@ const APP: () = {
5945 let mut serial = Serial :: usart2 (
6046 p. USART2 ,
6147 ( tx_pin, rx_pin) ,
62- Config :: default ( )
63- . baudrate ( 115_200 . bps ( ) ) ,
48+ Config :: default ( ) . baudrate ( 115_200 . bps ( ) ) ,
6449 clocks,
6550 & mut rcc. apb1r1 ,
6651 ) ;
You can’t perform that action at this time.
0 commit comments