fiatlux/firmware/web.cpp
jedi 23cb4a558b
All checks were successful
continuous-integration/drone/push Build is passing
Add simple static webserver
2021-07-19 21:26:10 +02:00

35 lines
No EOL
579 B
C++

//
// Created by jedi on 25.06.21.
//
#include "web.h"
#include "system.h"
#include "lux.h"
#include "wifi.h"
#include <cstring>
#include <FreeRTOS.h>
#include <task.h>
extern "C" {
#include <sysparam.h>
#include <lwipopts.h>
}
#include <espressif/esp_common.h>
#include <lwip/tcp.h>
extern "C" {
#include <httpd/httpd.h>
}
extern "C" [[noreturn]] void httpd_task(void *pvParameters) {
while(!uxSemaphoreGetCount( wifi_available_semaphore ))
vTaskDelay(500 / portTICK_PERIOD_MS);
httpd_init();
for (;;)
vTaskDelay(500 / portTICK_PERIOD_MS);
}