File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,11 @@ const APP: () = {
5050 gpiote. port ( ) . enable_interrupt ( ) ;
5151
5252 // PPI usage, channel 2 event triggers "task out" (toggle) on channel 1 (toggles led1)
53- gpiote. channel ( 1 ) . output_pin ( & led1) . task_out_polarity ( TaskOutPolarity :: Toggle ) . init_high ( ) ;
53+ gpiote
54+ . channel ( 1 )
55+ . output_pin ( & led1)
56+ . task_out_polarity ( TaskOutPolarity :: Toggle )
57+ . init_high ( ) ;
5458 gpiote. channel ( 2 ) . input_pin ( & btn2) . hi_to_lo ( false ) ;
5559 let ppi_channels = ppi:: Parts :: new ( ctx. device . PPI ) ;
5660 let mut channel0 = ppi_channels. ppi0 ;
@@ -100,8 +104,12 @@ const APP: () = {
100104 // Manually run "task out" (toggle) on channel 1 (toggles led1)
101105 ctx. resources . gpiote . channel ( 1 ) . out ( ) ;
102106 }
103- if btn3_pressed { rprintln ! ( "Button 3 was pressed!" ) ; }
104- if btn4_pressed { rprintln ! ( "Button 4 was pressed!" ) ; }
107+ if btn3_pressed {
108+ rprintln ! ( "Button 3 was pressed!" ) ;
109+ }
110+ if btn4_pressed {
111+ rprintln ! ( "Button 4 was pressed!" ) ;
112+ }
105113 }
106114
107115 extern "C" {
You can’t perform that action at this time.
0 commit comments