Default button polarity to active-LOW across all firmware types#1612
Default button polarity to active-LOW across all firmware types#1612weebl2000 wants to merge 2 commits intomeshcore-dev:devfrom
Conversation
|
When you say "nearly all LoRa boards..." which boards do not pull to ground when the button pressed? What would happen to those boards if this PR is merged? |
8342496 to
34eca3a
Compare
All devices as far as I can tell, just went through the datasheets. Except T1000-E that is genuinely high. MinewSemi being high was a bug AFAIK. |
|
Thanks for checking. T1000-E has been a problem child but with a lot of effort from the community it is finally working. Sure don't want to break its button functionality. thanks. |
Add default USER_BTN_PRESSED=LOW to NRF52Board.h and convert all remaining hardcoded LOW comparisons in board files to use the macro, complementing the changes in PR meshcore-dev#1612.
c2582e2 to
529e28f
Compare
762b0ec to
76da59a
Compare
Got my hand on a t1000e, and the button works fine with this PR. |
76da59a to
67dd884
Compare
Nearly all LoRa boards use a boot button that pulls to ground when pressed.
67dd884 to
0575426
Compare
Nearly all LoRa boards use a boot button that pulls to ground when pressed. The T1000-E is the one exception — it uses a capacitive touch button that is active-HIGH (confirmed by Meshtastic's
BUTTON_ACTIVE_LOW false).Changes:
USER_BTN_PRESSEDtoLOWwhere not already defined (ESP32Board.h, UITask.cpp, XiaoNrf52Board.h)LOWbutton checks withUSER_BTN_PRESSEDin UITask and board filesUSER_BTN_PRESSED=HIGHwithNRF_GPIO_PIN_SENSE_HIGH— changed to active-LOW withSENSE_LOWUSER_BTN_PRESSED=LOW(now the default)USER_BTN_PRESSED=HIGHandSENSE_HIGH(correct for this hardware), but fixbuttonStateChanged()to useUSER_BTN_PRESSEDinstead of hardcodedLOWI found out when I was working on #1347 — it was actually releasing the boot button that would trigger the wakeup, not the pressing.
Build firmware: Build from this branch