diff --git a/keyboards/boardsource/equals/48/info.json b/keyboards/boardsource/equals/48/info.json index 63561f4c59..054779f6fe 100644 --- a/keyboards/boardsource/equals/48/info.json +++ b/keyboards/boardsource/equals/48/info.json @@ -14,53 +14,6 @@ "pin": "GP21" }, "rgb_matrix": { - "driver": "ws2812", - "max_brightness": 150, - "animations": { - "alphas_mods": true, - "band_pinwheel_sat": true, - "band_pinwheel_val": true, - "band_sat": true, - "band_spiral_sat": true, - "band_spiral_val": true, - "band_val": true, - "breathing": true, - "cycle_all": true, - "cycle_left_right": true, - "cycle_out_in": true, - "cycle_out_in_dual": true, - "cycle_pinwheel": true, - "cycle_spiral": true, - "cycle_up_down": true, - "digital_rain": true, - "dual_beacon": true, - "gradient_left_right": true, - "gradient_up_down": true, - "hue_breathing": true, - "hue_pendulum": true, - "hue_wave": true, - "jellybean_raindrops": true, - "multisplash": true, - "pixel_flow": true, - "pixel_fractal": true, - "pixel_rain": true, - "rainbow_beacon": true, - "rainbow_moving_chevron": true, - "rainbow_pinwheels": true, - "raindrops": true, - "solid_multisplash": true, - "solid_reactive": true, - "solid_reactive_cross": true, - "solid_reactive_multicross": true, - "solid_reactive_multinexus": true, - "solid_reactive_multiwide": true, - "solid_reactive_nexus": true, - "solid_reactive_simple": true, - "solid_reactive_wide": true, - "solid_splash": true, - "splash": true, - "typing_heatmap": true - }, "layout": [ { "flags": 2, "x": 220, "y": 17 }, { "flags": 2, "x": 172, "y": 17 }, diff --git a/keyboards/boardsource/equals/60/info.json b/keyboards/boardsource/equals/60/info.json index 355e434b4e..da3fc3691a 100644 --- a/keyboards/boardsource/equals/60/info.json +++ b/keyboards/boardsource/equals/60/info.json @@ -14,53 +14,6 @@ "pin": "GP21" }, "rgb_matrix": { - "driver": "ws2812", - "max_brightness": 150, - "animations": { - "alphas_mods": true, - "band_pinwheel_sat": true, - "band_pinwheel_val": true, - "band_sat": true, - "band_spiral_sat": true, - "band_spiral_val": true, - "band_val": true, - "breathing": true, - "cycle_all": true, - "cycle_left_right": true, - "cycle_out_in": true, - "cycle_out_in_dual": true, - "cycle_pinwheel": true, - "cycle_spiral": true, - "cycle_up_down": true, - "digital_rain": true, - "dual_beacon": true, - "gradient_left_right": true, - "gradient_up_down": true, - "hue_breathing": true, - "hue_pendulum": true, - "hue_wave": true, - "jellybean_raindrops": true, - "multisplash": true, - "pixel_flow": true, - "pixel_fractal": true, - "pixel_rain": true, - "rainbow_beacon": true, - "rainbow_moving_chevron": true, - "rainbow_pinwheels": true, - "raindrops": true, - "solid_multisplash": true, - "solid_reactive": true, - "solid_reactive_cross": true, - "solid_reactive_multicross": true, - "solid_reactive_multinexus": true, - "solid_reactive_multiwide": true, - "solid_reactive_nexus": true, - "solid_reactive_simple": true, - "solid_reactive_wide": true, - "solid_splash": true, - "splash": true, - "typing_heatmap": true - }, "layout": [ { "flags": 2, "x": 220, "y": 17 }, { "flags": 2, "x": 172, "y": 17 }, diff --git a/keyboards/boardsource/equals/avr/info.json b/keyboards/boardsource/equals/avr/info.json index bbade34e63..942feba4ec 100644 --- a/keyboards/boardsource/equals/avr/info.json +++ b/keyboards/boardsource/equals/avr/info.json @@ -13,53 +13,6 @@ "pin": "C6" }, "rgb_matrix": { - "driver": "ws2812", - "max_brightness": 150, - "animations": { - "alphas_mods": true, - "band_pinwheel_sat": true, - "band_pinwheel_val": true, - "band_sat": true, - "band_spiral_sat": true, - "band_spiral_val": true, - "band_val": true, - "breathing": true, - "cycle_all": true, - "cycle_left_right": true, - "cycle_out_in": true, - "cycle_out_in_dual": true, - "cycle_pinwheel": true, - "cycle_spiral": true, - "cycle_up_down": true, - "digital_rain": true, - "dual_beacon": true, - "gradient_left_right": true, - "gradient_up_down": true, - "hue_breathing": true, - "hue_pendulum": true, - "hue_wave": true, - "jellybean_raindrops": true, - "multisplash": true, - "pixel_flow": true, - "pixel_fractal": true, - "pixel_rain": true, - "rainbow_beacon": true, - "rainbow_moving_chevron": true, - "rainbow_pinwheels": true, - "raindrops": true, - "solid_multisplash": true, - "solid_reactive": true, - "solid_reactive_cross": true, - "solid_reactive_multicross": true, - "solid_reactive_multinexus": true, - "solid_reactive_multiwide": true, - "solid_reactive_nexus": true, - "solid_reactive_simple": true, - "solid_reactive_wide": true, - "solid_splash": true, - "splash": true, - "typing_heatmap": true - }, "layout": [ { "flags": 2, "x": 220, "y": 17 }, { "flags": 2, "x": 172, "y": 17 }, diff --git a/keyboards/boardsource/equals/avr/rules.mk b/keyboards/boardsource/equals/avr/rules.mk new file mode 100644 index 0000000000..6e7633bfe0 --- /dev/null +++ b/keyboards/boardsource/equals/avr/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank diff --git a/keyboards/boardsource/equals/equals.c b/keyboards/boardsource/equals/equals.c index 8eb933e70d..074fa3df3e 100644 --- a/keyboards/boardsource/equals/equals.c +++ b/keyboards/boardsource/equals/equals.c @@ -1,18 +1,54 @@ // Copyright 2023 @boardsource // SPDX-License-Identifier: GPL-2.0-or-later + #include "quantum.h" -__attribute__((weak)) void ui_init(void) {}; -__attribute__((weak)) void ui_task(void) {}; #ifdef QUANTUM_PAINTER_ENABLE +#include "qp.h" +#include "qp_st7735.h" +#include "graphics/thintel15.qff.c" + +static painter_device_t oled; +static painter_font_handle_t font; + +__attribute__((weak)) void ui_init(void) { + oled = qp_st7735_make_spi_device(128, 160, OLED_CS_PIN, OLED_DC_PIN, OLED_RST_PIN, 8, 0); + font = qp_load_font_mem(font_thintel15); + qp_init(oled, QP_ROTATION_0); + qp_rect(oled, 0, 0, 130, 162, 0, 0, 0, true); + qp_rect(oled, 20, 20, 108, 60, 55, 55, 55, true); + qp_rect(oled, 20, 80, 108, 120, 55, 55, 55, true); + qp_flush(oled); +} + +__attribute__((weak)) void ui_task(void) { + static const char *text = "Layer:"; + int16_t width = qp_textwidth(font, text); + qp_drawtext(oled, 20, 140, font, text); + + switch (get_highest_layer(layer_state)) { + case 0: + qp_drawtext(oled, (20 + width), 140, font, "QWERTY"); + break; + case 1: + qp_drawtext(oled, (20 + width), 140, font, "SYMBOL"); + break; + case 2: + qp_drawtext(oled, (20 + width), 140, font, "NUMBER"); + break; + default: + qp_drawtext(oled, (20 + width), 140, font, "_PANIC_"); + break; + } +} + void keyboard_post_init_kb(void) { - // Init the display ui_init(); keyboard_post_init_user(); } void housekeeping_task_kb(void) { - // Draw the display ui_task(); + housekeeping_task_user(); } -#endif //QUANTUM_PAINTER_ENABLE +#endif // QUANTUM_PAINTER_ENABLE diff --git a/keyboards/boardsource/equals/info.json b/keyboards/boardsource/equals/info.json index bed8ec2640..c6d6245dbf 100644 --- a/keyboards/boardsource/equals/info.json +++ b/keyboards/boardsource/equals/info.json @@ -4,18 +4,64 @@ "diode_direction": "COL2ROW", "features": { "bootmagic": true, - "command": false, - "console": false, "extrakey": true, "mousekey": true, "nkro": true, "rgb_matrix": true }, - "url": "", "usb": { "device_version": "1.0.0", "pid": "0x7688", "vid": "0x4273" + }, + "rgb_matrix": { + "driver": "ws2812", + "max_brightness": 150, + "sleep": true, + "animations": { + "alphas_mods": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_sat": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "band_val": true, + "breathing": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "cycle_up_down": true, + "digital_rain": true, + "dual_beacon": true, + "gradient_left_right": true, + "gradient_up_down": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "jellybean_raindrops": true, + "multisplash": true, + "pixel_flow": true, + "pixel_fractal": true, + "pixel_rain": true, + "rainbow_beacon": true, + "rainbow_moving_chevron": true, + "rainbow_pinwheels": true, + "raindrops": true, + "solid_multisplash": true, + "solid_reactive": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_multinexus": true, + "solid_reactive_multiwide": true, + "solid_reactive_nexus": true, + "solid_reactive_simple": true, + "solid_reactive_wide": true, + "solid_splash": true, + "splash": true, + "typing_heatmap": true + } } - } diff --git a/keyboards/boardsource/equals/readme.md b/keyboards/boardsource/equals/readme.md index 9c5d48f5c2..82d24b1814 100644 --- a/keyboards/boardsource/equals/readme.md +++ b/keyboards/boardsource/equals/readme.md @@ -3,7 +3,7 @@ ![equals](https://i.imgur.com/c3adFqsh.jpeg) * Keyboard Maintainer: [Cole Smith](https://github.com/boardsource) -* Hardware Supported: Equals PCB w/ RP2040 +* Hardware Supported: Equals PCB w/ RP2040 or Equals Kit w/ Pro Micro * Hardware Availability: [boardsource](https://boardsource.xyz) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/boardsource/equals/ui.c b/keyboards/boardsource/equals/ui.c deleted file mode 100644 index f953fc4c88..0000000000 --- a/keyboards/boardsource/equals/ui.c +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2023 Cole Smith (@boardsource) -// SPDX-License-Identifier: GPL-2.0-or-later -#include -#include "qp.h" -#include "qp_st7735.h" -#include "graphics/thintel15.qff.c" - -static painter_device_t oled; -static painter_font_handle_t font; - -__attribute__((weak)) void ui_init(void) { - oled = qp_st7735_make_spi_device(128, 160, OLED_CS_PIN, OLED_DC_PIN, OLED_RST_PIN, 8, 0); - font = qp_load_font_mem(font_thintel15); - qp_init(oled, QP_ROTATION_0); - qp_rect(oled, 0, 0, 130, 162, 0, 0, 0, true); - qp_rect(oled, 20, 20, 108, 60, 55, 55, 55, true); - qp_rect(oled, 20, 80, 108, 120, 55, 55, 55, true); - qp_flush(oled); -} - -__attribute__((weak)) void ui_task(void) { - static const char *text = "Layer:"; - int16_t width = qp_textwidth(font, text); - qp_drawtext(oled, 20, 140, font, text); - - switch (get_highest_layer(layer_state)) { - case 0: - qp_drawtext(oled, (20 + width), 140, font, "QWERTY"); - break; - case 1: - qp_drawtext(oled, (20 + width), 140, font, "SYMBOL"); - break; - case 2: - qp_drawtext(oled, (20 + width), 140, font, "NUMBER"); - break; - default: - qp_drawtext(oled, (20 + width), 140, font, "_PANIC_"); - break; - } -}