mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Default button polarity to active-LOW across all firmware types
Nearly all LoRa boards use a boot button that pulls to ground when pressed.
This commit is contained in:
parent
fb726e48c2
commit
0a13ac7fc7
11 changed files with 27 additions and 11 deletions
|
|
@ -78,14 +78,14 @@ public:
|
|||
digitalWrite(LED_PIN, HIGH);
|
||||
#endif
|
||||
#ifdef BUTTON_PIN
|
||||
while(digitalRead(BUTTON_PIN));
|
||||
while(digitalRead(BUTTON_PIN) == LOW);
|
||||
#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_HIGH);
|
||||
nrf_gpio_cfg_sense_input(BUTTON_PIN, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_SENSE_LOW);
|
||||
#endif
|
||||
|
||||
sd_power_system_off();
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue