diff options
Diffstat (limited to 'keyboards/ergodox_infinity/ergodox_infinity.c')
| -rw-r--r-- | keyboards/ergodox_infinity/ergodox_infinity.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/keyboards/ergodox_infinity/ergodox_infinity.c b/keyboards/ergodox_infinity/ergodox_infinity.c index 8f5b068a7..d2a311ee8 100644 --- a/keyboards/ergodox_infinity/ergodox_infinity.c +++ b/keyboards/ergodox_infinity/ergodox_infinity.c | |||
| @@ -4,9 +4,6 @@ | |||
| 4 | #include <string.h> | 4 | #include <string.h> |
| 5 | #include "eeconfig.h" | 5 | #include "eeconfig.h" |
| 6 | #include "serial_link/system/serial_link.h" | 6 | #include "serial_link/system/serial_link.h" |
| 7 | #ifdef VISUALIZER_ENABLE | ||
| 8 | # include "lcd_backlight.h" | ||
| 9 | #endif | ||
| 10 | 7 | ||
| 11 | #define RED_PIN 1 | 8 | #define RED_PIN 1 |
| 12 | #define GREEN_PIN 2 | 9 | #define GREEN_PIN 2 |
| @@ -87,11 +84,7 @@ static uint16_t cie_lightness(uint16_t v) { | |||
| 87 | return y * 65535.0f; | 84 | return y * 65535.0f; |
| 88 | } | 85 | } |
| 89 | 86 | ||
| 90 | #ifdef VISUALIZER_ENABLE | ||
| 91 | void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b) { | ||
| 92 | #else | ||
| 93 | void ergodox_infinity_lcd_color(uint16_t r, uint16_t g, uint16_t b) { | 87 | void ergodox_infinity_lcd_color(uint16_t r, uint16_t g, uint16_t b) { |
| 94 | #endif | ||
| 95 | CHANNEL_RED.CnV = cie_lightness(r); | 88 | CHANNEL_RED.CnV = cie_lightness(r); |
| 96 | CHANNEL_GREEN.CnV = cie_lightness(g); | 89 | CHANNEL_GREEN.CnV = cie_lightness(g); |
| 97 | CHANNEL_BLUE.CnV = cie_lightness(b); | 90 | CHANNEL_BLUE.CnV = cie_lightness(b); |
| @@ -108,12 +101,10 @@ void keyboard_pre_init_kb() { | |||
| 108 | setPinOutput(B16); | 101 | setPinOutput(B16); |
| 109 | writePinHigh(B16); | 102 | writePinHigh(B16); |
| 110 | #endif | 103 | #endif |
| 111 | #ifndef VISUALIZER_ENABLE | ||
| 112 | // The backlight always has to be initialized, otherwise it will stay lit | 104 | // The backlight always has to be initialized, otherwise it will stay lit |
| 113 | lcd_backlight_hal_init(); | 105 | lcd_backlight_hal_init(); |
| 114 | # ifdef ST7565_ENABLE | 106 | #ifdef ST7565_ENABLE |
| 115 | ergodox_infinity_lcd_color(UINT16_MAX / 2, UINT16_MAX / 2, UINT16_MAX / 2); | 107 | ergodox_infinity_lcd_color(UINT16_MAX / 2, UINT16_MAX / 2, UINT16_MAX / 2); |
| 116 | # endif | ||
| 117 | #endif | 108 | #endif |
| 118 | keyboard_pre_init_user(); | 109 | keyboard_pre_init_user(); |
| 119 | } | 110 | } |
