diff --git a/right/src/config.h b/right/src/config.h index ef6b6b5..f5d3291 100644 --- a/right/src/config.h +++ b/right/src/config.h @@ -4,7 +4,6 @@ // Macros: #define I2C_WATCHDOG - #define LED_DRIVERS_ENABLED // #define LED_DRIVER_STRESS_TEST #endif diff --git a/right/src/config_parser/parse_config.c b/right/src/config_parser/parse_config.c index f4bdbf0..32f4af0 100644 --- a/right/src/config_parser/parse_config.c +++ b/right/src/config_parser/parse_config.c @@ -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; diff --git a/right/src/slave_drivers/uhk_module_driver.c b/right/src/slave_drivers/uhk_module_driver.c index bda1fc5..b4d071c 100644 --- a/right/src/slave_drivers/uhk_module_driver.c +++ b/right/src/slave_drivers/uhk_module_driver.c @@ -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 } diff --git a/right/src/slave_scheduler.c b/right/src/slave_scheduler.c index d02bbfa..0042126 100644 --- a/right/src/slave_scheduler.c +++ b/right/src/slave_scheduler.c @@ -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, diff --git a/right/src/slave_scheduler.h b/right/src/slave_scheduler.h index e58b488..73608fc 100644 --- a/right/src/slave_scheduler.h +++ b/right/src/slave_scheduler.h @@ -19,10 +19,8 @@ SlaveId_LeftKeyboardHalf, SlaveId_LeftAddon, SlaveId_RightAddon, -#ifdef LED_DRIVERS_ENABLED SlaveId_RightLedDriver, SlaveId_LeftLedDriver, -#endif SlaveId_KbootDriver, } slave_id_t; diff --git a/right/src/usb_composite_device.c b/right/src/usb_composite_device.c index 4bf92a0..e20ef72 100644 --- a/right/src/usb_composite_device.c +++ b/right/src/usb_composite_device.c @@ -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)