aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/hadron/ver3/ver3.c
diff options
context:
space:
mode:
authorGravatar ishtob <ishtob@gmail.com>2019-04-16 17:49:24 -0400
committerGravatar Drashna Jaelre <drashna@live.com>2019-04-16 14:49:24 -0700
commit0a6beab2243cd9183127041917bb4c3ce6a22bd9 (patch)
tree401db7e3c05d2929fa4a73cdd5d14e50ae32fd5c /keyboards/hadron/ver3/ver3.c
parent93b7fccad65aa4c12b37bc3d1a507ae909511587 (diff)
downloadqmk_firmware-0a6beab2243cd9183127041917bb4c3ce6a22bd9.tar.gz
[Keyboard] Hadron keymap and config updates (#5632)
* update hadron keymaps, code cleanup * keymap update * refactor custom matrix to use quantum matrix defines * fix wrong pin for matrix
Diffstat (limited to 'keyboards/hadron/ver3/ver3.c')
-rw-r--r--keyboards/hadron/ver3/ver3.c38
1 files changed, 35 insertions, 3 deletions
diff --git a/keyboards/hadron/ver3/ver3.c b/keyboards/hadron/ver3/ver3.c
index 37169fe2f..e99ed11a7 100644
--- a/keyboards/hadron/ver3/ver3.c
+++ b/keyboards/hadron/ver3/ver3.c
@@ -16,9 +16,36 @@
#include "ver3.h"
#include "qwiic.h"
#include "action_layer.h"
-#include "matrix.h"
#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}
+};
+
+#endif
+
+uint8_t *o_fb;
+
+uint16_t counterst = 0;
+
+
+
#ifdef QWIIC_MICRO_OLED_ENABLE
/* screen off after this many milliseconds */
@@ -41,7 +68,7 @@ void draw_ui(void) {
send_command(DISPLAYON);
/* Layer indicator is 41 x 10 pixels */
-#define LAYER_INDICATOR_X 0
+#define LAYER_INDICATOR_X 5
#define LAYER_INDICATOR_Y 0
draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0);
@@ -49,7 +76,7 @@ void draw_ui(void) {
draw_char(LAYER_INDICATOR_X + 34, LAYER_INDICATOR_Y + 2, layer + 0x30, PIXEL_ON, XOR, 0);
/* Matrix display is 19 x 9 pixels */
-#define MATRIX_DISPLAY_X 0
+#define MATRIX_DISPLAY_X 5
#define MATRIX_DISPLAY_Y 18
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
@@ -184,5 +211,10 @@ if (queue_for_send) {
send_command(DISPLAYOFF); /* 0xAE */
}
#endif
+ if (counterst == 0) {
+ //testPatternFB(o_fb);
+ }
+ counterst = (counterst + 1) % 1024;
+ //rgblight_task();
matrix_scan_user();
}