upleb.uk

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

summaryrefslogtreecommitdiff
path: root/main/config.h
diff options
context:
space:
mode:
authorYour Name <you@example.com>2026-05-15 13:06:25 +0530
committerYour Name <you@example.com>2026-05-15 13:06:25 +0530
commit8a2307a5ced6da94cc674602219d5a68a1246264 (patch)
treefe622a9960434fc3a42d3d1aa2ba748d804118fa /main/config.h
initiall commit
Diffstat (limited to 'main/config.h')
-rw-r--r--main/config.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/main/config.h b/main/config.h
new file mode 100644
index 0000000..d26b7ae
--- /dev/null
+++ b/main/config.h
@@ -0,0 +1,39 @@
1#ifndef CONFIG_H
2#define CONFIG_H
3
4#include "esp_err.h"
5#include "esp_wifi.h"
6
7#define TOLLGATE_MAX_WIFI_NETWORKS 5
8#define TOLLGATE_MAX_MINT_URLS 3
9#define TOLLGATE_MAX_AP_SSID_LEN 32
10#define TOLLGATE_MAX_AP_PASS_LEN 64
11
12typedef struct {
13 char ssid[32];
14 char password[64];
15} wifi_network_t;
16
17typedef struct {
18 wifi_network_t networks[TOLLGATE_MAX_WIFI_NETWORKS];
19 int network_count;
20 int current_network;
21 int max_retry;
22
23 char ap_ssid[TOLLGATE_MAX_AP_SSID_LEN];
24 char ap_password[TOLLGATE_MAX_AP_PASS_LEN];
25 uint8_t ap_channel;
26 uint8_t ap_max_conn;
27
28 char mint_url[256];
29 char lnurl_url[256];
30 int price_per_step;
31 int step_size_ms;
32} tollgate_config_t;
33
34esp_err_t tollgate_config_init(void);
35const tollgate_config_t *tollgate_config_get(void);
36esp_err_t tollgate_config_get_wifi(wifi_config_t *wifi_config);
37esp_err_t tollgate_config_get_next_wifi(wifi_config_t *wifi_config);
38
39#endif