aboutsummaryrefslogtreecommitdiff
path: root/keyboards/hadron/ver3/ver3.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/hadron/ver3/ver3.c')
-rw-r--r--keyboards/hadron/ver3/ver3.c45
1 files changed, 20 insertions, 25 deletions
diff --git a/keyboards/hadron/ver3/ver3.c b/keyboards/hadron/ver3/ver3.c
index 5827b42e2..1491caba4 100644
--- a/keyboards/hadron/ver3/ver3.c
+++ b/keyboards/hadron/ver3/ver3.c
@@ -19,24 +19,19 @@
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 { 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 },
26 | {x=0..224, y=0..64} 26 { NO_LED, 6, NO_LED, NO_LED, 7, NO_LED, NO_LED, 8, NO_LED, NO_LED, 9, NO_LED, NO_LED, 0, NO_LED },
27 | | modifier 27 { 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 },
28 | | | */ 28 { 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 },
29 {{1|(13<<4)}, {195, 3}, 4}, 29 { NO_LED, 5, NO_LED, NO_LED, 4, NO_LED, NO_LED, 3, NO_LED, NO_LED, 2, NO_LED, NO_LED, 1, NO_LED }
30 {{4|(13<<4)}, {195, 16}, 4}, 30}, {
31 {{4|(10<<4)}, {150, 16}, 4}, 31 { 195, 3 }, { 195, 16 }, { 150, 16 }, { 105, 16 }, { 60, 16 }, { 15, 16 }, { 15, 3 }, { 60, 3 }, { 105, 3 }, { 150, 3 }
32 {{4|(7<<4)}, {105, 16}, 4}, 32}, {
33 {{4|(4<<4)}, {60, 16}, 4}, 33 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
34 {{4|(1<<4)}, {15, 16}, 4}, 34} };
35 {{1|(1<<4)}, {15, 3}, 4},
36 {{1|(4<<4)}, {60, 3}, 4},
37 {{1|(7<<4)}, {105, 3}, 4},
38 {{1|(10<<4)}, {150, 3}, 4}
39};
40 35
41#endif 36#endif
42 37
@@ -53,12 +48,12 @@ uint16_t counterst = 0;
53#define ScreenOffInterval 60000 /* milliseconds */ 48#define ScreenOffInterval 60000 /* milliseconds */
54static uint16_t last_flush; 49static uint16_t last_flush;
55 50
56volatile uint8_t led_numlock = false; 51volatile uint8_t led_numlock = false;
57volatile uint8_t led_capslock = false; 52volatile uint8_t led_capslock = false;
58volatile uint8_t led_scrolllock = false; 53volatile uint8_t led_scrolllock = false;
59 54
60static uint8_t layer; 55static uint8_t layer;
61static bool queue_for_send = false; 56static bool queue_for_send = false;
62static uint8_t encoder_value = 32; 57static uint8_t encoder_value = 32;
63 58
64__attribute__ ((weak)) 59__attribute__ ((weak))
@@ -69,7 +64,7 @@ void draw_ui(void) {
69 64
70/* Layer indicator is 41 x 10 pixels */ 65/* Layer indicator is 41 x 10 pixels */
71#define LAYER_INDICATOR_X 5 66#define LAYER_INDICATOR_X 5
72#define LAYER_INDICATOR_Y 0 67#define LAYER_INDICATOR_Y 0
73 68
74 draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0); 69 draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0);
75 draw_rect_filled_soft(LAYER_INDICATOR_X + 32, LAYER_INDICATOR_Y + 1, 9, 9, PIXEL_ON, NORM); 70 draw_rect_filled_soft(LAYER_INDICATOR_X + 32, LAYER_INDICATOR_Y + 1, 9, 9, PIXEL_ON, NORM);
@@ -83,7 +78,7 @@ void draw_ui(void) {
83 for (uint8_t y = 0; y < MATRIX_COLS; y++) { 78 for (uint8_t y = 0; y < MATRIX_COLS; y++) {
84 draw_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2,(matrix_get_row(x) & (1 << y)) > 0, NORM); 79 draw_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2,(matrix_get_row(x) & (1 << y)) > 0, NORM);
85 } 80 }
86 } 81 }
87 draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 19, 9, PIXEL_ON, NORM); 82 draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 19, 9, PIXEL_ON, NORM);
88 /* hadron oled location on thumbnail */ 83 /* hadron oled location on thumbnail */
89 draw_rect_filled_soft(MATRIX_DISPLAY_X + 14, MATRIX_DISPLAY_Y + 2, 3, 1, PIXEL_ON, NORM); 84 draw_rect_filled_soft(MATRIX_DISPLAY_X + 14, MATRIX_DISPLAY_Y + 2, 3, 1, PIXEL_ON, NORM);
@@ -162,7 +157,7 @@ void read_host_led_state(void) {
162 if (led_capslock == false){ 157 if (led_capslock == false){
163 led_capslock = true;} 158 led_capslock = true;}
164 } else { 159 } else {
165 if (led_capslock == true){ 160 if (led_capslock == true){
166 led_capslock = false;} 161 led_capslock = false;}
167 } 162 }
168 if (leds & (1 << USB_LED_SCROLL_LOCK)) { 163 if (leds & (1 << USB_LED_SCROLL_LOCK)) {
@@ -197,7 +192,7 @@ void matrix_init_kb(void) {
197 queue_for_send = true; 192 queue_for_send = true;
198 matrix_init_user(); 193 matrix_init_user();
199} 194}
200 195
201void matrix_scan_kb(void) { 196void matrix_scan_kb(void) {
202if (queue_for_send) { 197if (queue_for_send) {
203#ifdef QWIIC_MICRO_OLED_ENABLE 198#ifdef QWIIC_MICRO_OLED_ENABLE