aboutsummaryrefslogtreecommitdiff
path: root/keyboards/boston_meetup/2019/2019.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/boston_meetup/2019/2019.c')
-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 45c185549..933c14dee 100644
--- a/keyboards/boston_meetup/2019/2019.c
+++ b/keyboards/boston_meetup/2019/2019.c
@@ -19,20 +19,18 @@
19#include "haptic.h" 19#include "haptic.h"
20 20
21#ifdef RGB_MATRIX_ENABLE 21#ifdef RGB_MATRIX_ENABLE
22#include "rgblight.h" 22#include "rgb_matrix.h"
23 23
24rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { 24led_config_t g_led_config = { {
25 /*{row | col << 4} 25 { 5, NO_LED, NO_LED, 0 },
26 | {x=0..224, y=0..64} 26 { NO_LED, NO_LED, NO_LED, NO_LED },
27 | | modifier 27 { 4, NO_LED, NO_LED, 1 },
28 | | | */ 28 { 3, NO_LED, NO_LED, 2 }
29 {{1|(3<<4)}, {188, 16}, 4}, 29}, {
30 {{3|(3<<4)}, {187, 48}, 4}, 30 { 188, 16 }, { 187, 48 }, { 149, 64 }, { 112, 64 }, { 37, 48 }, { 38, 16 }
31 {{4|(2<<4)}, {149, 64}, 4}, 31}, {
32 {{4|(1<<4)}, {112, 64}, 4}, 32 4, 4, 4, 4, 4, 4
33 {{3|(0<<4)}, {37, 48}, 4}, 33} };
34 {{1|(0<<4)}, {38, 16}, 4}
35};
36#endif 34#endif
37 35
38uint8_t *o_fb; 36uint8_t *o_fb;
@@ -48,12 +46,12 @@ uint16_t counterst = 0;
48#define ScreenOffInterval 60000 /* milliseconds */ 46#define ScreenOffInterval 60000 /* milliseconds */
49static uint16_t last_flush; 47static uint16_t last_flush;
50 48
51volatile uint8_t led_numlock = false; 49volatile uint8_t led_numlock = false;
52volatile uint8_t led_capslock = false; 50volatile uint8_t led_capslock = false;
53volatile uint8_t led_scrolllock = false; 51volatile uint8_t led_scrolllock = false;
54 52
55static uint8_t layer; 53static uint8_t layer;
56static bool queue_for_send = false; 54static bool queue_for_send = false;
57static uint8_t encoder_value = 32; 55static uint8_t encoder_value = 32;
58 56
59__attribute__ ((weak)) 57__attribute__ ((weak))
@@ -64,13 +62,13 @@ void draw_ui(void) {
64 62
65/* Boston MK title is 55 x 10 pixels */ 63/* Boston MK title is 55 x 10 pixels */
66#define NAME_X 0 64#define NAME_X 0
67#define NAME_Y 0 65#define NAME_Y 0
68 66
69 draw_string(NAME_X + 1, NAME_Y + 2, "BOSTON MK", PIXEL_ON, NORM, 0); 67 draw_string(NAME_X + 1, NAME_Y + 2, "BOSTON MK", PIXEL_ON, NORM, 0);
70 68
71/* Layer indicator is 41 x 10 pixels */ 69/* Layer indicator is 41 x 10 pixels */
72#define LAYER_INDICATOR_X 60 70#define LAYER_INDICATOR_X 60
73#define LAYER_INDICATOR_Y 0 71#define LAYER_INDICATOR_Y 0
74 72
75 draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0); 73 draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0);
76 draw_rect_filled_soft(LAYER_INDICATOR_X + 32, LAYER_INDICATOR_Y + 1, 9, 9, PIXEL_ON, NORM); 74 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) {
88 draw_pixel(MATRIX_DISPLAY_X + y + y + 3, MATRIX_DISPLAY_Y + x + x + 3,(matrix_get_row(x) & (1 << y)) > 0, NORM); 86 draw_pixel(MATRIX_DISPLAY_X + y + y + 3, MATRIX_DISPLAY_Y + x + x + 3,(matrix_get_row(x) & (1 << y)) > 0, NORM);
89 87
90 } 88 }
91 } 89 }
92 draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 12, 12, PIXEL_ON, NORM); 90 draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 12, 12, PIXEL_ON, NORM);
93 /* hadron oled location on thumbnail */ 91 /* hadron oled location on thumbnail */
94 draw_rect_filled_soft(MATRIX_DISPLAY_X + 5, MATRIX_DISPLAY_Y + 2, 6, 2, PIXEL_ON, NORM); 92 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) {
195 queue_for_send = true; 193 queue_for_send = true;
196 matrix_init_user(); 194 matrix_init_user();
197} 195}
198 196
199void matrix_scan_kb(void) { 197void matrix_scan_kb(void) {
200if (queue_for_send) { 198if (queue_for_send) {
201#ifdef QWIIC_MICRO_OLED_ENABLE 199#ifdef QWIIC_MICRO_OLED_ENABLE