Добавляем системный класс прослойку для доступа к GPIO при помощи плат расширения портов

This commit is contained in:
2022-02-14 18:33:52 +03:00
parent da845b7ecb
commit 5c8221f86f
8 changed files with 96 additions and 2 deletions

View File

@@ -1,4 +1,7 @@
#include "ESPConfiguration.h"
#include "classes/IoTGpio.h"
extern IoTGpio IoTgpio;
std::vector<IoTItem*> IoTItems;
void* getAPI(String subtype, String params);
@@ -19,6 +22,8 @@ void configure(String path) {
} else {
myIoTItem = (IoTItem*)getAPI(subtype, jsonArrayElement);
if (myIoTItem) {
IoTGpio* tmp = myIoTItem->getGpioDriver();
if (tmp) IoTgpio.regDriver(tmp);
IoTItems.push_back(myIoTItem);
}
}