forked from Makuna/NeoPixelBus
disconnect mux pin (#713)
https://github.com/Makuna/NeoPixelBus/issues/704
This commit is contained in:
@@ -169,8 +169,11 @@ public:
|
||||
yield();
|
||||
}
|
||||
|
||||
i2sSetPins(_bus.I2sBusNumber, -1, -1, -1, false);
|
||||
i2sDeinit(_bus.I2sBusNumber);
|
||||
|
||||
gpio_matrix_out(_pin, 0x100, false, false);
|
||||
pinMode(_pin, INPUT);
|
||||
|
||||
free(_data);
|
||||
heap_caps_free(_i2sBuffer);
|
||||
}
|
||||
|
@@ -442,13 +442,17 @@ public:
|
||||
i2sSetPins(T_BUS::I2sBusNumber, pin, _muxId, s_context.MuxMap.MuxBusDataSize, invert);
|
||||
}
|
||||
|
||||
void DeregisterMuxBus()
|
||||
void DeregisterMuxBus(uint8_t pin)
|
||||
{
|
||||
if (s_context.MuxMap.DeregisterMuxBus(_muxId))
|
||||
{
|
||||
s_context.Destruct(T_BUS::I2sBusNumber);
|
||||
}
|
||||
// disconnect muxed pin?
|
||||
|
||||
// disconnect muxed pin
|
||||
gpio_matrix_out(pin, 0x100, false, false);
|
||||
pinMode(pin, INPUT);
|
||||
|
||||
_muxId = s_context.MuxMap.InvalidMuxId;
|
||||
}
|
||||
|
||||
@@ -529,7 +533,7 @@ public:
|
||||
yield();
|
||||
}
|
||||
|
||||
_bus.DeregisterMuxBus();
|
||||
_bus.DeregisterMuxBus(_pin);
|
||||
|
||||
free(_data);
|
||||
}
|
||||
|
Reference in New Issue
Block a user