Use mutexes to guard the MCP

This commit is contained in:
Djuri 2023-11-13 20:02:58 +01:00
parent a3783ceffa
commit 59f9b29df3
5 changed files with 164 additions and 77 deletions

View file

@ -5,10 +5,13 @@
#include <Adafruit_MCP23X17.h>
#include <ArduinoJson.h>
#include <Preferences.h>
#include <mutex>
#include "utils.hpp"
extern Adafruit_MCP23X17 mcp;
extern Preferences preferences;
extern std::mutex mcpMutex;
const PROGMEM int SCREEN_BLOCK_HEIGHT = 0;
const PROGMEM int SCREEN_MSCW_TIME = 1;