summaryrefslogtreecommitdiff
path: root/keyboards/boston_meetup
diff options
context:
space:
mode:
authorXScorpion2 <rcalt2vt@gmail.com>2019-05-07 18:22:46 -0500
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-05-07 16:22:46 -0700
commitaf89752bffbaf5dcea30ea16be66b4d682701bc4 (patch)
treec82f2bc25409159a44778379db8b3a35afc47b8a /keyboards/boston_meetup
parentc7f8548d9af2045996294602d2a4bd9a214ae23c (diff)
rgb_led struct conversion (aka: Per led (key) type rgb matrix effects - part 2) (#5783)
* Initial conversion of the rgb_led struct * Converting last keyboard & updating effects to take advantage of the new structure * New struct should not be const * Updated docs * Changing define ___ for no led to NO_LED * Missed converting some keymap usages of the old struct layout
Diffstat (limited to 'keyboards/boston_meetup')
-rw-r--r--keyboards/boston_meetup/2019/2019.c40
1 files changed, 19 insertions, 21 deletions
diff --git a/keyboards/boston_meetup/2019/2019.c b/keyboards/boston_meetup/2019/2019.c
index 45c1855491..933c14dee4 100644
--- a/keyboards/boston_meetup/2019/2019.c
+++ b/keyboards/boston_meetup/2019/2019.c
@@ -19,20 +19,18 @@
#include "haptic.h"
#ifdef RGB_MATRIX_ENABLE
-#include "rgblight.h"
-
-rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
- /*{row | col << 4}
- | {x=0..224, y=0..64}
- | | modifier
- | | | */
- {{1|(3<<4)}, {188, 16}, 4},
- {{3|(3<<4)}, {187, 48}, 4},
- {{4|(2<<4)}, {149, 64}, 4},
- {{4|(1<<4)}, {112, 64}, 4},
- {{3|(0<<4)}, {37, 48}, 4},
- {{1|(0<<4)}, {38, 16}, 4}
-};
+#include "rgb_matrix.h"
+
+led_config_t g_led_config = { {
+ { 5, NO_LED, NO_LED, 0 },
+ { NO_LED, NO_LED, NO_LED, NO_LED },
+ { 4, NO_LED, NO_LED, 1 },
+ { 3, NO_LED, NO_LED, 2 }
+}, {
+ { 188, 16 }, { 187, 48 }, { 149, 64 }, { 112, 64 }, { 37, 48 }, { 38, 16 }
+}, {
+ 4, 4, 4, 4, 4, 4
+} };
#endif
uint8_t *o_fb;
@@ -48,12 +46,12 @@ uint16_t counterst = 0;
#define ScreenOffInterval 60000 /* milliseconds */
static uint16_t last_flush;
-volatile uint8_t led_numlock = false;
-volatile uint8_t led_capslock = false;
+volatile uint8_t led_numlock = false;
+volatile uint8_t led_capslock = false;
volatile uint8_t led_scrolllock = false;
static uint8_t layer;
-static bool queue_for_send = false;
+static bool queue_for_send = false;
static uint8_t encoder_value = 32;
__attribute__ ((weak))
@@ -64,13 +62,13 @@ void draw_ui(void) {
/* Boston MK title is 55 x 10 pixels */
#define NAME_X 0
-#define NAME_Y 0
+#define NAME_Y 0
draw_string(NAME_X + 1, NAME_Y + 2, "BOSTON MK", PIXEL_ON, NORM, 0);
/* Layer indicator is 41 x 10 pixels */
#define LAYER_INDICATOR_X 60
-#define LAYER_INDICATOR_Y 0
+#define LAYER_INDICATOR_Y 0
draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0);
draw_rect_filled_soft(LAYER_INDICATOR_X + 32, LAYER_INDICATOR_Y + 1, 9, 9, PIXEL_ON, NORM);
@@ -88,7 +86,7 @@ void draw_ui(void) {
draw_pixel(MATRIX_DISPLAY_X + y + y + 3, MATRIX_DISPLAY_Y + x + x + 3,(matrix_get_row(x) & (1 << y)) > 0, NORM);
}
- }
+ }
draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 12, 12, PIXEL_ON, NORM);
/* hadron oled location on thumbnail */
draw_rect_filled_soft(MATRIX_DISPLAY_X + 5, MATRIX_DISPLAY_Y + 2, 6, 2, PIXEL_ON, NORM);
@@ -195,7 +193,7 @@ void matrix_init_kb(void) {
queue_for_send = true;
matrix_init_user();
}
-
+
void matrix_scan_kb(void) {
if (queue_for_send) {
#ifdef QWIIC_MICRO_OLED_ENABLE