File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1313
1414#define SW0 PIN_PD2
1515
16- static bool woke_up_from_button = false ;
16+ static volatile bool woke_up_from_button = false ;
1717
1818void button_pressed_callback (void ) {
1919 if (PORTD.INTFLAGS & PIN2_bm) {
20- // Reset the interupt flag so that we can process the next incoming
20+ // Reset the interrupt flag so that we can process the next incoming
2121 // interrupt
2222 PORTD.INTFLAGS = PIN2_bm;
2323
@@ -62,7 +62,7 @@ void loop() {
6262 LowPower.powerDown (60 );
6363
6464 if (woke_up_from_button) {
65- Log.info (" Button was pressed" );
65+ Log.info (" SW0 was pressed" );
6666 woke_up_from_button = false ;
6767 }
6868
Original file line number Diff line number Diff line change 1414
1515#define SW0 PIN_PD2
1616
17- static bool woke_up_from_button = false ;
17+ static volatile bool woke_up_from_button = false ;
1818
1919void button_pressed_callback (void ) {
2020 if (PORTD.INTFLAGS & PIN2_bm) {
21- // Reset the interupt flag so that we can process the next incoming
21+ // Reset the interrupt flag so that we can process the next incoming
2222 // interrupt
2323 PORTD.INTFLAGS = PIN2_bm;
2424
@@ -90,7 +90,7 @@ void loop() {
9090 LowPower.powerSave ();
9191
9292 if (woke_up_from_button) {
93- Log.info (" Button was pressed" );
93+ Log.info (" SW0 was pressed" );
9494 woke_up_from_button = false ;
9595 }
9696
You can’t perform that action at this time.
0 commit comments