fix: mutex FreeRTOS buffer historique, découplage LittleFS/REST
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+10
-5
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/semphr.h>
|
||||
|
||||
// ── Constantes matérielles ──────────────────────────────────────────
|
||||
#define ONE_WIRE_BUS 4 // GPIO 4 — bus OneWire DS18B20
|
||||
@@ -57,8 +59,11 @@ struct NetworkStatus {
|
||||
};
|
||||
|
||||
// ── Déclarations extern (définies dans main.cpp) ────────────────────
|
||||
extern SondeConfig sondesConfig[NB_SONDES];
|
||||
extern SondeEtat sondesEtat[NB_SONDES];
|
||||
extern PointHistorique historique[HIST_TAILLE];
|
||||
extern uint16_t histIdx;
|
||||
extern NetworkStatus netStatus;
|
||||
extern SondeConfig sondesConfig[NB_SONDES];
|
||||
extern SondeEtat sondesEtat[NB_SONDES];
|
||||
extern PointHistorique historique[HIST_TAILLE];
|
||||
extern uint16_t histIdx;
|
||||
extern NetworkStatus netStatus;
|
||||
// Mutex FreeRTOS protégeant l'accès concurrent au buffer historique
|
||||
// (Core 0 : callbacks AsyncWebServer vs Core 1 : loop/sensors_update)
|
||||
extern SemaphoreHandle_t xHistMutex;
|
||||
|
||||
Reference in New Issue
Block a user