LoboMQ
Loading...
Searching...
No Matches
BrokerSDUtils.h
Go to the documentation of this file.
1
9#ifndef BROKERSDUTILS_H
10
11#define BROKERSDUTILS_H
12
13#include <array>
14#include <freertos/FreeRTOS.h>
15#include <freertos/semphr.h>
16#include <FS.h>
17#include <vector>
18
19#include <ArduinoJson.h>
20
21#include "commons/Includes.h"
22#include "BrokerTopic.h"
23
24#define FILE_PATH "/LoboMQ/topics" //must not end with "/"
25#define FILE_FORMAT ".json"
26
27String replaceChars(const char *str);
28bool initializeSDCard(int csPin, Elog *logger, SemaphoreHandle_t *mutex, TickType_t delay = portMAX_DELAY);
29void restoreBTs(std::vector<BrokerTopic> *topicsVector, Elog *logger, SemaphoreHandle_t *mutex,
30 TickType_t delay = portMAX_DELAY);
31void writeBTToFile(BrokerTopic* brokerTopic, Elog* logger, SemaphoreHandle_t *mutex, TickType_t delay = portMAX_DELAY);
32void deleteBTFile(const char* filename, Elog* logger, SemaphoreHandle_t *mutex, TickType_t delay = portMAX_DELAY);
33
34#endif