Swap BusHub75Matrix to use allocateMultiplePins

This commit is contained in:
Will Tatam
2024-09-22 12:59:29 +01:00
parent ad402adf7a
commit 23e578bfbf
3 changed files with 19 additions and 41 deletions

View File

@@ -157,6 +157,12 @@ bool PinManagerClass::allocateMultiplePins(const managed_pin_type * mptArray, by
return true;
}
bool PinManagerClass::allocateMultiplePins(const int8_t * mptArray, byte arrayElementCount, PinOwner tag, boolean output) {
PinManagerPinType pins[arrayElementCount];
for (int i=0; i<arrayElementCount; i++) pins[i] = {mptArray[i], output};
return allocateMultiplePins(pins, arrayElementCount, tag);
}
bool PinManagerClass::allocatePin(byte gpio, bool output, PinOwner tag)
{
// HW I2C & SPI pins have to be allocated using allocateMultiplePins variant since there is always SCL/SDA pair