Add LedDisplay_UpdateAll()

This commit is contained in:
László Monda
2018-04-28 16:21:54 +02:00
parent b97841fdae
commit 8856c484b6
6 changed files with 28 additions and 12 deletions

View File

@@ -62,6 +62,15 @@ static uint8_t setShutdownModeNormalBuffer[] = {LED_DRIVER_REGISTER_SHUTDOWN, SH
static uint8_t setFrame1Buffer[] = {LED_DRIVER_REGISTER_FRAME, LED_DRIVER_FRAME_1};
static uint8_t updatePwmRegistersBuffer[PWM_REGISTER_BUFFER_LENGTH];
void LedSlaveDriver_UpdateLedValues(void)
{
for (uint8_t ledDriverId=0; ledDriverId<=LedDriverId_Last; ledDriverId++) {
memset(LedDriverValues[ledDriverId], KeyBacklightBrightness, LED_DRIVER_LED_COUNT);
}
LedDisplay_UpdateAll();
}
void LedSlaveDriver_Init(uint8_t ledDriverId)
{
if (ledDriverId == ISO_KEY_LED_DRIVER_ID && IS_ISO) {
@@ -74,8 +83,7 @@ void LedSlaveDriver_Init(uint8_t ledDriverId)
memset(LedDriverValues[ledDriverId], KeyBacklightBrightness, LED_DRIVER_LED_COUNT);
if (ledDriverId == LedDriverId_Left) {
LedDisplay_UpdateIcons();
LedDisplay_SetCurrentKeymapText();
LedDisplay_UpdateAll();
}
}

View File

@@ -23,6 +23,7 @@
typedef enum {
LedDriverId_Right,
LedDriverId_Left,
LedDriverId_Last = LedDriverId_Left,
} led_driver_id_t;
typedef enum {
@@ -49,6 +50,7 @@
// Functions:
void LedSlaveDriver_UpdateLedValues(void);
void LedSlaveDriver_Init(uint8_t ledDriverId);
status_t LedSlaveDriver_Update(uint8_t ledDriverId);