blob: 407521bd754c8198f8949b82b6b219303e245220 (
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
|
#ifndef DISPLAY_H
#define DISPLAY_H
#include "esp_err.h"
#include <stdint.h>
#include <stdbool.h>
typedef enum {
DISPLAY_BOOT,
DISPLAY_READY,
DISPLAY_PAYMENT_RECEIVED,
DISPLAY_ERROR
} display_state_t;
typedef enum {
DISPLAY_QR_WIFI,
DISPLAY_QR_PORTAL
} display_qr_mode_t;
esp_err_t display_init(void);
void display_set_state(display_state_t state);
void display_update(const char *ap_ssid, int active_clients,
uint64_t wallet_balance, const char *portal_url);
void display_render_text(int x, int y, const char *text, uint16_t fg, uint16_t bg, int scale);
void display_render_qr(const char *text);
#endif
|