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 3
3
4
4
extern crate panic_rtt_target;
5
5
6
- use heapless:: {
7
- consts:: U8 ,
8
- spsc,
9
- } ;
6
+ use heapless:: { consts:: U8 , spsc} ;
10
7
use nb:: block;
11
- use rtt_target:: {
12
- rprint,
13
- rprintln,
14
- } ;
8
+ use rtt_target:: { rprint, rprintln} ;
15
9
use stm32l4xx_hal:: {
10
+ pac:: { self , USART2 } ,
16
11
prelude:: * ,
17
- pac:: {
18
- self ,
19
- USART2 ,
20
- } ,
21
- serial:: {
22
- self ,
23
- Config ,
24
- Serial ,
25
- } ,
12
+ serial:: { self , Config , Serial } ,
26
13
} ;
27
14
28
15
#[ rtic:: app( device = stm32l4xx_hal:: pac) ]
@@ -37,8 +24,7 @@ const APP: () = {
37
24
38
25
#[ init]
39
26
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 ( ) ) ;
42
28
43
29
rtt_target:: rtt_init_print!( ) ;
44
30
rprint ! ( "Initializing... " ) ;
@@ -59,8 +45,7 @@ const APP: () = {
59
45
let mut serial = Serial :: usart2 (
60
46
p. USART2 ,
61
47
( tx_pin, rx_pin) ,
62
- Config :: default ( )
63
- . baudrate ( 115_200 . bps ( ) ) ,
48
+ Config :: default ( ) . baudrate ( 115_200 . bps ( ) ) ,
64
49
clocks,
65
50
& mut rcc. apb1r1 ,
66
51
) ;
You can’t perform that action at this time.
0 commit comments