src.nth.io/

summaryrefslogtreecommitdiff
path: root/main/local_screens.h
blob: 20b2b36e94ec991ea9cce30fa5a2a7313bb253bc (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
#pragma once

#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 unconfigured / identify screen — two centered lines:
//   "viewport.local"
//   <current IP>
// Shown on first boot, after factory reset, and as a 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);

// Repaint the current best screen for `state`. Used after the BOOT-button
// 15-second overlay expires.
//   UNCONFIGURED -> IP screen
//   ASLEEP       -> (caller handles backlight; this paints a black FB)
//   AWAKE        -> black FB; Scrypted's next /frame restores live content
esp_err_t local_screens_restore_for_state(void);