summaryrefslogtreecommitdiff
path: root/keyboards/terrazzo/terrazzo.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/terrazzo/terrazzo.c')
-rw-r--r--keyboards/terrazzo/terrazzo.c38
1 files changed, 35 insertions, 3 deletions
diff --git a/keyboards/terrazzo/terrazzo.c b/keyboards/terrazzo/terrazzo.c
index f079ded4d7..e6ba1f6c39 100644
--- a/keyboards/terrazzo/terrazzo.c
+++ b/keyboards/terrazzo/terrazzo.c
@@ -17,7 +17,6 @@
#include "terrazzo.h"
#ifdef LED_MATRIX_ENABLE
- #include "is31fl3731-simple.h"
#include <math.h>
#include "print.h"
#include "quantum.h"
@@ -44,6 +43,39 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, C2_15},{0, C2_14},{0, C2_13},{0, C2_12},{0, C2_11},{0, C2_10},{0, C2_9}
};
+led_config_t g_led_config = {
+ {
+ // Key Matrix to LED Index
+ { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
+ { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
+ { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
+ { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
+ { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
+ { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
+ { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
+ { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
+ { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }
+ }, {
+ // LED Index to Physical Position
+ { 0, 0 }, { 16, 0 }, { 32, 0 }, { 48, 0 }, { 64, 0 }, { 80, 0 }, { 96, 0 }, { 112, 0 }, { 128, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 208, 0 }, { 224, 0 },
+ { 0, 11 }, { 16, 11 }, { 32, 11 }, { 48, 11 }, { 64, 11 }, { 80, 11 }, { 96, 11 }, { 112, 11 }, { 128, 11 }, { 144, 11 }, { 160, 11 }, { 176, 11 }, { 192, 11 }, { 208, 11 }, { 224, 11 },
+ { 0, 21 }, { 16, 21 }, { 32, 21 }, { 48, 21 }, { 64, 21 }, { 80, 21 }, { 96, 21 }, { 112, 21 }, { 128, 21 }, { 144, 21 }, { 160, 21 }, { 176, 21 }, { 192, 21 }, { 208, 21 }, { 224, 21 },
+ { 0, 32 }, { 16, 32 }, { 32, 32 }, { 48, 32 }, { 64, 32 }, { 80, 32 }, { 96, 32 }, { 112, 32 }, { 128, 32 }, { 144, 32 }, { 160, 32 }, { 176, 32 }, { 192, 32 }, { 208, 32 }, { 224, 32 },
+ { 0, 43 }, { 16, 43 }, { 32, 43 }, { 48, 43 }, { 64, 43 }, { 80, 43 }, { 96, 43 }, { 112, 43 }, { 128, 43 }, { 144, 43 }, { 160, 43 }, { 176, 43 }, { 192, 43 }, { 208, 43 }, { 224, 43 },
+ { 0, 53 }, { 16, 53 }, { 32, 53 }, { 48, 53 }, { 64, 53 }, { 80, 53 }, { 96, 53 }, { 112, 53 }, { 128, 53 }, { 144, 53 }, { 160, 53 }, { 176, 53 }, { 192, 53 }, { 208, 53 }, { 224, 53 },
+ { 0, 64 }, { 16, 64 }, { 32, 64 }, { 48, 64 }, { 64, 64 }, { 80, 64 }, { 96, 64 }, { 112, 64 }, { 128, 64 }, { 144, 64 }, { 160, 64 }, { 176, 64 }, { 192, 64 }, { 208, 64 }, { 224, 64 }
+ }, {
+ // LED Index to Flag
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
+ }
+};
+
#define TERRAZZO_EFFECT(name)
#define TERRAZZO_EFFECT_IMPLS
@@ -59,7 +91,7 @@ uint8_t terrazzo_effect = 1;
void terrazzo_set_pixel(uint8_t x, uint8_t y, uint8_t value) {
uint8_t target = y * LED_MATRIX_COLS + x;
if (target < DRIVER_LED_TOTAL && target >= 0) {
- led_matrix_set_index_value(y * LED_MATRIX_COLS + x, value);
+ led_matrix_set_value(y * LED_MATRIX_COLS + x, value);
}
}
@@ -113,7 +145,7 @@ void terrazzo_mode_off(void) {
void terrazzo_render(void) {
switch(terrazzo_effect) {
case TERRAZZO_NONE:
- led_matrix_set_index_value_all(0);
+ led_matrix_set_value_all(0);
break;
#define TERRAZZO_EFFECT(name, ...) \
case TERRAZZO_EFFECT_##name: \