Added sleep mode for VS1053, HTTP server, tar upload, JSON status, RFID card removal debouncing, ...
This commit is contained in:
28
include/http_server.h
Normal file
28
include/http_server.h
Normal file
@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
#include <ESP8266WebServer.h>
|
||||
#include "spi_master.h"
|
||||
#include "player.h"
|
||||
#include "controller.h"
|
||||
#include <SD.h>
|
||||
#include <WiFiClient.h>
|
||||
#include <ESP8266WiFi.h>
|
||||
#include <ESP8266mDNS.h>
|
||||
|
||||
class HTTPServer {
|
||||
private:
|
||||
ESP8266WebServer* _http_server;
|
||||
void _handle_upload();
|
||||
uint16_t _chunk_length;
|
||||
uint8_t* _chunk;
|
||||
uint32_t _file_size;
|
||||
uint32_t _file_size_done;
|
||||
bool _need_header;
|
||||
uint32_t _upload_position;
|
||||
void _handle_index();
|
||||
void _handle_status();
|
||||
Player* _player;
|
||||
Controller* _controller;
|
||||
public:
|
||||
HTTPServer(Player* p, Controller* c);
|
||||
void loop();
|
||||
};
|
Reference in New Issue
Block a user