idf overriding method to bring back SPDIF and fix SPI + new CSPOT (which crashes)

This commit is contained in:
Philippe G
2022-01-04 00:15:33 -08:00
parent cf1315e6a4
commit 06b637c55b
43 changed files with 2955 additions and 402 deletions

View File

@@ -6,6 +6,7 @@
#include <map>
#include <memory>
#include <functional>
#include <vector>
namespace bell {
@@ -16,6 +17,7 @@ class ResponseReader {
virtual size_t getTotalSize() = 0;
virtual size_t read(char *buffer, size_t size) = 0;
virtual void close() = 0;
};
class FileResponseReader : public ResponseReader {
@@ -34,6 +36,10 @@ class FileResponseReader : public ResponseReader {
return fread(buffer, 1, size, file);
}
void close() {
fclose(file);
}
size_t getTotalSize() { return fileSize; }
};
@@ -43,6 +49,7 @@ struct HTTPRequest {
std::map<std::string, std::string> urlParams;
std::map<std::string, std::string> queryParams;
std::string body;
std::string url;
int handlerId;
int connection;
};