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:
@@ -17,11 +17,13 @@
|
||||
|
||||
typedef void (slave_init_t)(uint8_t);
|
||||
typedef status_t (slave_update_t)(uint8_t);
|
||||
typedef void (slave_disconnect_t)(uint8_t);
|
||||
|
||||
typedef struct {
|
||||
uint8_t perDriverId; // Identifies the slave instance on a per-driver basis
|
||||
slave_init_t *init;
|
||||
slave_update_t *update;
|
||||
slave_disconnect_t *disconnect;
|
||||
bool isConnected;
|
||||
} uhk_slave_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user