work on GPIO handler

bigfix: memory leak in GetJPGStream
This commit is contained in:
Zwer2k
2021-06-25 01:19:23 +02:00
parent d995c31b7b
commit 7b8f10a14e
29 changed files with 357 additions and 172 deletions

View File

@@ -31,19 +31,15 @@
#define __SD_USE_ONE_LINE_MODE__
#ifdef __SD_USE_ONE_LINE_MODE__
#include "server_GPIO.h"
#endif
#define BLINK_GPIO GPIO_NUM_33
static const char *TAGMAIN = "connect_wlan_main";
static const char *TAGMAIN = "main";
#define FLASH_GPIO GPIO_NUM_4
GpioHandler *gpioHandler = NULL;
bool Init_NVS_SDCard()
{
esp_err_t ret = nvs_flash_init();
@@ -53,7 +49,7 @@ bool Init_NVS_SDCard()
}
////////////////////////////////////////////////
ESP_LOGI(TAG, "Using SDMMC peripheral");
ESP_LOGI(TAGMAIN, "Using SDMMC peripheral");
sdmmc_host_t host = SDMMC_HOST_DEFAULT();
// This initializes the slot without card detect (CD) and write protect (WP) signals.
@@ -95,10 +91,10 @@ bool Init_NVS_SDCard()
if (ret != ESP_OK) {
if (ret == ESP_FAIL) {
ESP_LOGE(TAG, "Failed to mount filesystem. "
ESP_LOGE(TAGMAIN, "Failed to mount filesystem. "
"If you want the card to be formatted, set format_if_mount_failed = true.");
} else {
ESP_LOGE(TAG, "Failed to initialize the card (%s). "
ESP_LOGE(TAGMAIN, "Failed to initialize the card (%s). "
"Make sure SD card lines have pull-up resistors in place.", esp_err_to_name(ret));
}
return false;
@@ -190,7 +186,7 @@ extern "C" void app_main(void)
TickType_t xDelay;
xDelay = 2000 / portTICK_PERIOD_MS;
printf("Autoflow: sleep for : %ldms\n", (long) xDelay);
printf("main: sleep for : %ldms\n", (long) xDelay);
// LogFile.WriteToFile("Startsequence 06");
vTaskDelay( xDelay );
// LogFile.WriteToFile("Startsequence 07");
@@ -207,7 +203,7 @@ extern "C" void app_main(void)
// Camera.InitCam();
// Camera.LightOnOff(false);
xDelay = 2000 / portTICK_PERIOD_MS;
printf("Autoflow: sleep for : %ldms\n", (long) xDelay);
printf("main: sleep for : %ldms\n", (long) xDelay);
vTaskDelay( xDelay );
server = start_webserver();