Skip to content

Commit 529e28f

Browse files
committed
Fix T1000E press=high
1 parent a2c0b3e commit 529e28f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

variants/t1000-e/T1000eBoard.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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();

variants/t1000-e/platformio.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)