mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-23 15:15:57 +00:00
Fix T1000E press=high
This commit is contained in:
committed by
Wessel Nieboer
parent
0a13ac7fc7
commit
057542625b
@@ -43,7 +43,7 @@ public:
|
||||
uint8_t v = digitalRead(BUTTON_PIN);
|
||||
if (v != btn_prev_state) {
|
||||
btn_prev_state = v;
|
||||
return (v == LOW) ? 1 : -1;
|
||||
return (v == USER_BTN_PRESSED) ? 1 : -1;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
@@ -78,14 +78,14 @@ public:
|
||||
digitalWrite(LED_PIN, HIGH);
|
||||
#endif
|
||||
#ifdef BUTTON_PIN
|
||||
while(digitalRead(BUTTON_PIN) == LOW);
|
||||
while(digitalRead(BUTTON_PIN));
|
||||
#endif
|
||||
#ifdef LED_PIN
|
||||
digitalWrite(LED_PIN, LOW);
|
||||
#endif
|
||||
|
||||
#ifdef BUTTON_PIN
|
||||
nrf_gpio_cfg_sense_input(BUTTON_PIN, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_SENSE_LOW);
|
||||
nrf_gpio_cfg_sense_input(BUTTON_PIN, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_SENSE_HIGH);
|
||||
#endif
|
||||
|
||||
sd_power_system_off();
|
||||
|
||||
@@ -10,6 +10,7 @@ build_flags = ${nrf52_base.build_flags}
|
||||
-I src/helpers/ui
|
||||
-D T1000_E
|
||||
-D PIN_USER_BTN=6
|
||||
-D USER_BTN_PRESSED=HIGH
|
||||
-D PIN_STATUS_LED=24
|
||||
-D RADIO_CLASS=CustomLR1110
|
||||
-D WRAPPER_CLASS=CustomLR1110Wrapper
|
||||
|
||||
Reference in New Issue
Block a user