diff options
Diffstat (limited to 'main/display.h')
| -rw-r--r-- | main/display.h | 27 |
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 | |||
| 8 | typedef enum { | ||
| 9 | DISPLAY_BOOT, | ||
| 10 | DISPLAY_READY, | ||
| 11 | DISPLAY_PAYMENT_RECEIVED, | ||
| 12 | DISPLAY_ERROR | ||
| 13 | } display_state_t; | ||
| 14 | |||
| 15 | typedef enum { | ||
| 16 | DISPLAY_QR_WIFI, | ||
| 17 | DISPLAY_QR_PORTAL | ||
| 18 | } display_qr_mode_t; | ||
| 19 | |||
| 20 | esp_err_t display_init(void); | ||
| 21 | void display_set_state(display_state_t state); | ||
| 22 | void display_update(const char *ap_ssid, int active_clients, | ||
| 23 | uint64_t wallet_balance, const char *portal_url); | ||
| 24 | void display_render_text(int x, int y, const char *text, uint16_t fg, uint16_t bg, int scale); | ||
| 25 | void display_render_qr(const char *text); | ||
| 26 | |||
| 27 | #endif | ||