Added Pin Manager

This commit is contained in:
cschwinne
2020-11-15 12:41:51 +01:00
parent aa8c587ac8
commit 0c73ecf6a8
9 changed files with 1790 additions and 1722 deletions

View File

@@ -147,6 +147,22 @@ void setCronixie();
void _overlayCronixie();
void _drawOverlayCronixie();
//pin_manager.cpp
class PinManagerClass {
private:
#ifdef ESP8266
uint8_t pinAlloc[3] = {0x00, 0x00, 0x00}; //24bit, 1 bit per pin, we use first 17bits
#else
uint8_t pinAlloc[5] = {0x00, 0x00, 0x00, 0x00, 0x00}; //40bit, 1 bit per pin, we use all bits
#endif
public:
void deallocatePin(byte gpio);
bool allocatePin(byte gpio, bool output = true);
bool isPinAllocated(byte gpio);
bool isPinOk(byte gpio, bool output = true);
};
//playlist.cpp
void loadPlaylist(JsonObject playlistObject);
void handlePlaylist();