blob: f1e48767be9a655ae20b5b5f69c577f497618d75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#pragma once
#include <stdbool.h>
#include "esp_err.h"
// Initialize the local-screen renderer. Allocates a PSRAM scratch buffer
// sized for the panel's effective resolution and primes the embedded
// bitmap font.
esp_err_t local_screens_init(void);
// Render the identity / "who am I" screen — four centered lines:
// <viewport name> ("viewport" if unconfigured)
// viewport-<name>.local (mDNS hostname)
// <current IP> ("no network" if no DHCP lease)
// <state> ("awake" / "asleep" / "unconfigured")
// Font scale is auto-picked to fit the longest line within 90% of width.
// Shown on first boot, after factory reset, and as a 15s BOOT-button overlay.
esp_err_t local_screens_show_ip(void);
// Render the loading screen — centered "Loading…" — shown on every wake
// until the next /frame arrives.
esp_err_t local_screens_show_loading(void);
// Show the identity ("who am I") screen for `duration_ms`, then drop the
// backlight off. Used by the BOOT button short-press (any state) and by
// the touch handler when the device is unconfigured.
esp_err_t local_screens_overlay(uint32_t duration_ms);
// True while the identity overlay is currently shown (timer armed).
// Used by the touch handler to make a second tap dismiss the overlay
// instead of re-arming it.
bool local_screens_overlay_active(void);
// Dismiss the overlay now: cancel the timer and drop the backlight.
void local_screens_overlay_dismiss(void);
|