Inline SetLeds()

This commit is contained in:
László Monda
2017-09-29 01:27:34 +02:00
parent 67c4b413b4
commit 76a80c3090
2 changed files with 1 additions and 9 deletions

View File

@@ -64,7 +64,7 @@ void LedSlaveDriver_Init(uint8_t ledDriverId) {
currentLedDriverState->phase = LedDriverPhase_SetFunctionFrame; currentLedDriverState->phase = LedDriverPhase_SetFunctionFrame;
currentLedDriverState->ledIndex = 0; currentLedDriverState->ledIndex = 0;
LedDriverStates[LedDriverId_Left].setupLedControlRegistersCommand[7] |= 0b00000010; // Enable the LED of the ISO key. LedDriverStates[LedDriverId_Left].setupLedControlRegistersCommand[7] |= 0b00000010; // Enable the LED of the ISO key.
SetLeds(0xff); memset(LedDriverStates[ledDriverId].sourceLedValues, 0xff, LED_DRIVER_LED_COUNT);
LedDisplay_SetText(3, "ABC"); LedDisplay_SetText(3, "ABC");
} }
@@ -157,10 +157,3 @@ status_t LedSlaveDriver_Update(uint8_t ledDriverId) {
return status; return status;
} }
void SetLeds(uint8_t ledBrightness)
{
for (uint8_t i=0; i<LED_DRIVER_MAX_COUNT; i++) {
memset(&LedDriverStates[i].sourceLedValues, ledBrightness, LED_DRIVER_LED_COUNT);
}
}

View File

@@ -47,6 +47,5 @@
void LedSlaveDriver_Init(uint8_t ledDriverId); void LedSlaveDriver_Init(uint8_t ledDriverId);
status_t LedSlaveDriver_Update(uint8_t ledDriverId); status_t LedSlaveDriver_Update(uint8_t ledDriverId);
void SetLeds(uint8_t ledBrightness);
#endif #endif