mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-09-17 00:24:17 +00:00
add user button press to wakeup sources
This commit is contained in:
@@ -80,6 +80,30 @@
|
||||
cs-gpios = <&gpio0 8 (GPIO_ACTIVE_LOW | ESP32_GPIO_SLEEP_HOLD_EN)>;
|
||||
};
|
||||
|
||||
/*
|
||||
* The user button must wake the SoC too.
|
||||
*
|
||||
* DIO1 is not the only thing that needs to interrupt a sleeping node — a person
|
||||
* pressing the button expects the display to come on. Marking the PORT
|
||||
* wakeup-source above only enables esp_sleep_enable_gpio_wakeup(); the PIN is
|
||||
* armed separately, and until now only DIO1 got that (via patches/zephyr/0012).
|
||||
* The result was a node that woke for packets and ignored its own button: press
|
||||
* it, nothing happens, the display never lights. Reported from the field.
|
||||
*
|
||||
* GPIO_INT_WAKEUP is (1 << 6) in dt-bindings/gpio/gpio.h, so it fits the 16-bit
|
||||
* gpio_dt_flags_t and can be set here in DT rather than needing a driver patch —
|
||||
* gpio_pin_configure_dt() ORs spec->dt_flags into the flags it passes, so it
|
||||
* reaches gpio_esp32_config() and arms the wake.
|
||||
*
|
||||
* All five allowlisted boards put the USER key on the same pad (&gpio0 0 =
|
||||
* GPIO0, inside the S3's RTC-capable 0-21 range) under the same node label,
|
||||
* which is what lets this be one shared override. Re-check when allowlisting
|
||||
* a new board.
|
||||
*/
|
||||
&button0 {
|
||||
gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW | GPIO_INT_WAKEUP)>;
|
||||
};
|
||||
|
||||
/*
|
||||
* RESET is open-drain active-low against the SX1262's internal pull-up, so an
|
||||
* unheld pad going high-Z already reads as "not reset" and this is belt and
|
||||
|
||||
Reference in New Issue
Block a user