File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ class T1000eBoard : public NRF52BoardDCDC {
4343 uint8_t v = digitalRead (BUTTON_PIN);
4444 if (v != btn_prev_state) {
4545 btn_prev_state = v;
46- return (v == LOW ) ? 1 : -1 ;
46+ return (v == USER_BTN_PRESSED ) ? 1 : -1 ;
4747 }
4848 #endif
4949 return 0 ;
@@ -78,14 +78,14 @@ class T1000eBoard : public NRF52BoardDCDC {
7878 digitalWrite (LED_PIN, HIGH);
7979 #endif
8080 #ifdef BUTTON_PIN
81- while (digitalRead (BUTTON_PIN) == LOW );
81+ while (digitalRead (BUTTON_PIN));
8282 #endif
8383 #ifdef LED_PIN
8484 digitalWrite (LED_PIN, LOW);
8585 #endif
8686
8787 #ifdef BUTTON_PIN
88- nrf_gpio_cfg_sense_input (BUTTON_PIN, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_SENSE_LOW );
88+ nrf_gpio_cfg_sense_input (BUTTON_PIN, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_SENSE_HIGH );
8989 #endif
9090
9191 sd_power_system_off ();
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ build_flags = ${nrf52_base.build_flags}
1010 -I src/helpers/ui
1111 -D T1000_E
1212 -D PIN_USER_BTN =6
13+ -D USER_BTN_PRESSED =HIGH
1314 -D PIN_STATUS_LED =24
1415 -D RADIO_CLASS =CustomLR1110
1516 -D WRAPPER_CLASS =CustomLR1110Wrapper
You can’t perform that action at this time.
0 commit comments