Add uhk_slave_t.disconnect() callback so that upon disconnecting the left keyboard half, the left LED driver IC can be marked as disconnected too, so it'll be reinitialized upon reconnect. This usually didn't happen because LED states are cached so the LED drivers are rarely spoken to.
This commit is contained in:
@@ -141,3 +141,10 @@ status_t UhkModuleSlaveDriver_Update(uint8_t uhkModuleDriverId)
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
void UhkModuleSlaveDriver_Disconnect(uint8_t uhkModuleDriverId)
|
||||
{
|
||||
if (uhkModuleDriverId == SlaveId_LeftKeyboardHalf) {
|
||||
Slaves[SlaveId_LeftLedDriver].isConnected = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user