Make sure that SDB of the LED driver is pulled high before talking to it over I2C.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "slave_drivers/slave_driver_led_driver.h"
|
||||
#include "slave_scheduler.h"
|
||||
|
||||
led_driver_state_t ledDriverStates[LED_DRIVER_MAX_COUNT] = {
|
||||
{
|
||||
@@ -72,6 +73,9 @@ void LedSlaveDriver_Update(uint8_t ledDriverId) {
|
||||
|
||||
switch (*ledDriverPhase) {
|
||||
case LedDriverPhase_SetFunctionFrame:
|
||||
if (!slaves[SlaveId_LeftKeyboardHalf].isConnected) {
|
||||
break;
|
||||
}
|
||||
I2cAsyncWrite(ledDriverAddress, setFunctionFrameBuffer, sizeof(setFunctionFrameBuffer));
|
||||
*ledDriverPhase = LedDriverPhase_SetShutdownModeNormal;
|
||||
break;
|
||||
|
||||
@@ -13,6 +13,12 @@
|
||||
UhkSlaveType_Touchpad
|
||||
} uhk_slave_type_t;
|
||||
|
||||
typedef enum {
|
||||
SlaveId_LeftKeyboardHalf,
|
||||
SlaveId_RightLedDriver,
|
||||
SlaveId_LeftLedDriver,
|
||||
} slave_id_t;
|
||||
|
||||
typedef void (slave_initializer_t)(uint8_t);
|
||||
typedef void (slave_updater_t)(uint8_t);
|
||||
|
||||
@@ -23,6 +29,10 @@
|
||||
bool isConnected;
|
||||
} uhk_slave_t;
|
||||
|
||||
// Variables:
|
||||
|
||||
extern uhk_slave_t slaves[];
|
||||
|
||||
// Functions:
|
||||
|
||||
void InitSlaveScheduler();
|
||||
|
||||
Reference in New Issue
Block a user