File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
rtic_v1/stm32l4_heartbeat/src Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 33#![ no_main]
44#![ no_std]
55
6- use heapless:: Vec ;
76use panic_rtt_target as _;
87use rtic:: app;
98use rtt_target:: { rprintln, rtt_init_print} ;
@@ -21,7 +20,7 @@ mod app {
2120 #[ local]
2221 struct Local {
2322 led : PB3 < Output < PushPull > > ,
24- intervals : Vec < u32 , 6 > ,
23+ intervals : [ u32 ; 6 ] ,
2524 }
2625
2726 #[ monotonic( binds = SysTick , default = true ) ]
@@ -48,13 +47,14 @@ mod app {
4847 led. set_low ( ) ;
4948
5049 // Simple heart beat LED on/off sequence
51- let mut intervals: Vec < u32 , 6 > = Vec :: new ( ) ;
52- intervals. push ( 30 ) . unwrap ( ) ; // P Wave
53- intervals. push ( 40 ) . unwrap ( ) ; // PR Segment
54- intervals. push ( 120 ) . unwrap ( ) ; // QRS Complex
55- intervals. push ( 30 ) . unwrap ( ) ; // ST Segment
56- intervals. push ( 60 ) . unwrap ( ) ; // T Wave
57- intervals. push ( 720 ) . unwrap ( ) ; // Rest
50+ let intervals: [ u32 ; 6 ] = [
51+ 30 , // P Wave
52+ 40 , // PR Segment
53+ 120 , // QRS Complex
54+ 30 , // ST Segment
55+ 60 , // T Wave
56+ 720 , // Rest
57+ ] ;
5858
5959 // Schedule the blinking task
6060 blink:: spawn ( 0 ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments