Remove LED_DRIVERS_ENABLED.

This commit is contained in:
László Monda
2018-04-28 11:43:01 +02:00
parent 9d66f5ff76
commit c2582729f2
6 changed files with 2 additions and 15 deletions

View File

@@ -4,7 +4,6 @@
// Macros:
#define I2C_WATCHDOG
#define LED_DRIVERS_ENABLED
// #define LED_DRIVER_STRESS_TEST
#endif

View File

@@ -144,10 +144,10 @@ parser_error_t ParseConfig(config_buffer_t *buffer)
IconsAndLayerTextsBrightness = iconsAndLayerTextsBrightness;
AlphanumericSegmentsBrightness = alphanumericSegmentsBrightness;
KeyBacklightBrightness = keyBacklightBrightness;
#ifdef LED_DRIVERS_ENABLED
Slaves[SlaveId_LeftLedDriver].isConnected = false;
Slaves[SlaveId_RightLedDriver].isConnected = false;
#endif
// Update mouse key speeds
MouseMoveState.initialSpeed = mouseMoveInitialSpeed;

View File

@@ -265,10 +265,8 @@ status_t UhkModuleSlaveDriver_Update(uint8_t uhkModuleDriverId)
void UhkModuleSlaveDriver_Disconnect(uint8_t uhkModuleDriverId)
{
#ifdef LED_DRIVERS_ENABLED
if (uhkModuleDriverId == SlaveId_LeftKeyboardHalf) {
Slaves[SlaveId_LeftLedDriver].isConnected = false;
}
UhkModuleStates[uhkModuleDriverId].moduleId = 0;
#endif
}

View File

@@ -31,7 +31,6 @@ uhk_slave_t Slaves[] = {
.update = UhkModuleSlaveDriver_Update,
.perDriverId = UhkModuleDriverId_RightAddon,
},
#ifdef LED_DRIVERS_ENABLED
{
.init = LedSlaveDriver_Init,
.update = LedSlaveDriver_Update,
@@ -42,7 +41,6 @@ uhk_slave_t Slaves[] = {
.update = LedSlaveDriver_Update,
.perDriverId = LedDriverId_Left,
},
#endif
{
.init = KbootSlaveDriver_Init,
.update = KbootSlaveDriver_Update,

View File

@@ -19,10 +19,8 @@
SlaveId_LeftKeyboardHalf,
SlaveId_LeftAddon,
SlaveId_RightAddon,
#ifdef LED_DRIVERS_ENABLED
SlaveId_RightLedDriver,
SlaveId_LeftLedDriver,
#endif
SlaveId_KbootDriver,
} slave_id_t;

View File

@@ -164,10 +164,8 @@ static usb_device_class_config_list_struct_t UsbDeviceCompositeConfigList = {
}};
static bool isHostSleeping = false;
#ifdef LED_DRIVERS_ENABLED
static uint8_t oldKeyBacklightBrightness = 0xFF;
static bool capsLockOn = false, agentOn = false, adaptiveOn = false;
#endif
bool IsHostSleeping(void) {
return isHostSleeping;
@@ -175,7 +173,6 @@ bool IsHostSleeping(void) {
static void suspendHost(void) {
isHostSleeping = true;
#ifdef LED_DRIVERS_ENABLED
// Save the state of the icons
capsLockOn = LedDisplay_GetIcon(LedDisplayIcon_CapsLock);
agentOn = LedDisplay_GetIcon(LedDisplayIcon_Agent);
@@ -192,7 +189,6 @@ static void suspendHost(void) {
// Clear the text
LedDisplay_SetText(0, NULL);
#endif
}
void WakeUpHost(bool sendResume) {
@@ -203,7 +199,6 @@ void WakeUpHost(bool sendResume) {
isHostSleeping = false; // The computer is now awake
#ifdef LED_DRIVERS_ENABLED
// Restore keyboard backlight and text
KeyBacklightBrightness = oldKeyBacklightBrightness;
LedSlaveDriver_Init(LedDriverId_Right);
@@ -216,7 +211,6 @@ void WakeUpHost(bool sendResume) {
LedDisplay_SetIcon(LedDisplayIcon_CapsLock, capsLockOn);
LedDisplay_SetIcon(LedDisplayIcon_Agent, agentOn);
LedDisplay_SetIcon(LedDisplayIcon_Adaptive, adaptiveOn);
#endif
}
static usb_status_t usbDeviceCallback(usb_device_handle handle, uint32_t event, void *param)