[big] bring it all together
All checks were successful
Build / build-sporq (push) Successful in 2m1s

This commit is contained in:
Marius Alwan Meyer 2023-06-04 21:04:14 +02:00
parent 66cbe3f5a4
commit c0b430261d
7 changed files with 159 additions and 139 deletions

View File

@ -25,74 +25,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define SPLIT_WPM_ENABLE
#ifdef RGB_MATRIX_ENABLE
# include <rgb.h>
#endif
//#define QUICK_TAP_TERM 0
//#define TAPPING_TERM 100
#ifdef OLED_ENABLE
#define OLED_BRIGHTNESS 1
#define OLED_TIMEOUT 900000 // 15 minutes
#endif
#ifdef RGB_MATRIX_ENABLE
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_GRADIENT_LEFT_RIGHT // Sets the default mode, if none has been set
#define RGB_MATRIX_DEFAULT_HUE 128 // Sets the default hue value, if none has been set
#define RGB_MATRIX_DEFAULT_SAT 255 // Sets the default saturation value, if none has been set
#define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
#define RGB_MATRIX_DEFAULT_SPD 127 // Sets the default animation speed, if none has been set
// RGB Matrix Animation modes. Explicitly enabled
// copied from crkbd/keymaps/davidrambo/config.h
// For full list of effects, see:
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
// # define ENABLE_RGB_MATRIX_ALPHAS_MODS
// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
// # define ENABLE_RGB_MATRIX_BREATHING
# define ENABLE_RGB_MATRIX_BAND_SAT
# define ENABLE_RGB_MATRIX_BAND_VAL
# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
// # define ENABLE_RGB_MATRIX_CYCLE_ALL
// # define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
// # define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
// # define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
// # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
// # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
// # define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
// # define ENABLE_RGB_MATRIX_DUAL_BEACON
// # define ENABLE_RGB_MATRIX_RAINBOW_BEACON
// # define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
// # define ENABLE_RGB_MATRIX_RAINDROPS
// # define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
// # define ENABLE_RGB_MATRIX_HUE_BREATHING
// # define ENABLE_RGB_MATRIX_HUE_PENDULUM
// # define ENABLE_RGB_MATRIX_HUE_WAVE
// # define ENABLE_RGB_MATRIX_PIXEL_RAIN
// # define ENABLE_RGB_MATRIX_PIXEL_FLOW
# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
# define ENABLE_RGB_MATRIX_TYPING_HEATMAP
# define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 50
// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN
# if defined RGB_MATRIX_KEYPRESSES || defined RGB_MATRIX_KEYRELEASES
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
// # define ENABLE_RGB_MATRIX_SPLASH
// # define ENABLE_RGB_MATRIX_MULTISPLASH
// # define ENABLE_RGB_MATRIX_SOLID_SPLASH
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
#endif
#endif

View File

@ -0,0 +1,15 @@
#pragma once
void keyboard_pre_init_user(void) {
// Disable Liatris Power LED
setPinOutput(24);
writePinHigh(24);
}
void keyboard_post_init_user(void) {
// Customise these values to desired behaviour
//debug_enable=true;
//debug_matrix=true;
//debug_keyboard=true;
//debug_mouse=true;
}

View File

@ -0,0 +1,59 @@
#include QMK_KEYBOARD_H
#include "keymap_us_international.h"
#include "sendstring_us_international.h"
#include <init.c>
#ifdef OLED_ENABLE
# include <oled.c>
#endif
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_split_3x6_3(KC_ESC, KC_X, KC_V, KC_L, KC_C, KC_W, KC_K, KC_H, KC_G, KC_F, KC_Q, RALT(KC_S),
KC_LSFT, KC_U, KC_I, KC_A, KC_E, KC_O, KC_S, KC_N, KC_R, KC_T, KC_D, KC_Y,
KC_LCTL, RALT(KC_Y), RALT(KC_P), RALT(KC_Q), KC_P, KC_Z, KC_B, KC_M, KC_COMM, KC_DOT, KC_J, MO(3),
KC_LGUI, MO(2), KC_SPC, LCTL(KC_BSPC), MO(1), KC_LALT),
[1] = LAYOUT_split_3x6_3(KC_NO, KC_NO, KC_UNDS, KC_LBRC, KC_RBRC, KC_CIRC, KC_EXLM, LSFT(KC_COMM), LSFT(KC_DOT), KC_EQL, KC_AMPR,
KC_NO, KC_NO, KC_BSLS, KC_SLSH, KC_LCBR, KC_RCBR, KC_ASTR, KC_QUES, KC_LPRN, KC_RPRN, KC_MINS, KC_COLN,
KC_AT, KC_NO, KC_HASH, KC_DLR, KC_PIPE, KC_TILD, QK_MACRO_0, KC_PLUS, KC_PERC, QK_MACRO_1, QK_MACRO_2, KC_SCLN,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO),
[2] = LAYOUT_split_3x6_3(KC_TRNS, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO, KC_7, KC_8, KC_9, KC_NO, KC_NO,
KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_END, KC_NO, KC_4, KC_5, KC_6, KC_0, KC_NO,
KC_TRNS, KC_ESC, KC_TAB, KC_INSERT, KC_ENTER, KC_UNDO, KC_0, KC_1, KC_2, KC_3, KC_NO, KC_NO,
KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_TRNS),
[3] = LAYOUT_split_3x6_3(KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_HUI, RGB_MOD, KC_MPLY, KC_AUDIO_VOL_UP,
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_NO, RGB_HUD, RGB_RMOD, KC_NO, KC_AUDIO_VOL_DOWN,
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, RGB_TOG, KC_AUDIO_MUTE, KC_TRNS,
KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_TRNS)
};
#if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
};
#endif // defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE)
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
switch (keycode) {
case QK_MACRO_0:
SEND_STRING(SS_TAP(X_GRV)SS_TAP(X_SPC));
return false;
case QK_MACRO_1:
SEND_STRING(SS_DOWN(X_LSFT)SS_TAP(X_QUOT)SS_UP(X_LSFT)SS_TAP(X_SPC));
return false;
case QK_MACRO_2:
SEND_STRING(SS_TAP(X_QUOT)SS_TAP(X_SPC));
return false;
}
}
return true;
};

