#pragma once

#include <stdbool.h>

/**
 * Configures the back-photo button GPIO (CONFIG_FRAME_BACK_BUTTON_GPIO,
 * active-low with internal pull-up) and arms it as a deep-sleep wakeup
 * source, same as next_button_init(). Call once, early in app_main(),
 * before the device might enter deep sleep.
 *
 * A no-op if CONFIG_FRAME_BACK_BUTTON_GPIO is negative (button disabled).
 */
void back_button_init(void);

/**
 * Returns whether the back-photo button is currently held, debounced with
 * a couple of short re-checks to reject noise. Same immediate-response
 * reasoning as the next-photo button -- no long hold-to-confirm gate.
 */
bool back_button_check(void);
