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);
|
uint8_t v = digitalRead(BUTTON_PIN);
|
||||||
if (v != btn_prev_state) {
|
if (v != btn_prev_state) {
|
||||||
btn_prev_state = v;
|
btn_prev_state = v;
|
||||||
return (v == LOW) ? 1 : -1;
|
return (v == USER_BTN_PRESSED) ? 1 : -1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
@@ -78,14 +78,14 @@ public:
|
|||||||
digitalWrite(LED_PIN, HIGH);
|
digitalWrite(LED_PIN, HIGH);
|
||||||
#endif
|
#endif
|
||||||
#ifdef BUTTON_PIN
|
#ifdef BUTTON_PIN
|
||||||
while(digitalRead(BUTTON_PIN) == LOW);
|
while(digitalRead(BUTTON_PIN));
|
||||||
#endif
|
#endif
|
||||||
#ifdef LED_PIN
|
#ifdef LED_PIN
|
||||||
digitalWrite(LED_PIN, LOW);
|
digitalWrite(LED_PIN, LOW);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef BUTTON_PIN
|
#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
|
#endif
|
||||||
|
|
||||||
sd_power_system_off();
|
sd_power_system_off();
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ build_flags = ${nrf52_base.build_flags}
|
|||||||
-I src/helpers/ui
|
-I src/helpers/ui
|
||||||
-D T1000_E
|
-D T1000_E
|
||||||
-D PIN_USER_BTN=6
|
-D PIN_USER_BTN=6
|
||||||
|
-D USER_BTN_PRESSED=HIGH
|
||||||
-D PIN_STATUS_LED=24
|
-D PIN_STATUS_LED=24
|
||||||
-D RADIO_CLASS=CustomLR1110
|
-D RADIO_CLASS=CustomLR1110
|
||||||
-D WRAPPER_CLASS=CustomLR1110Wrapper
|
-D WRAPPER_CLASS=CustomLR1110Wrapper
|
||||||
|
|||||||
Reference in New Issue
Block a user