summaryrefslogtreecommitdiffstats
path: root/keyboards/hadron/ver3/ver3.c
diff options
context:
space:
mode:
authorWilliam Chang <william@factual.com>2019-05-09 21:16:06 -0700
committerWilliam Chang <william@factual.com>2019-05-09 21:16:06 -0700
commit4b2d3288d013b1a71ea25402224c4a8225a099e9 (patch)
treeb7f5dded777a950e63c4dd967260744336bfaa6b /keyboards/hadron/ver3/ver3.c
parent57a6ea11df685d84a1ea07953e88f224ce2b24f7 (diff)
parentbce391a663d2848bff8ffffca0e4bad771bd3890 (diff)
resolved conflicts
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 e99ed11a77..1491caba43 100644
--- a/keyboards/hadron/ver3/ver3.c
+++ b/keyboards/hadron/ver3/ver3.c
@@ -19,24 +19,19 @@
#include "haptic.h"
#ifdef RGB_MATRIX_ENABLE
-#include "rgblight.h"
-
-const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
- /*{row | col << 4}
- | {x=0..224, y=0..64}
- | | modifier
- | | | */
- {{1|(13<<4)}, {195, 3}, 0},
- {{4|(13<<4)}, {195, 16}, 0},
- {{4|(10<<4)}, {150, 16}, 0},
- {{4|(7<<4)}, {105, 16}, 0},
- {{4|(4<<4)}, {60, 16}, 0},
- {{4|(1<<4)}, {15, 16}, 0},
- {{1|(1<<4)}, {15, 3}, 0},
- {{1|(4<<4)}, {60, 3}, 0},
- {{1|(7<<4)}, {105, 3}, 0},
- {{1|(10<<4)}, {150, 3}, 0}
-};
+#include "rgb_matrix.h"
+
+led_config_t g_led_config = { {
+ { 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, 6, NO_LED, NO_LED, 7, NO_LED, NO_LED, 8, NO_LED, NO_LED, 9, NO_LED, NO_LED, 0, 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, 5, NO_LED, NO_LED, 4, NO_LED, NO_LED, 3, NO_LED, NO_LED, 2, NO_LED, NO_LED, 1, NO_LED }
+}, {
+ { 195, 3 }, { 195, 16 }, { 150, 16 }, { 105, 16 }, { 60, 16 }, { 15, 16 }, { 15, 3 }, { 60, 3 }, { 105, 3 }, { 150, 3 }
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
+} };
#endif
@@ -53,12 +48,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))
@@ -69,7 +64,7 @@ void draw_ui(void) {
/* Layer indicator is 41 x 10 pixels */
#define LAYER_INDICATOR_X 5
-#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);
@@ -83,7 +78,7 @@ void draw_ui(void) {
for (uint8_t y = 0; y < MATRIX_COLS; y++) {
draw_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2,(matrix_get_row(x) & (1 << y)) > 0, NORM);
}
- }
+ }
draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 19, 9, PIXEL_ON, NORM);
/* hadron oled location on thumbnail */
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) {
if (led_capslock == false){
led_capslock = true;}
} else {
- if (led_capslock == true){
+ if (led_capslock == true){
led_capslock = false;}
}
if (leds & (1 << USB_LED_SCROLL_LOCK)) {
@@ -197,7 +192,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