fiatlux/firmware/fiatlux.c
jedi 82146efb03
Some checks failed
continuous-integration/drone/push Build is failing
fetch current time via NTP
2023-02-12 12:02:51 +01:00

31 lines
694 B
C

#include <FreeRTOS.h>
#include <task.h>
#include <esp/uart.h>
#include <espressif/esp_common.h>
#include "system.h"
#include "wifi.h"
#include "web.h"
#include "mqtt.h"
#include "lux.h"
void user_init(void) {
uart_set_baud(0, 115200);
printf("SDK version: %s\n", sdk_system_get_sdk_version());
sdk_wifi_set_sleep_type(WIFI_SLEEP_MODEM);
system_init_config();
wifi_available_semaphore = xSemaphoreCreateBinary();
xTaskCreate(wifi_task, "wifi_task", 1024, NULL, 1, NULL);
xTaskCreate(&httpd_task, "httpd_task", 1024, NULL, 2, NULL);
xTaskCreate(&lux_task, "lux_task", 512, NULL, 1, NULL);
xTaskCreate(&sntp_task, "sntp_task", 512, NULL, 2, NULL);
}