Refactor: http_portal in separate component ausgelagert
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// http_portal.h
|
||||
#pragma once
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/event_groups.h"
|
||||
#include "esp_err.h"
|
||||
|
||||
// Callbacks, die das Portal nach außen benutzt
|
||||
typedef struct {
|
||||
bool (*load_sta_creds)(char **ssid, char **pass); // optional, wenn du es später brauchst
|
||||
void (*save_sta_creds_and_reconnect)(const char *ssid, const char *pass);
|
||||
void (*save_device_info)(
|
||||
const char *devicename,
|
||||
const char *token,
|
||||
const char *bucket,
|
||||
const char *org
|
||||
);
|
||||
} portal_http_callbacks_t;
|
||||
|
||||
// HTTP-Portal starten / stoppen
|
||||
esp_err_t portal_http_start(EventGroupHandle_t wifi_events,
|
||||
EventBits_t bit_gotip,
|
||||
EventBits_t bit_fail,
|
||||
const char* ap_ssid,
|
||||
const portal_http_callbacks_t *cb);
|
||||
|
||||
void portal_http_stop(void);
|
||||
Reference in New Issue
Block a user