[Keymap] All about (ARM) RGB and OLEDs (drashna keymaps) (#7354)

* Add Kyria Keymap

* Enable all RGBLIGHT Animations for ARM and high capacity AVR

* Reduce GNUC version for __has_include

* Cleanup Ortho 4x12 Community layout

* Update Collide 39 keymap

* Cleanup Keymaps

* Enable full 30 LEDs for Ergodox

* Change EEPROM Load timing

* Use RGB Matrix on Planck Rev6

* Use correct keymap swap

* Enable everything for ARM

* Only enable rgb sleep on avr until crash is fixed

* Add additional Kyria keymap config

* Overhaul Kyria OLED display

* Improve kyria keymap based on usage

* Minor tweaks to rules

* Update OLED code to truncate properly

* Fix RGB Light layer indication

* Switch all of biton32 to get_highest_layer function

* Fix OLED Keylogger display

* Run qmk cformat over all of my user files

* Slight tweak to kyria based on usage

* Move around LALT_T config

* Add comments about base wrappers to keymaps

* Another cformat pass

* Temp fix for VUSB boards and NKRO

* Convert tabs to spaces in rules.mk files

* Only enable RGBLight if it's enabled

* Add Encoder Flip setting

* Update OLED font file
This commit is contained in:
Drashna Jaelre
2019-11-20 12:37:24 -08:00
committed by GitHub
parent 8e8986b250
commit eb91c96288
38 changed files with 1503 additions and 596 deletions

View File

@ -25,8 +25,6 @@ userspace_config_t userspace_config;
# define DRASHNA_UNICODE_MODE 2
#endif
bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed) {
static uint16_t this_timer;
if (pressed) {
@ -73,19 +71,22 @@ void bootmagic_lite(void) {
}
}
__attribute__((weak)) void keyboard_pre_init_keymap(void) {}
void keyboard_pre_init_user(void) {
userspace_config.raw = eeconfig_read_user();
keyboard_pre_init_keymap();
}
// Add reconfigurable functions here, for keymap customization
// This allows for a global, userspace functions, and continued
// customization of the keymap. Use _keymap instead of _user
// functions in the keymaps
__attribute__((weak))
void matrix_init_keymap(void) {}
__attribute__((weak)) void matrix_init_keymap(void) {}
// Call user matrix init, set default RGB colors and then
// call the keymap's init function
void matrix_init_user(void) {
userspace_config.raw = eeconfig_read_user();
#ifdef BOOTLOADER_CATERINA
#if defined(BOOTLOADER_CATERINA) && defined(__AVR__)
DDRD &= ~(1 << 5);
PORTD &= ~(1 << 5);
@ -100,8 +101,7 @@ void matrix_init_user(void) {
matrix_init_keymap();
}
__attribute__((weak))
void keyboard_post_init_keymap(void) {}
__attribute__((weak)) void keyboard_post_init_keymap(void) {}
void keyboard_post_init_user(void) {
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
@ -110,10 +110,9 @@ void keyboard_post_init_user(void) {
keyboard_post_init_keymap();
}
__attribute__((weak))
void shutdown_keymap(void) {}
__attribute__((weak)) void shutdown_keymap(void) {}
void rgb_matrix_update_pwm_buffers(void);
void rgb_matrix_update_pwm_buffers(void);
void shutdown_user(void) {
#ifdef RGBLIGHT_ENABLE
@ -122,29 +121,22 @@ void shutdown_user(void) {
rgblight_setrgb_red();
#endif // RGBLIGHT_ENABLE
#ifdef RGB_MATRIX_ENABLE
rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 );
rgb_matrix_set_color_all(0xFF, 0x00, 0x00);
rgb_matrix_update_pwm_buffers();
#endif // RGB_MATRIX_ENABLE
shutdown_keymap();
}
__attribute__((weak))
void suspend_power_down_keymap(void) {}
__attribute__((weak)) void suspend_power_down_keymap(void) {}
void suspend_power_down_user(void) {
suspend_power_down_keymap();
}
void suspend_power_down_user(void) { suspend_power_down_keymap(); }
__attribute__((weak))
void suspend_wakeup_init_keymap(void) {}
__attribute__((weak)) void suspend_wakeup_init_keymap(void) {}
void suspend_wakeup_init_user(void) {
suspend_wakeup_init_keymap();
}
void suspend_wakeup_init_user(void) { suspend_wakeup_init_keymap(); }
__attribute__((weak))
void matrix_scan_keymap(void) {}
__attribute__((weak)) void matrix_scan_keymap(void) {}
// No global matrix scan code, so just run keymap's matrix
// scan function
@ -166,8 +158,7 @@ void matrix_scan_user(void) {
matrix_scan_keymap();
}
__attribute__((weak))
layer_state_t layer_state_set_keymap(layer_state_t state) { return state; }
__attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; }
// on layer change, no matter where the change was initiated
// Then runs keymap's layer change check
@ -179,32 +170,27 @@ layer_state_t layer_state_set_user(layer_state_t state) {
return layer_state_set_keymap(state);
}
__attribute__((weak))
layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; }
__attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; }
// Runs state check and changes underglow color and animation
layer_state_t default_layer_state_set_user(layer_state_t state) {
state = default_layer_state_set_keymap(state);
#if 0
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
# if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
state = default_layer_state_set_rgb(state);
# endif // RGBLIGHT_ENABLE
#endif
return state;
}
__attribute__((weak))
void led_set_keymap(uint8_t usb_led) {}
__attribute__((weak)) void led_set_keymap(uint8_t usb_led) {}
// Any custom LED code goes here.
// So far, I only have keyboard specific code,
// So nothing goes here.
void led_set_user(uint8_t usb_led) {
led_set_keymap(usb_led);
}
void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); }
__attribute__((weak))
void eeconfig_init_keymap(void) {}
__attribute__((weak)) void eeconfig_init_keymap(void) {}
void eeconfig_init_user(void) {
userspace_config.raw = 0;