View File

@ -1,41 +0,0 @@
{
"keyboard": "splitkb/aurora/corne/rev1",
"keymap": "sporq",
"layout": "LAYOUT_split_3x6_3",
"host_language": "us_international",
"macros": [
[
{"action":"tap", "keycodes": ["GRV"]},
{"action":"tap", "keycodes": ["SPC"]}
],
[
{"action":"tap", "keycodes": ["LSFT","QUOT"]},
{"action":"tap", "keycodes": ["SPC"]}
],
[
{"action":"tap", "keycodes": ["QUOT"]},
{"action":"tap", "keycodes": ["SPC"]}
]
],
"layers": [
[ "KC_ESC","KC_X","KC_V","KC_L","KC_C","KC_W", "KC_K","KC_H","KC_G","KC_F","KC_Q","RALT(KC_S)",
"KC_LSFT","KC_U","KC_I","KC_A","KC_E","KC_O", "KC_S","KC_N","KC_R","KC_T","KC_D","KC_Y",
"KC_LCTL","RALT(KC_Y)","RALT(KC_P)","RALT(KC_Q)", "KC_P", "KC_Z", "KC_B","KC_M","KC_COMM","KC_DOT","KC_J","MO(3)",
"KC_LGUI","MO(2)","KC_SPC", "LCTL(KC_BSPC)","MO(1)","KC_LALT"],
[ "KC_NO","KC_NO","KC_UNDS","KC_LBRC","KC_RBRC","KC_CIRC", "KC_EXLM","LSFT(KC_COMM)","LSFT(KC_DOT)","KC_EQL","KC_AMPR","KC_NO",
"KC_NO","KC_BSLS","KC_SLSH","KC_LCBR","KC_RCBR","KC_ASTR", "KC_QUES","KC_LPRN","KC_RPRN","KC_MINS","KC_COLN","KC_AT",
"KC_NO","KC_HASH","KC_DLR","KC_PIPE","KC_TILD","QK_MACRO_0", "KC_PLUS","KC_PERC","QK_MACRO_1","QK_MACRO_2","KC_SCLN","KC_NO",
"KC_NO","KC_NO","KC_NO", "KC_NO","KC_NO","KC_NO"],
[ "KC_TRNS","KC_PGUP","KC_BSPC","KC_UP","KC_DEL","KC_PGDN", "KC_NO","KC_7","KC_8","KC_9","KC_NO","KC_NO",
"KC_TRNS","KC_HOME","KC_LEFT","KC_DOWN","KC_RIGHT","KC_END", "KC_NO","KC_4","KC_5","KC_6","KC_0","KC_NO",
"KC_TRNS","KC_ESC","KC_TAB","KC_INSERT","KC_ENTER","KC_UNDO", "KC_0","KC_1","KC_2","KC_3","KC_NO","KC_NO",
"KC_TRNS","KC_TRNS","KC_NO", "KC_NO","KC_TRNS","KC_TRNS"],
[ "KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO", "KC_NO","KC_NO","KC_NO","RGB_MOD","KC_MPLY","KC_AUDIO_VOL_UP",
"KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_F6", "KC_NO","KC_NO","KC_NO","RGB_RMOD","KC_NO","KC_AUDIO_VOL_DOWN",
"KC_F7","KC_F8","KC_F9","KC_F10","KC_F11","KC_F12", "KC_NO","KC_NO","KC_NO","RGB_TOG","KC_AUDIO_MUTE","KC_TRNS",
"KC_TRNS","KC_TRNS","KC_NO", "KC_NO","KC_TRNS","KC_TRNS"]
]
}

