Pressing the manage button (GPIO1) overlays a small QR code -- "SCAN TO MANAGE" -- in the top-right corner of whatever photo is currently on screen, linking to the server's config page, then reverts to the plain photo after 30 seconds. The overlay is spliced into the existing streaming fetch as chunks pass through (frame_client.c's http_read_fn), rather than buffering the full 192,000-byte frame in RAM: only the small overlay rectangle itself (~30KB) is ever held in memory, generated via new stride-parameterized drawing helpers (epd_draw_*_ex in epd_draw.c) that let the existing QR/text drawing code target an arbitrarily-sized buffer instead of a full-frame one. epd7in3e.c is untouched -- it has no idea an overlay exists.
22 lines
737 B
C
22 lines
737 B
C
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
|
|
/**
|
|
* 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);
|