Debug conditional compile in pin manager.

This commit is contained in:
Blaz Kristan
2021-09-04 16:45:08 +02:00
parent 4e8c94fd2d
commit f84e2c2ac7
2 changed files with 17 additions and 3 deletions

View File

@@ -7,8 +7,8 @@
#include "const.h" // for USERMOD_* values
typedef struct PinManagerPinType {
int8_t pin;
uint8_t isOutput;
int8_t pin;
bool isOutput;
} managed_pin_type;
/*
@@ -87,7 +87,9 @@ class PinManagerClass {
#endif
inline void deallocatePin(byte gpio) { deallocatePin(gpio, PinOwner::None); }
// will return true for reserved pins
bool isPinAllocated(byte gpio, PinOwner tag = PinOwner::None);
// will return false for reserved pins
bool isPinOk(byte gpio, bool output = true);
#ifdef ARDUINO_ARCH_ESP32