Add slave driver initializers to the slaves array.
This commit is contained in:
@@ -56,7 +56,7 @@ uint8_t setShutdownModeNormalBuffer[] = {LED_DRIVER_REGISTER_SHUTDOWN, SHUTDOWN_
|
||||
uint8_t setFrame1Buffer[] = {LED_DRIVER_REGISTER_FRAME, LED_DRIVER_FRAME_1};
|
||||
uint8_t updatePwmRegistersBuffer[PWM_REGISTER_BUFFER_LENGTH];
|
||||
|
||||
void LedSlaveDriver_Init() {
|
||||
void LedSlaveDriver_Init(uint8_t ledDriverId) {
|
||||
ledDriverStates[LedDriverId_Left].setupLedControlRegistersCommand[7] |= 0b00000010; // Enable the LED of the ISO key.
|
||||
SetLeds(0xff);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
// Functions:
|
||||
|
||||
extern void LedSlaveDriver_Init();
|
||||
extern void LedSlaveDriver_Init(uint8_t ledDriverId);
|
||||
extern void LedSlaveDriver_Update(uint8_t ledDriverId);
|
||||
extern void SetLeds(uint8_t ledBrightness);
|
||||
|
||||
|
||||
@@ -13,13 +13,11 @@ uhk_module_phase_t uhkModulePhase = UhkModulePhase_SendKeystatesRequestCommand;
|
||||
uint8_t txBuffer[2];
|
||||
uint8_t rxBuffer[KEY_STATE_BUFFER_SIZE];
|
||||
|
||||
void UhkModuleSlaveDriver_Init()
|
||||
void UhkModuleSlaveDriver_Init(uint8_t uhkModuleId)
|
||||
{
|
||||
for (uint8_t moduleId=0; moduleId<UHK_MODULE_MAX_COUNT; moduleId++) {
|
||||
uhk_module_state_t* uhkModuleState = UhkModuleStates + moduleId;
|
||||
uhkModuleState->isTestLedOn = true;
|
||||
uhkModuleState->ledPwmBrightness = 0x64;
|
||||
}
|
||||
uhk_module_state_t* uhkModuleState = UhkModuleStates + uhkModuleId;
|
||||
uhkModuleState->isTestLedOn = true;
|
||||
uhkModuleState->ledPwmBrightness = 0x64;
|
||||
}
|
||||
|
||||
void UhkModuleSlaveDriver_Update(uint8_t uhkModuleId)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
// Functions:
|
||||
|
||||
extern void UhkModuleSlaveDriver_Init();
|
||||
extern void UhkModuleSlaveDriver_Init(uint8_t uhkModuleId);
|
||||
extern void UhkModuleSlaveDriver_Update(uint8_t uhkModuleId);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user