upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/main/display.h
diff options
context:
space:
mode:
Diffstat (limited to 'main/display.h')
-rw-r--r--main/display.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/main/display.h b/main/display.h
new file mode 100644
index 0000000..407521b
--- /dev/null
+++ b/main/display.h
@@ -0,0 +1,27 @@
1#ifndef DISPLAY_H
2#define DISPLAY_H
3
4#include "esp_err.h"
5#include <stdint.h>
6#include <stdbool.h>
7
8typedef enum {
9 DISPLAY_BOOT,
10 DISPLAY_READY,
11 DISPLAY_PAYMENT_RECEIVED,
12 DISPLAY_ERROR
13} display_state_t;
14
15typedef enum {
16 DISPLAY_QR_WIFI,
17 DISPLAY_QR_PORTAL
18} display_qr_mode_t;
19
20esp_err_t display_init(void);
21void display_set_state(display_state_t state);
22void display_update(const char *ap_ssid, int active_clients,
23 uint64_t wallet_balance, const char *portal_url);
24void display_render_text(int x, int y, const char *text, uint16_t fg, uint16_t bg, int scale);
25void display_render_qr(const char *text);
26
27#endif