Added Pin Manager
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user