Return if pinallocation fails

This commit is contained in:
Will Tatam
2025-07-06 16:05:09 +01:00
parent 9c38843747
commit f9a6a3d36f

View File

@@ -896,7 +896,10 @@ BusHub75Matrix::BusHub75Matrix(const BusConfig &bc) : Bus(bc.type, bc.start, bc.
int8_t pins[PIN_COUNT];
memcpy(pins, &mxconfig.gpio, sizeof(mxconfig.gpio));
PinManager::allocateMultiplePins(pins, PIN_COUNT, PinOwner::HUB75, true);
if (!PinManager::allocateMultiplePins(pins, PIN_COUNT, PinOwner::HUB75, true)) {
DEBUGBUS_PRINTLN("Failed to allocate pins for HUB75");
return;
}
if(bc.colorOrder == COL_ORDER_RGB) {
DEBUGBUS_PRINTLN("MatrixPanel_I2S_DMA = Default color order (RGB)");