#pragma once #include /** * Configures the "manage" button GPIO (CONFIG_FRAME_MANAGE_BUTTON_GPIO, * active-low with internal pull-up) and arms it as a deep-sleep wakeup * source, same as reset_button_init()/next_button_init(). Call once, * early in app_main(), before the device might enter deep sleep. * * A no-op if CONFIG_FRAME_MANAGE_BUTTON_GPIO is negative (button disabled). */ void manage_button_init(void); /** * Returns whether the manage button is currently held, debounced with a * couple of short re-checks to reject noise. Like the next-photo button, * there's no long hold-to-confirm gate -- showing the management QR is * low-stakes and should feel immediate. */ bool manage_button_check(void); /** * Bare, undebounced "is the pin low right now" read -- unlike * manage_button_check(), this doesn't consult the latched deep-sleep * wakeup status (only meaningful once, immediately after waking from * sleep) and isn't meant to detect what woke the device. Used for * polling for a subsequent press while already awake and the manage * overlay is up (see frame_client.c's wait_for_button_press()), which * does its own debounce/release-wait around repeated calls to this. */ bool manage_button_is_pressed(void);