Remove LED_DRIVERS_ENABLED.
This commit is contained in:
@@ -4,7 +4,6 @@
|
|||||||
// Macros:
|
// Macros:
|
||||||
|
|
||||||
#define I2C_WATCHDOG
|
#define I2C_WATCHDOG
|
||||||
#define LED_DRIVERS_ENABLED
|
|
||||||
// #define LED_DRIVER_STRESS_TEST
|
// #define LED_DRIVER_STRESS_TEST
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -144,10 +144,10 @@ parser_error_t ParseConfig(config_buffer_t *buffer)
|
|||||||
IconsAndLayerTextsBrightness = iconsAndLayerTextsBrightness;
|
IconsAndLayerTextsBrightness = iconsAndLayerTextsBrightness;
|
||||||
AlphanumericSegmentsBrightness = alphanumericSegmentsBrightness;
|
AlphanumericSegmentsBrightness = alphanumericSegmentsBrightness;
|
||||||
KeyBacklightBrightness = keyBacklightBrightness;
|
KeyBacklightBrightness = keyBacklightBrightness;
|
||||||
#ifdef LED_DRIVERS_ENABLED
|
|
||||||
Slaves[SlaveId_LeftLedDriver].isConnected = false;
|
Slaves[SlaveId_LeftLedDriver].isConnected = false;
|
||||||
Slaves[SlaveId_RightLedDriver].isConnected = false;
|
Slaves[SlaveId_RightLedDriver].isConnected = false;
|
||||||
#endif
|
|
||||||
// Update mouse key speeds
|
// Update mouse key speeds
|
||||||
|
|
||||||
MouseMoveState.initialSpeed = mouseMoveInitialSpeed;
|
MouseMoveState.initialSpeed = mouseMoveInitialSpeed;
|
||||||
|
|||||||
@@ -265,10 +265,8 @@ status_t UhkModuleSlaveDriver_Update(uint8_t uhkModuleDriverId)
|
|||||||
|
|
||||||
void UhkModuleSlaveDriver_Disconnect(uint8_t uhkModuleDriverId)
|
void UhkModuleSlaveDriver_Disconnect(uint8_t uhkModuleDriverId)
|
||||||
{
|
{
|
||||||
#ifdef LED_DRIVERS_ENABLED
|
|
||||||
if (uhkModuleDriverId == SlaveId_LeftKeyboardHalf) {
|
if (uhkModuleDriverId == SlaveId_LeftKeyboardHalf) {
|
||||||
Slaves[SlaveId_LeftLedDriver].isConnected = false;
|
Slaves[SlaveId_LeftLedDriver].isConnected = false;
|
||||||
}
|
}
|
||||||
UhkModuleStates[uhkModuleDriverId].moduleId = 0;
|
UhkModuleStates[uhkModuleDriverId].moduleId = 0;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ uhk_slave_t Slaves[] = {
|
|||||||
.update = UhkModuleSlaveDriver_Update,
|
.update = UhkModuleSlaveDriver_Update,
|
||||||
.perDriverId = UhkModuleDriverId_RightAddon,
|
.perDriverId = UhkModuleDriverId_RightAddon,
|
||||||
},
|
},
|
||||||
#ifdef LED_DRIVERS_ENABLED
|
|
||||||
{
|
{
|
||||||
.init = LedSlaveDriver_Init,
|
.init = LedSlaveDriver_Init,
|
||||||
.update = LedSlaveDriver_Update,
|
.update = LedSlaveDriver_Update,
|
||||||
@@ -42,7 +41,6 @@ uhk_slave_t Slaves[] = {
|
|||||||
.update = LedSlaveDriver_Update,
|
.update = LedSlaveDriver_Update,
|
||||||
.perDriverId = LedDriverId_Left,
|
.perDriverId = LedDriverId_Left,
|
||||||
},
|
},
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
.init = KbootSlaveDriver_Init,
|
.init = KbootSlaveDriver_Init,
|
||||||
.update = KbootSlaveDriver_Update,
|
.update = KbootSlaveDriver_Update,
|
||||||
|
|||||||
@@ -19,10 +19,8 @@
|
|||||||
SlaveId_LeftKeyboardHalf,
|
SlaveId_LeftKeyboardHalf,
|
||||||
SlaveId_LeftAddon,
|
SlaveId_LeftAddon,
|
||||||
SlaveId_RightAddon,
|
SlaveId_RightAddon,
|
||||||
#ifdef LED_DRIVERS_ENABLED
|
|
||||||
SlaveId_RightLedDriver,
|
SlaveId_RightLedDriver,
|
||||||
SlaveId_LeftLedDriver,
|
SlaveId_LeftLedDriver,
|
||||||
#endif
|
|
||||||
SlaveId_KbootDriver,
|
SlaveId_KbootDriver,
|
||||||
} slave_id_t;
|
} slave_id_t;
|
||||||
|
|
||||||
|
|||||||
@@ -164,10 +164,8 @@ static usb_device_class_config_list_struct_t UsbDeviceCompositeConfigList = {
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
static bool isHostSleeping = false;
|
static bool isHostSleeping = false;
|
||||||
#ifdef LED_DRIVERS_ENABLED
|
|
||||||
static uint8_t oldKeyBacklightBrightness = 0xFF;
|
static uint8_t oldKeyBacklightBrightness = 0xFF;
|
||||||
static bool capsLockOn = false, agentOn = false, adaptiveOn = false;
|
static bool capsLockOn = false, agentOn = false, adaptiveOn = false;
|
||||||
#endif
|
|
||||||
|
|
||||||
bool IsHostSleeping(void) {
|
bool IsHostSleeping(void) {
|
||||||
return isHostSleeping;
|
return isHostSleeping;
|
||||||
@@ -175,7 +173,6 @@ bool IsHostSleeping(void) {
|
|||||||
|
|
||||||
static void suspendHost(void) {
|
static void suspendHost(void) {
|
||||||
isHostSleeping = true;
|
isHostSleeping = true;
|
||||||
#ifdef LED_DRIVERS_ENABLED
|
|
||||||
// Save the state of the icons
|
// Save the state of the icons
|
||||||
capsLockOn = LedDisplay_GetIcon(LedDisplayIcon_CapsLock);
|
capsLockOn = LedDisplay_GetIcon(LedDisplayIcon_CapsLock);
|
||||||
agentOn = LedDisplay_GetIcon(LedDisplayIcon_Agent);
|
agentOn = LedDisplay_GetIcon(LedDisplayIcon_Agent);
|
||||||
@@ -192,7 +189,6 @@ static void suspendHost(void) {
|
|||||||
|
|
||||||
// Clear the text
|
// Clear the text
|
||||||
LedDisplay_SetText(0, NULL);
|
LedDisplay_SetText(0, NULL);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WakeUpHost(bool sendResume) {
|
void WakeUpHost(bool sendResume) {
|
||||||
@@ -203,7 +199,6 @@ void WakeUpHost(bool sendResume) {
|
|||||||
|
|
||||||
isHostSleeping = false; // The computer is now awake
|
isHostSleeping = false; // The computer is now awake
|
||||||
|
|
||||||
#ifdef LED_DRIVERS_ENABLED
|
|
||||||
// Restore keyboard backlight and text
|
// Restore keyboard backlight and text
|
||||||
KeyBacklightBrightness = oldKeyBacklightBrightness;
|
KeyBacklightBrightness = oldKeyBacklightBrightness;
|
||||||
LedSlaveDriver_Init(LedDriverId_Right);
|
LedSlaveDriver_Init(LedDriverId_Right);
|
||||||
@@ -216,7 +211,6 @@ void WakeUpHost(bool sendResume) {
|
|||||||
LedDisplay_SetIcon(LedDisplayIcon_CapsLock, capsLockOn);
|
LedDisplay_SetIcon(LedDisplayIcon_CapsLock, capsLockOn);
|
||||||
LedDisplay_SetIcon(LedDisplayIcon_Agent, agentOn);
|
LedDisplay_SetIcon(LedDisplayIcon_Agent, agentOn);
|
||||||
LedDisplay_SetIcon(LedDisplayIcon_Adaptive, adaptiveOn);
|
LedDisplay_SetIcon(LedDisplayIcon_Adaptive, adaptiveOn);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static usb_status_t usbDeviceCallback(usb_device_handle handle, uint32_t event, void *param)
|
static usb_status_t usbDeviceCallback(usb_device_handle handle, uint32_t event, void *param)
|
||||||
|
|||||||
Reference in New Issue
Block a user