View File

@ -1,24 +1,14 @@
#pragma once
#include QMK_KEYBOARD_H
#include <stdio.h>
#undef OLED_BRIGHTNESS
#define OLED_BRIGHTNESS 1
#undef OLED_TIMEOUT
#define OLED_TIMEOUT 900000 // 15 minutes
#ifdef OLED_ENABLE
// NOTE: Most of the OLED code was originally written by Soundmonster for the Corne,
// and has been copied directly from `crkbd/soundmonster/keymap.c`
enum layers {
_DEFAULT,
_LOWER,
_RAISE,
_ADJUST
};
static uint16_t animation_timer = 0;
#define FRAME_TIMEOUT (1000/60)
#define FRAME_TIMEOUT (1000 / 25)
#undef OLED_UPDATE_INTERVAL
#define OLED_UPDATE_INTERVAL FRAME_TIMEOUT
// 30 sec
#define SLEEP_TIMEOUT 30000
#define SLEEP_TIMEOUT (1000 * 30)
// Spaceship OLED starts here
@ -275,6 +265,14 @@ static void render_space_animation(void) {
// the Aurora Corne and now residing here as well.
// mostly copied from `splitkp/aurora/corne/corne.c`
enum layers {
_DEFAULT,
_LOWER,
_RAISE,
_ADJUST
};
static void render_space(void) {
oled_write_P(PSTR(" "), false);
}
@ -468,6 +466,7 @@ static void render_layer_state(void) {
// End of aurora corne things
// point to render_left() or render_right() after olet_int_user() ran
void (*render)(void);
@ -486,6 +485,8 @@ void render_right(void) {
render_space_animation();
}
static uint16_t animation_timer;
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
// define what's rendered on each half
if (is_keyboard_master()) {
@ -499,14 +500,6 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return rotation;
}
void keyboard_post_init_user(void) {
// Customise these values to desired behaviour
//debug_enable=true;
//debug_matrix=true;
//debug_keyboard=true;
//debug_mouse=true;
}
bool oled_task_user(void) {
if (timer_elapsed(animation_timer) < FRAME_TIMEOUT) {
return false;
@ -515,4 +508,3 @@ bool oled_task_user(void) {
animation_timer = timer_read();
return false;
}
#endif

View File

@ -0,0 +1,63 @@
#pragma once
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_GRADIENT_LEFT_RIGHT // Sets the default mode, if none has been set
#define RGB_MATRIX_DEFAULT_HUE 128 // Sets the default hue value, if none has been set
#define RGB_MATRIX_DEFAULT_SAT 255 // Sets the default saturation value, if none has been set
#define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
#define RGB_MATRIX_DEFAULT_SPD 127 // Sets the default animation speed, if none has been set
// RGB Matrix Animation modes. Explicitly enabled
// copied from crkbd/keymaps/davidrambo/config.h
// For full list of effects, see:
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
// # define ENABLE_RGB_MATRIX_ALPHAS_MODS
// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
// # define ENABLE_RGB_MATRIX_BREATHING
# define ENABLE_RGB_MATRIX_BAND_SAT
# define ENABLE_RGB_MATRIX_BAND_VAL
# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
// # define ENABLE_RGB_MATRIX_CYCLE_ALL
// # define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
// # define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
// # define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
// # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
// # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
// # define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
// # define ENABLE_RGB_MATRIX_DUAL_BEACON
// # define ENABLE_RGB_MATRIX_RAINBOW_BEACON
// # define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
// # define ENABLE_RGB_MATRIX_RAINDROPS
// # define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
// # define ENABLE_RGB_MATRIX_HUE_BREATHING
// # define ENABLE_RGB_MATRIX_HUE_PENDULUM
// # define ENABLE_RGB_MATRIX_HUE_WAVE
// # define ENABLE_RGB_MATRIX_PIXEL_RAIN
// # define ENABLE_RGB_MATRIX_PIXEL_FLOW
# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
# define ENABLE_RGB_MATRIX_TYPING_HEATMAP
# define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 50
// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN
# if defined RGB_MATRIX_KEYPRESSES || defined RGB_MATRIX_KEYRELEASES
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
// # define ENABLE_RGB_MATRIX_SPLASH
// # define ENABLE_RGB_MATRIX_MULTISPLASH
// # define ENABLE_RGB_MATRIX_SOLID_SPLASH
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
#endif

View File

@ -7,6 +7,4 @@ RGB_MATRIX_ENABLE = yes
WPM_ENABLE = yes
LTO_ENABLE = yes
VIA_ENABLE = no
# source oled code
SRC += oled.c
SPLIT_WPM_ENABLE = yes