Browse Source

Fixup boardsource/equals (#23106)

* initial

* reorder headers
jack 2 years ago
parent
commit
db1df185c9

+ 0 - 47
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 },

+ 0 - 47
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 },

+ 0 - 47
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 },

+ 1 - 0
keyboards/boardsource/equals/avr/rules.mk

@@ -0,0 +1 @@
+# This file intentionally left blank

+ 41 - 5
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

+ 50 - 4
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
+        }
     }
-
 }

+ 1 - 1
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):

+ 0 - 40
keyboards/boardsource/equals/ui.c

@@ -1,40 +0,0 @@
-// Copyright 2023 Cole Smith (@boardsource)
-// SPDX-License-Identifier: GPL-2.0-or-later
-#include <stdio.h>
-#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;
-    }
-}