diff options
| author | Drashna Jaelre <drashna@live.com> | 2019-11-20 12:37:24 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-20 12:37:24 -0800 |
| commit | eb91c962886b1bb52c2d457a574cba09e2a8b0f0 (patch) | |
| tree | 20f3d49671b6d42ca1edf285431e3e4120551228 /users/drashna | |
| parent | 8e8986b2506ca4cdd2339a441314a0838e3a4329 (diff) | |
| download | qmk_firmware-eb91c962886b1bb52c2d457a574cba09e2a8b0f0.tar.gz qmk_firmware-eb91c962886b1bb52c2d457a574cba09e2a8b0f0.zip | |
[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
Diffstat (limited to 'users/drashna')
| -rw-r--r-- | users/drashna/config.h | 14 | ||||
| -rw-r--r-- | users/drashna/drashna.c | 60 | ||||
| -rw-r--r-- | users/drashna/drashna.h | 5 | ||||
| -rw-r--r-- | users/drashna/font_gmk_bad.h | 241 | ||||
| -rw-r--r-- | users/drashna/hue_manitee_font.h | 241 | ||||
| -rw-r--r-- | users/drashna/process_records.c | 8 | ||||
| -rw-r--r-- | users/drashna/rgb_stuff.c | 194 | ||||
| -rw-r--r-- | users/drashna/rgb_stuff.h | 6 | ||||
| -rw-r--r-- | users/drashna/rgblight_breathe_table.h | 8 | ||||
| -rw-r--r-- | users/drashna/rules.mk | 23 | ||||
| -rw-r--r-- | users/drashna/template.c | 130 | ||||
| -rw-r--r-- | users/drashna/template.h | 15 |
12 files changed, 695 insertions, 250 deletions
diff --git a/users/drashna/config.h b/users/drashna/config.h index a0f92d8f3..6fafff860 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | #define USB_POLLING_INTERVAL_MS 1 | 7 | #define USB_POLLING_INTERVAL_MS 1 |
| 8 | 8 | ||
| 9 | #ifdef AUDIO_ENABLE | 9 | #ifdef AUDIO_ENABLE |
| 10 | # if __GNUC__ > 7 | 10 | # if __GNUC__ > 5 |
| 11 | # if __has_include("drashna_song_list.h") | 11 | # if __has_include("drashna_song_list.h") |
| 12 | # include "drashna_song_list.h" | 12 | # include "drashna_song_list.h" |
| 13 | # endif // if file exists | 13 | # endif // if file exists |
| @@ -29,11 +29,15 @@ | |||
| 29 | #endif // !AUDIO_ENABLE | 29 | #endif // !AUDIO_ENABLE |
| 30 | 30 | ||
| 31 | #ifdef RGBLIGHT_ENABLE | 31 | #ifdef RGBLIGHT_ENABLE |
| 32 | # define RGBLIGHT_SLEEP | ||
| 33 | # undef RGBLIGHT_ANIMATIONS | 32 | # undef RGBLIGHT_ANIMATIONS |
| 34 | # define RGBLIGHT_EFFECT_BREATHING | 33 | # if defined(__AVR__) && !defined(__AVR_AT90USB1286__) |
| 35 | # define RGBLIGHT_EFFECT_SNAKE | 34 | # define RGBLIGHT_SLEEP |
| 36 | # define RGBLIGHT_EFFECT_KNIGHT | 35 | # define RGBLIGHT_EFFECT_BREATHING |
| 36 | # define RGBLIGHT_EFFECT_SNAKE | ||
| 37 | # define RGBLIGHT_EFFECT_KNIGHT | ||
| 38 | # else | ||
| 39 | # define RGBLIGHT_ANIMATIONS | ||
| 40 | # endif | ||
| 37 | #endif // RGBLIGHT_ENABLE | 41 | #endif // RGBLIGHT_ENABLE |
| 38 | 42 | ||
| 39 | #ifdef RGB_MATRIX_ENABLE | 43 | #ifdef RGB_MATRIX_ENABLE |
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index b48d837d0..71779a621 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c | |||
| @@ -25,8 +25,6 @@ userspace_config_t userspace_config; | |||
| 25 | # define DRASHNA_UNICODE_MODE 2 | 25 | # define DRASHNA_UNICODE_MODE 2 |
| 26 | #endif | 26 | #endif |
| 27 | 27 | ||
| 28 | |||
| 29 | |||
| 30 | bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed) { | 28 | bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed) { |
| 31 | static uint16_t this_timer; | 29 | static uint16_t this_timer; |
| 32 | if (pressed) { | 30 | if (pressed) { |
| @@ -73,19 +71,22 @@ void bootmagic_lite(void) { | |||
| 73 | } | 71 | } |
| 74 | } | 72 | } |
| 75 | 73 | ||
| 74 | __attribute__((weak)) void keyboard_pre_init_keymap(void) {} | ||
| 75 | |||
| 76 | void keyboard_pre_init_user(void) { | ||
| 77 | userspace_config.raw = eeconfig_read_user(); | ||
| 78 | keyboard_pre_init_keymap(); | ||
| 79 | } | ||
| 76 | // Add reconfigurable functions here, for keymap customization | 80 | // Add reconfigurable functions here, for keymap customization |
| 77 | // This allows for a global, userspace functions, and continued | 81 | // This allows for a global, userspace functions, and continued |
| 78 | // customization of the keymap. Use _keymap instead of _user | 82 | // customization of the keymap. Use _keymap instead of _user |
| 79 | // functions in the keymaps | 83 | // functions in the keymaps |
| 80 | __attribute__((weak)) | 84 | __attribute__((weak)) void matrix_init_keymap(void) {} |
| 81 | void matrix_init_keymap(void) {} | ||
| 82 | 85 | ||
| 83 | // Call user matrix init, set default RGB colors and then | 86 | // Call user matrix init, set default RGB colors and then |
| 84 | // call the keymap's init function | 87 | // call the keymap's init function |
| 85 | void matrix_init_user(void) { | 88 | void matrix_init_user(void) { |
| 86 | userspace_config.raw = eeconfig_read_user(); | 89 | #if defined(BOOTLOADER_CATERINA) && defined(__AVR__) |
| 87 | |||
| 88 | #ifdef BOOTLOADER_CATERINA | ||
| 89 | DDRD &= ~(1 << 5); | 90 | DDRD &= ~(1 << 5); |
| 90 | PORTD &= ~(1 << 5); | 91 | PORTD &= ~(1 << 5); |
| 91 | 92 | ||
| @@ -100,8 +101,7 @@ void matrix_init_user(void) { | |||
| 100 | matrix_init_keymap(); | 101 | matrix_init_keymap(); |
| 101 | } | 102 | } |
| 102 | 103 | ||
| 103 | __attribute__((weak)) | 104 | __attribute__((weak)) void keyboard_post_init_keymap(void) {} |
| 104 | void keyboard_post_init_keymap(void) {} | ||
| 105 | 105 | ||
| 106 | void keyboard_post_init_user(void) { | 106 | void keyboard_post_init_user(void) { |
| 107 | #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) | 107 | #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) |
| @@ -110,10 +110,9 @@ void keyboard_post_init_user(void) { | |||
| 110 | keyboard_post_init_keymap(); | 110 | keyboard_post_init_keymap(); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | __attribute__((weak)) | 113 | __attribute__((weak)) void shutdown_keymap(void) {} |
| 114 | void shutdown_keymap(void) {} | ||
| 115 | 114 | ||
| 116 | void rgb_matrix_update_pwm_buffers(void); | 115 | void rgb_matrix_update_pwm_buffers(void); |
| 117 | 116 | ||
| 118 | void shutdown_user(void) { | 117 | void shutdown_user(void) { |
| 119 | #ifdef RGBLIGHT_ENABLE | 118 | #ifdef RGBLIGHT_ENABLE |
| @@ -122,29 +121,22 @@ void shutdown_user(void) { | |||
| 122 | rgblight_setrgb_red(); | 121 | rgblight_setrgb_red(); |
| 123 | #endif // RGBLIGHT_ENABLE | 122 | #endif // RGBLIGHT_ENABLE |
| 124 | #ifdef RGB_MATRIX_ENABLE | 123 | #ifdef RGB_MATRIX_ENABLE |
| 125 | rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 ); | 124 | rgb_matrix_set_color_all(0xFF, 0x00, 0x00); |
| 126 | rgb_matrix_update_pwm_buffers(); | 125 | rgb_matrix_update_pwm_buffers(); |
| 127 | 126 | ||
| 128 | #endif // RGB_MATRIX_ENABLE | 127 | #endif // RGB_MATRIX_ENABLE |
| 129 | shutdown_keymap(); | 128 | shutdown_keymap(); |
| 130 | } | 129 | } |
| 131 | 130 | ||
| 132 | __attribute__((weak)) | 131 | __attribute__((weak)) void suspend_power_down_keymap(void) {} |
| 133 | void suspend_power_down_keymap(void) {} | ||
| 134 | 132 | ||
| 135 | void suspend_power_down_user(void) { | 133 | void suspend_power_down_user(void) { suspend_power_down_keymap(); } |
| 136 | suspend_power_down_keymap(); | ||
| 137 | } | ||
| 138 | 134 | ||
| 139 | __attribute__((weak)) | 135 | __attribute__((weak)) void suspend_wakeup_init_keymap(void) {} |
| 140 | void suspend_wakeup_init_keymap(void) {} | ||
| 141 | 136 | ||
| 142 | void suspend_wakeup_init_user(void) { | 137 | void suspend_wakeup_init_user(void) { suspend_wakeup_init_keymap(); } |
| 143 | suspend_wakeup_init_keymap(); | ||
| 144 | } | ||
| 145 | 138 | ||
| 146 | __attribute__((weak)) | 139 | __attribute__((weak)) void matrix_scan_keymap(void) {} |
| 147 | void matrix_scan_keymap(void) {} | ||
| 148 | 140 | ||
| 149 | // No global matrix scan code, so just run keymap's matrix | 141 | // No global matrix scan code, so just run keymap's matrix |
| 150 | // scan function | 142 | // scan function |
| @@ -166,8 +158,7 @@ void matrix_scan_user(void) { | |||
| 166 | matrix_scan_keymap(); | 158 | matrix_scan_keymap(); |
| 167 | } | 159 | } |
| 168 | 160 | ||
| 169 | __attribute__((weak)) | 161 | __attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } |
| 170 | layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } | ||
| 171 | 162 | ||
| 172 | // on layer change, no matter where the change was initiated | 163 | // on layer change, no matter where the change was initiated |
| 173 | // Then runs keymap's layer change check | 164 | // Then runs keymap's layer change check |
| @@ -179,32 +170,27 @@ layer_state_t layer_state_set_user(layer_state_t state) { | |||
| 179 | return layer_state_set_keymap(state); | 170 | return layer_state_set_keymap(state); |
| 180 | } | 171 | } |
| 181 | 172 | ||
| 182 | __attribute__((weak)) | 173 | __attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; } |
| 183 | layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; } | ||
| 184 | 174 | ||
| 185 | // Runs state check and changes underglow color and animation | 175 | // Runs state check and changes underglow color and animation |
| 186 | layer_state_t default_layer_state_set_user(layer_state_t state) { | 176 | layer_state_t default_layer_state_set_user(layer_state_t state) { |
| 187 | state = default_layer_state_set_keymap(state); | 177 | state = default_layer_state_set_keymap(state); |
| 188 | #if 0 | 178 | #if 0 |
| 189 | #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) | 179 | # if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) |
| 190 | state = default_layer_state_set_rgb(state); | 180 | state = default_layer_state_set_rgb(state); |
| 191 | # endif // RGBLIGHT_ENABLE | 181 | # endif // RGBLIGHT_ENABLE |
| 192 | #endif | 182 | #endif |
| 193 | return state; | 183 | return state; |
| 194 | } | 184 | } |
| 195 | 185 | ||
| 196 | __attribute__((weak)) | 186 | __attribute__((weak)) void led_set_keymap(uint8_t usb_led) {} |
| 197 | void led_set_keymap(uint8_t usb_led) {} | ||
| 198 | 187 | ||
| 199 | // Any custom LED code goes here. | 188 | // Any custom LED code goes here. |
| 200 | // So far, I only have keyboard specific code, | 189 | // So far, I only have keyboard specific code, |
| 201 | // So nothing goes here. | 190 | // So nothing goes here. |
| 202 | void led_set_user(uint8_t usb_led) { | 191 | void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); } |
| 203 | led_set_keymap(usb_led); | ||
| 204 | } | ||
| 205 | 192 | ||
| 206 | __attribute__((weak)) | 193 | __attribute__((weak)) void eeconfig_init_keymap(void) {} |
| 207 | void eeconfig_init_keymap(void) {} | ||
| 208 | 194 | ||
| 209 | void eeconfig_init_user(void) { | 195 | void eeconfig_init_user(void) { |
| 210 | userspace_config.raw = 0; | 196 | userspace_config.raw = 0; |
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index 0ccb7614f..0ba181760 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h | |||
| @@ -16,7 +16,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #pragma once | 18 | #pragma once |
| 19 | #include "quantum.h" | 19 | #include QMK_KEYBOARD_H |
| 20 | |||
| 20 | #include "version.h" | 21 | #include "version.h" |
| 21 | #include "eeprom.h" | 22 | #include "eeprom.h" |
| 22 | #include "wrappers.h" | 23 | #include "wrappers.h" |
| @@ -62,6 +63,7 @@ void led_set_keymap(uint8_t usb_led); | |||
| 62 | void eeconfig_init_keymap(void); | 63 | void eeconfig_init_keymap(void); |
| 63 | bool hasAllBitsInMask(uint8_t value, uint8_t mask); | 64 | bool hasAllBitsInMask(uint8_t value, uint8_t mask); |
| 64 | 65 | ||
| 66 | // clang-format off | ||
| 65 | typedef union { | 67 | typedef union { |
| 66 | uint32_t raw; | 68 | uint32_t raw; |
| 67 | struct { | 69 | struct { |
| @@ -73,6 +75,7 @@ typedef union { | |||
| 73 | bool rgb_matrix_idle_anim :1; | 75 | bool rgb_matrix_idle_anim :1; |
| 74 | }; | 76 | }; |
| 75 | } userspace_config_t; | 77 | } userspace_config_t; |
| 78 | // clang-format on | ||
| 76 | 79 | ||
| 77 | extern userspace_config_t userspace_config; | 80 | extern userspace_config_t userspace_config; |
| 78 | 81 | ||
diff --git a/users/drashna/font_gmk_bad.h b/users/drashna/font_gmk_bad.h new file mode 100644 index 000000000..c1c5c390a --- /dev/null +++ b/users/drashna/font_gmk_bad.h | |||
| @@ -0,0 +1,241 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #ifdef __AVR__ | ||
| 4 | # include <avr/io.h> | ||
| 5 | # include <avr/pgmspace.h> | ||
| 6 | #elif defined(ESP8266) | ||
| 7 | # include <pgmspace.h> | ||
| 8 | #else | ||
| 9 | # define PROGMEM | ||
| 10 | #endif | ||
| 11 | |||
| 12 | // Corne 8x6 font with QMK Firmware Logo | ||
| 13 | // Online editor: https://helixfonteditor.netlify.com/ | ||
| 14 | |||
| 15 | // clang-format off | ||
| 16 | const unsigned char font[] PROGMEM = { | ||
| 17 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 18 | 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, | ||
| 19 | 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, | ||
| 20 | 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, | ||
| 21 | 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, | ||
| 22 | 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, | ||
| 23 | 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, | ||
| 24 | 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, | ||
| 25 | 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, | ||
| 26 | 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, | ||
| 27 | 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, | ||
| 28 | 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, | ||
| 29 | 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, | ||
| 30 | 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, | ||
| 31 | 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, | ||
| 32 | 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, | ||
| 33 | 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, | ||
| 34 | 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, | ||
| 35 | 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, | ||
| 36 | 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, | ||
| 37 | 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, | ||
| 38 | 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, | ||
| 39 | 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, | ||
| 40 | 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, | ||
| 41 | 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, | ||
| 42 | 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, | ||
| 43 | 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, | ||
| 44 | 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, | ||
| 45 | 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, | ||
| 46 | 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, | ||
| 47 | 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, | ||
| 48 | 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, | ||
| 49 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 50 | 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, | ||
| 51 | 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, | ||
| 52 | 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, | ||
| 53 | 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, | ||
| 54 | 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, | ||
| 55 | 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, | ||
| 56 | 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, | ||
| 57 | 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, | ||
| 58 | 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, | ||
| 59 | 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, | ||
| 60 | 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, | ||
| 61 | 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, | ||
| 62 | 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, | ||
| 63 | 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, | ||
| 64 | 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, | ||
| 65 | 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, | ||
| 66 | 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, | ||
| 67 | 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, | ||
| 68 | 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, | ||
| 69 | 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, | ||
| 70 | 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, | ||
| 71 | 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, | ||
| 72 | 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, | ||
| 73 | 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, | ||
| 74 | 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, | ||
| 75 | 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, | ||
| 76 | 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, | ||
| 77 | 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, | ||
| 78 | 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, | ||
| 79 | 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, | ||
| 80 | 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, | ||
| 81 | 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, | ||
| 82 | 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, | ||
| 83 | 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, | ||
| 84 | 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, | ||
| 85 | 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, | ||
| 86 | 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, | ||
| 87 | 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, | ||
| 88 | 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, | ||
| 89 | 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, | ||
| 90 | 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, | ||
| 91 | 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, | ||
| 92 | 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, | ||
| 93 | 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, | ||
| 94 | 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, | ||
| 95 | 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, | ||
| 96 | 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, | ||
| 97 | 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, | ||
| 98 | 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, | ||
| 99 | 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, | ||
| 100 | 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, | ||
| 101 | 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, | ||
| 102 | 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, | ||
| 103 | 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, | ||
| 104 | 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, | ||
| 105 | 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, | ||
| 106 | 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, | ||
| 107 | 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, | ||
| 108 | 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, | ||
| 109 | 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, | ||
| 110 | 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, | ||
| 111 | 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, | ||
| 112 | 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, | ||
| 113 | 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, | ||
| 114 | 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, | ||
| 115 | 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, | ||
| 116 | 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, | ||
| 117 | 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, | ||
| 118 | 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, | ||
| 119 | 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, | ||
| 120 | 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, | ||
| 121 | 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, | ||
| 122 | 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, | ||
| 123 | 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, | ||
| 124 | 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, | ||
| 125 | 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, | ||
| 126 | 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, | ||
| 127 | 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, | ||
| 128 | 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, | ||
| 129 | 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, | ||
| 130 | 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, | ||
| 131 | 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, | ||
| 132 | 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, | ||
| 133 | 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, | ||
| 134 | 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, | ||
| 135 | 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, | ||
| 136 | 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, | ||
| 137 | 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, | ||
| 138 | 0x4C, 0x90, 0x10, 0x90, 0x7C, 0x00, | ||
| 139 | 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, | ||
| 140 | 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, | ||
| 141 | 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, | ||
| 142 | 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, | ||
| 143 | 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, | ||
| 144 | 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, | ||
| 145 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 146 | 0x80, 0xC0, 0xE0, 0xF0, 0xF0, 0x70, | ||
| 147 | 0x38, 0x38, 0x38, 0x78, 0x70, 0xF0, | ||
| 148 | 0xE0, 0xE0, 0x80, 0x00, 0x00, 0x00, | ||
| 149 | 0x00, 0x00, 0x00, 0x80, 0xF0, 0xF8, | ||
| 150 | 0xF8, 0xF8, 0xF8, 0x00, 0x00, 0x00, | ||
| 151 | 0x80, 0xE0, 0xF8, 0xF8, 0xF8, 0xF8, | ||
| 152 | 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 153 | 0x80, 0xF8, 0xF8, 0xF8, 0x38, 0x00, | ||
| 154 | 0x80, 0xE0, 0xF0, 0xF8, 0x78, 0x38, | ||
| 155 | 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, | ||
| 156 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 157 | 0x80, 0xF8, 0xF8, 0xF8, 0x38, 0x38, | ||
| 158 | 0x38, 0xF8, 0xF0, 0xF0, 0xE0, 0x00, | ||
| 159 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 160 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 161 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 162 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 163 | 0x00, 0x00, 0x00, 0x80, 0xFC, 0xFC, | ||
| 164 | 0xFC, 0x1C, 0x00, 0x00, 0x00, 0x00, | ||
| 165 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 166 | 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, | ||
| 167 | 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, | ||
| 168 | 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, | ||
| 169 | 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, | ||
| 170 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 171 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 172 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 173 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 174 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 175 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 176 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 177 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, | ||
| 178 | 0xFF, 0xFF, 0xFF, 0xC1, 0x80, 0x00, | ||
| 179 | 0x00, 0x38, 0x38, 0xB8, 0xB8, 0xF9, | ||
| 180 | 0xF9, 0xF8, 0x38, 0x00, 0x00, 0x00, | ||
| 181 | 0x00, 0xC0, 0xF8, 0xFF, 0xFF, 0x1F, | ||
| 182 | 0x01, 0x3F, 0xFF, 0xFF, 0xF0, 0xFE, | ||
| 183 | 0x7F, 0x0F, 0x03, 0xFF, 0xFF, 0xFF, | ||
| 184 | 0xFF, 0x00, 0x00, 0x00, 0x00, 0x80, | ||
| 185 | 0xFF, 0xFF, 0xFF, 0x3F, 0x1E, 0x7F, | ||
| 186 | 0xFF, 0xFF, 0xF3, 0xC1, 0x80, 0x00, | ||
| 187 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 188 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, | ||
| 189 | 0xFF, 0xFF, 0xFF, 0x3F, 0x1C, 0x1C, | ||
| 190 | 0x9C, 0xFF, 0xFF, 0xF3, 0xE1, 0x00, | ||
| 191 | 0x00, 0x00, 0x00, 0xF0, 0xFC, 0xFE, | ||
| 192 | 0xFF, 0x0F, 0x07, 0x07, 0x8E, 0xFF, | ||
| 193 | 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, | ||
| 194 | 0x00, 0xF0, 0xFC, 0xFE, 0xFF, 0x8F, | ||
| 195 | 0x07, 0x07, 0x8E, 0xFF, 0xFF, 0xFF, | ||
| 196 | 0x3F, 0x00, 0x00, 0x00, 0x00, 0x80, | ||
| 197 | 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, | ||
| 198 | 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, | ||
| 199 | 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, | ||
| 200 | 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, | ||
| 201 | 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, | ||
| 202 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 203 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 204 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 205 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 206 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 207 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 208 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 209 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 210 | 0x00, 0x01, 0x03, 0x03, 0x03, 0x07, | ||
| 211 | 0x07, 0x07, 0x07, 0x03, 0x03, 0x03, | ||
| 212 | 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 213 | 0x06, 0x07, 0x07, 0x07, 0x01, 0x00, | ||
| 214 | 0x00, 0x00, 0x07, 0x07, 0x07, 0x01, | ||
| 215 | 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, | ||
| 216 | 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, | ||
| 217 | 0x07, 0x07, 0x07, 0x00, 0x00, 0x00, | ||
| 218 | 0x00, 0x03, 0x07, 0x07, 0x07, 0x06, | ||
| 219 | 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 220 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, | ||
| 221 | 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, | ||
| 222 | 0x07, 0x07, 0x03, 0x01, 0x00, 0x00, | ||
| 223 | 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, | ||
| 224 | 0x07, 0x07, 0x07, 0x03, 0x07, 0x07, | ||
| 225 | 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, | ||
| 226 | 0x00, 0x00, 0x03, 0x07, 0x07, 0x07, | ||
| 227 | 0x07, 0x03, 0x07, 0x07, 0x07, 0x07, | ||
| 228 | 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, | ||
| 229 | 0x07, 0x07, 0x01, 0x00, 0x00, 0x00, | ||
| 230 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 231 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 232 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 233 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 234 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 235 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 236 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 237 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 238 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 239 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 240 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 241 | }; | ||
diff --git a/users/drashna/hue_manitee_font.h b/users/drashna/hue_manitee_font.h new file mode 100644 index 000000000..72d50f7a6 --- /dev/null +++ b/users/drashna/hue_manitee_font.h | |||
| @@ -0,0 +1,241 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #ifdef __AVR__ | ||
| 4 | # include <avr/io.h> | ||
| 5 | # include <avr/pgmspace.h> | ||
| 6 | #elif defined(ESP8266) | ||
| 7 | # include <pgmspace.h> | ||
| 8 | #else | ||
| 9 | # define PROGMEM | ||
| 10 | #endif | ||
| 11 | |||
| 12 | // Corne 8x6 font with QMK Firmware Logo | ||
| 13 | // Online editor: https://helixfonteditor.netlify.com/ | ||
| 14 | |||
| 15 | // clang-format off | ||
| 16 | const unsigned char font[] PROGMEM = { | ||
| 17 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 18 | 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, | ||
| 19 | 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, | ||
| 20 | 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, | ||
| 21 | 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, | ||
| 22 | 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, | ||
| 23 | 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, | ||
| 24 | 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, | ||
| 25 | 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, | ||
| 26 | 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, | ||
| 27 | 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, | ||
| 28 | 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, | ||
| 29 | 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, | ||
| 30 | 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, | ||
| 31 | 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, | ||
| 32 | 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, | ||
| 33 | 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, | ||
| 34 | 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, | ||
| 35 | 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, | ||
| 36 | 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, | ||
| 37 | 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, | ||
| 38 | 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, | ||
| 39 | 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, | ||
| 40 | 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, | ||
| 41 | 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, | ||
| 42 | 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, | ||
| 43 | 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, | ||
| 44 | 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, | ||
| 45 | 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, | ||
| 46 | 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, | ||
| 47 | 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, | ||
| 48 | 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, | ||
| 49 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 50 | 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, | ||
| 51 | 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, | ||
| 52 | 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, | ||
| 53 | 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, | ||
| 54 | 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, | ||
| 55 | 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, | ||
| 56 | 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, | ||
| 57 | 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, | ||
| 58 | 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, | ||
| 59 | 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, | ||
| 60 | 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, | ||
| 61 | 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, | ||
| 62 | 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, | ||
| 63 | 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, | ||
| 64 | 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, | ||
| 65 | 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, | ||
| 66 | 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, | ||
| 67 | 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, | ||
| 68 | 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, | ||
| 69 | 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, | ||
| 70 | 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, | ||
| 71 | 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, | ||
| 72 | 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, | ||
| 73 | 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, | ||
| 74 | 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, | ||
| 75 | 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, | ||
| 76 | 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, | ||
| 77 | 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, | ||
| 78 | 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, | ||
| 79 | 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, | ||
| 80 | 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, | ||
| 81 | 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, | ||
| 82 | 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, | ||
| 83 | 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, | ||
| 84 | 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, | ||
| 85 | 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, | ||
| 86 | 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, | ||
| 87 | 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, | ||
| 88 | 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, | ||
| 89 | 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, | ||
| 90 | 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, | ||
| 91 | 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, | ||
| 92 | 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, | ||
| 93 | 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, | ||
| 94 | 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, | ||
| 95 | 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, | ||
| 96 | 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, | ||
| 97 | 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, | ||
| 98 | 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, | ||
| 99 | 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, | ||
| 100 | 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, | ||
| 101 | 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, | ||
| 102 | 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, | ||
| 103 | 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, | ||
| 104 | 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, | ||
| 105 | 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, | ||
| 106 | 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, | ||
| 107 | 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, | ||
| 108 | 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, | ||
| 109 | 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, | ||
| 110 | 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, | ||
| 111 | 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, | ||
| 112 | 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, | ||
| 113 | 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, | ||
| 114 | 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, | ||
| 115 | 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, | ||
| 116 | 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, | ||
| 117 | 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, | ||
| 118 | 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, | ||
| 119 | 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, | ||
| 120 | 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, | ||
| 121 | 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, | ||
| 122 | 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, | ||
| 123 | 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, | ||
| 124 | 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, | ||
| 125 | 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, | ||
| 126 | 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, | ||
| 127 | 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, | ||
| 128 | 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, | ||
| 129 | 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, | ||
| 130 | 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, | ||
| 131 | 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, | ||
| 132 | 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, | ||
| 133 | 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, | ||
| 134 | 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, | ||
| 135 | 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, | ||
| 136 | 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, | ||
| 137 | 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, | ||
| 138 | 0x4C, 0x90, 0x10, 0x90, 0x7C, 0x00, | ||
| 139 | 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, | ||
| 140 | 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, | ||
| 141 | 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, | ||
| 142 | 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, | ||
| 143 | 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, | ||
| 144 | 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, | ||
| 145 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 146 | 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, | ||
| 147 | 0x90, 0x70, 0xE8, 0xA8, 0xE4, 0xC4, | ||
| 148 | 0xC4, 0xA0, 0xE4, 0xB0, 0xDC, 0xE4, | ||
| 149 | 0xFC, 0xFC, 0xFC, 0xFC, 0x3C, 0x3C, | ||
| 150 | 0xFC, 0xF8, 0xF0, 0xF0, 0xE0, 0x00, | ||
| 151 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 152 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 153 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 154 | 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, | ||
| 155 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 156 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 157 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 158 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 159 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 160 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 161 | 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, | ||
| 162 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 163 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 164 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 165 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 166 | 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, | ||
| 167 | 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, | ||
| 168 | 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, | ||
| 169 | 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, | ||
| 170 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 171 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 172 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 173 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 174 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 175 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 176 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 177 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, | ||
| 178 | 0xFC, 0xF6, 0xF7, 0xEF, 0xFF, 0x87, | ||
| 179 | 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, | ||
| 180 | 0x1F, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, | ||
| 181 | 0xFF, 0x07, 0x1F, 0x1F, 0x19, 0x15, | ||
| 182 | 0xF7, 0x16, 0x1A, 0x1B, 0x16, 0x07, | ||
| 183 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 184 | 0x00, 0x00, 0x0C, 0x0C, 0x33, 0x33, | ||
| 185 | 0x33, 0x33, 0x33, 0x33, 0xC0, 0xC0, | ||
| 186 | 0x00, 0x00, 0x03, 0x03, 0xFF, 0xFF, | ||
| 187 | 0x03, 0x03, 0x00, 0x00, 0xC0, 0xC0, | ||
| 188 | 0x00, 0x00, 0x00, 0xFC, 0xFC, 0x03, | ||
| 189 | 0x03, 0x03, 0x03, 0x03, 0x03, 0xFC, | ||
| 190 | 0xFC, 0x00, 0x00, 0x00, 0xFC, 0xFC, | ||
| 191 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, | ||
| 192 | 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, | ||
| 193 | 0xFF, 0xFF, 0x30, 0x30, 0xCC, 0xCC, | ||
| 194 | 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, | ||
| 195 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 196 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 197 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 198 | 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, | ||
| 199 | 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, | ||
| 200 | 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, | ||
| 201 | 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, | ||
| 202 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 203 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 204 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 205 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 206 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 207 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 208 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 209 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, | ||
| 210 | 0x03, 0x07, 0x07, 0x07, 0x07, 0x01, | ||
| 211 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 212 | 0x00, 0x00, 0x00, 0x03, 0x07, 0x07, | ||
| 213 | 0x03, 0x00, 0x00, 0x02, 0x04, 0x00, | ||
| 214 | 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 215 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 216 | 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, | ||
| 217 | 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, | ||
| 218 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 219 | 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, | ||
| 220 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, | ||
| 221 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, | ||
| 222 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 223 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, | ||
| 224 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 225 | 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, | ||
| 226 | 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, | ||
| 227 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 228 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 229 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 230 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 231 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 232 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 233 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 234 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 235 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 236 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 237 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 238 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 239 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 240 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 241 | }; | ||
diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c index 6eb21d2f2..2f79ad11c 100644 --- a/users/drashna/process_records.c +++ b/users/drashna/process_records.c | |||
| @@ -2,11 +2,9 @@ | |||
| 2 | 2 | ||
| 3 | uint16_t copy_paste_timer; | 3 | uint16_t copy_paste_timer; |
| 4 | 4 | ||
| 5 | __attribute__((weak)) | 5 | __attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } |
| 6 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } | ||
| 7 | 6 | ||
| 8 | __attribute__((weak)) | 7 | __attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; } |
| 9 | bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; } | ||
| 10 | 8 | ||
| 11 | // Defines actions tor my global custom keycodes. Defined in drashna.h file | 9 | // Defines actions tor my global custom keycodes. Defined in drashna.h file |
| 12 | // Then runs the _keymap's record handier if not processed here | 10 | // Then runs the _keymap's record handier if not processed here |
| @@ -23,7 +21,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 23 | switch (keycode) { | 21 | switch (keycode) { |
| 24 | case KC_QWERTY ... KC_WORKMAN: | 22 | case KC_QWERTY ... KC_WORKMAN: |
| 25 | if (record->event.pressed) { | 23 | if (record->event.pressed) { |
| 26 | uint8_t mods = mod_config(get_mods()|get_oneshot_mods()); | 24 | uint8_t mods = mod_config(get_mods() | get_oneshot_mods()); |
| 27 | if (!mods) { | 25 | if (!mods) { |
| 28 | set_single_persistent_default_layer(keycode - KC_QWERTY); | 26 | set_single_persistent_default_layer(keycode - KC_QWERTY); |
| 29 | } else if (mods & MOD_MASK_SHIFT) { | 27 | } else if (mods & MOD_MASK_SHIFT) { |
diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index a9af0566e..52ec61c22 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c | |||
| @@ -12,9 +12,9 @@ void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight | |||
| 12 | #if defined(RGB_MATRIX_ENABLE) | 12 | #if defined(RGB_MATRIX_ENABLE) |
| 13 | static uint32_t hypno_timer; | 13 | static uint32_t hypno_timer; |
| 14 | # if defined(SPLIT_KEYBOARD) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_crkbd) | 14 | # if defined(SPLIT_KEYBOARD) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_crkbd) |
| 15 | # define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL | 15 | # define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL |
| 16 | # else | 16 | # else |
| 17 | # define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN | 17 | # define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN |
| 18 | # endif | 18 | # endif |
| 19 | #endif | 19 | #endif |
| 20 | 20 | ||
| @@ -23,68 +23,68 @@ static uint32_t hypno_timer; | |||
| 23 | * This is especially useful for One Shot Mods, since it's not always obvious if they're still lit up. | 23 | * This is especially useful for One Shot Mods, since it's not always obvious if they're still lit up. |
| 24 | */ | 24 | */ |
| 25 | #ifdef RGBLIGHT_ENABLE | 25 | #ifdef RGBLIGHT_ENABLE |
| 26 | #ifdef INDICATOR_LIGHTS | 26 | # ifdef INDICATOR_LIGHTS |
| 27 | void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) { | 27 | void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) { |
| 28 | if (userspace_config.rgb_layer_change && biton32(layer_state) == 0) { | 28 | if (userspace_config.rgb_layer_change && get_highest_layer(layer_state) == 0) { |
| 29 | if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) { | 29 | if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) { |
| 30 | # ifdef SHFT_LED1 | 30 | # ifdef SHFT_LED1 |
| 31 | rgblight_sethsv_at(120, 255, 255, SHFT_LED1); | 31 | rgblight_sethsv_at(120, 255, 255, SHFT_LED1); |
| 32 | # endif // SHFT_LED1 | 32 | # endif // SHFT_LED1 |
| 33 | # ifdef SHFT_LED2 | 33 | # ifdef SHFT_LED2 |
| 34 | rgblight_sethsv_at(120, 255, 255, SHFT_LED2); | 34 | rgblight_sethsv_at(120, 255, 255, SHFT_LED2); |
| 35 | # endif // SHFT_LED2 | 35 | # endif // SHFT_LED2 |
| 36 | } else { | 36 | } else { |
| 37 | # ifdef SHFT_LED1 | 37 | # ifdef SHFT_LED1 |
| 38 | rgblight_sethsv_default_helper(SHFT_LED1); | 38 | rgblight_sethsv_default_helper(SHFT_LED1); |
| 39 | # endif // SHFT_LED1 | 39 | # endif // SHFT_LED1 |
| 40 | # ifdef SHFT_LED2 | 40 | # ifdef SHFT_LED2 |
| 41 | rgblight_sethsv_default_helper(SHFT_LED2); | 41 | rgblight_sethsv_default_helper(SHFT_LED2); |
| 42 | # endif // SHFT_LED2 | 42 | # endif // SHFT_LED2 |
| 43 | } | 43 | } |
| 44 | if ((this_mod | this_osm) & MOD_MASK_CTRL) { | 44 | if ((this_mod | this_osm) & MOD_MASK_CTRL) { |
| 45 | # ifdef CTRL_LED1 | 45 | # ifdef CTRL_LED1 |
| 46 | rgblight_sethsv_at(0, 255, 255, CTRL_LED1); | 46 | rgblight_sethsv_at(0, 255, 255, CTRL_LED1); |
| 47 | # endif // CTRL_LED1 | 47 | # endif // CTRL_LED1 |
| 48 | # ifdef CTRL_LED2 | 48 | # ifdef CTRL_LED2 |
| 49 | rgblight_sethsv_at(0, 255, 255, CTRL_LED2); | 49 | rgblight_sethsv_at(0, 255, 255, CTRL_LED2); |
| 50 | # endif // CTRL_LED2 | 50 | # endif // CTRL_LED2 |
| 51 | } else { | 51 | } else { |
| 52 | # ifdef CTRL_LED1 | 52 | # ifdef CTRL_LED1 |
| 53 | rgblight_sethsv_default_helper(CTRL_LED1); | 53 | rgblight_sethsv_default_helper(CTRL_LED1); |
| 54 | # endif // CTRL_LED1 | 54 | # endif // CTRL_LED1 |
| 55 | # ifdef CTRL_LED2 | 55 | # ifdef CTRL_LED2 |
| 56 | rgblight_sethsv_default_helper(CTRL_LED2); | 56 | rgblight_sethsv_default_helper(CTRL_LED2); |
| 57 | # endif // CTRL_LED2 | 57 | # endif // CTRL_LED2 |
| 58 | } | 58 | } |
| 59 | if ((this_mod | this_osm) & MOD_MASK_GUI) { | 59 | if ((this_mod | this_osm) & MOD_MASK_GUI) { |
| 60 | # ifdef GUI_LED1 | 60 | # ifdef GUI_LED1 |
| 61 | rgblight_sethsv_at(51, 255, 255, GUI_LED1); | 61 | rgblight_sethsv_at(51, 255, 255, GUI_LED1); |
| 62 | # endif // GUI_LED1 | 62 | # endif // GUI_LED1 |
| 63 | # ifdef GUI_LED2 | 63 | # ifdef GUI_LED2 |
| 64 | rgblight_sethsv_at(51, 255, 255, GUI_LED2); | 64 | rgblight_sethsv_at(51, 255, 255, GUI_LED2); |
| 65 | # endif // GUI_LED2 | 65 | # endif // GUI_LED2 |
| 66 | } else { | 66 | } else { |
| 67 | # ifdef GUI_LED1 | 67 | # ifdef GUI_LED1 |
| 68 | rgblight_sethsv_default_helper(GUI_LED1); | 68 | rgblight_sethsv_default_helper(GUI_LED1); |
| 69 | # endif // GUI_LED1 | 69 | # endif // GUI_LED1 |
| 70 | # ifdef GUI_LED2 | 70 | # ifdef GUI_LED2 |
| 71 | rgblight_sethsv_default_helper(GUI_LED2); | 71 | rgblight_sethsv_default_helper(GUI_LED2); |
| 72 | # endif // GUI_LED2 | 72 | # endif // GUI_LED2 |
| 73 | } | 73 | } |
| 74 | if ((this_mod | this_osm) & MOD_MASK_ALT) { | 74 | if ((this_mod | this_osm) & MOD_MASK_ALT) { |
| 75 | # ifdef ALT_LED1 | 75 | # ifdef ALT_LED1 |
| 76 | rgblight_sethsv_at(240, 255, 255, ALT_LED1); | 76 | rgblight_sethsv_at(240, 255, 255, ALT_LED1); |
| 77 | # endif // ALT_LED1 | 77 | # endif // ALT_LED1 |
| 78 | # ifdef GUI_LED2 | 78 | # ifdef GUI_LED2 |
| 79 | rgblight_sethsv_at(240, 255, 255, ALT_LED2); | 79 | rgblight_sethsv_at(240, 255, 255, ALT_LED2); |
| 80 | # endif // GUI_LED2 | 80 | # endif // GUI_LED2 |
| 81 | } else { | 81 | } else { |
| 82 | # ifdef GUI_LED1 | 82 | # ifdef GUI_LED1 |
| 83 | rgblight_sethsv_default_helper(ALT_LED1); | 83 | rgblight_sethsv_default_helper(ALT_LED1); |
| 84 | # endif // GUI_LED1 | 84 | # endif // GUI_LED1 |
| 85 | # ifdef GUI_LED2 | 85 | # ifdef GUI_LED2 |
| 86 | rgblight_sethsv_default_helper(ALT_LED2); | 86 | rgblight_sethsv_default_helper(ALT_LED2); |
| 87 | # endif // GUI_LED2 | 87 | # endif // GUI_LED2 |
| 88 | } | 88 | } |
| 89 | } | 89 | } |
| 90 | } | 90 | } |
| @@ -95,9 +95,9 @@ void matrix_scan_indicator(void) { | |||
| 95 | set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods()); | 95 | set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods()); |
| 96 | } | 96 | } |
| 97 | } | 97 | } |
| 98 | #endif // INDICATOR_LIGHTS | 98 | # endif // INDICATOR_LIGHTS |
| 99 | 99 | ||
| 100 | #ifdef RGBLIGHT_TWINKLE | 100 | # ifdef RGBLIGHT_TWINKLE |
| 101 | static rgblight_fadeout lights[RGBLED_NUM]; | 101 | static rgblight_fadeout lights[RGBLED_NUM]; |
| 102 | 102 | ||
| 103 | __attribute__((weak)) bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { return false; } | 103 | __attribute__((weak)) bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { return false; } |
| @@ -105,40 +105,40 @@ __attribute__((weak)) bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { | |||
| 105 | /* This function checks for used LEDs. This way, collisions don't occur and cause weird rendering */ | 105 | /* This function checks for used LEDs. This way, collisions don't occur and cause weird rendering */ |
| 106 | bool rgblight_twinkle_is_led_used(uint8_t index) { | 106 | bool rgblight_twinkle_is_led_used(uint8_t index) { |
| 107 | switch (index) { | 107 | switch (index) { |
| 108 | # ifdef INDICATOR_LIGHTS | 108 | # ifdef INDICATOR_LIGHTS |
| 109 | # ifdef SHFT_LED1 | 109 | # ifdef SHFT_LED1 |
| 110 | case SHFT_LED1: | 110 | case SHFT_LED1: |
| 111 | return true; | 111 | return true; |
| 112 | # endif // SHFT_LED1 | 112 | # endif // SHFT_LED1 |
| 113 | # ifdef SHFT_LED2 | 113 | # ifdef SHFT_LED2 |
| 114 | case SHFT_LED2: | 114 | case SHFT_LED2: |
| 115 | return true; | 115 | return true; |
| 116 | # endif // SHFT_LED2 | 116 | # endif // SHFT_LED2 |
| 117 | # ifdef CTRL_LED1 | 117 | # ifdef CTRL_LED1 |
| 118 | case CTRL_LED1: | 118 | case CTRL_LED1: |
| 119 | return true; | 119 | return true; |
| 120 | # endif // CTRL_LED1 | 120 | # endif // CTRL_LED1 |
| 121 | # ifdef CTRL_LED2 | 121 | # ifdef CTRL_LED2 |
| 122 | case CTRL_LED2: | 122 | case CTRL_LED2: |
| 123 | return true; | 123 | return true; |
| 124 | # endif // CTRL_LED2 | 124 | # endif // CTRL_LED2 |
| 125 | # ifdef GUI_LED1 | 125 | # ifdef GUI_LED1 |
| 126 | case GUI_LED1: | 126 | case GUI_LED1: |
| 127 | return true; | 127 | return true; |
| 128 | # endif // GUI_LED1 | 128 | # endif // GUI_LED1 |
| 129 | # ifdef GUI_LED2 | 129 | # ifdef GUI_LED2 |
| 130 | case GUI_LED2: | 130 | case GUI_LED2: |
| 131 | return true; | 131 | return true; |
| 132 | # endif // GUI_LED2 | 132 | # endif // GUI_LED2 |
| 133 | # ifdef ALT_LED1 | 133 | # ifdef ALT_LED1 |
| 134 | case ALT_LED1: | 134 | case ALT_LED1: |
| 135 | return true; | 135 | return true; |
| 136 | # endif // ALT_LED1 | 136 | # endif // ALT_LED1 |
| 137 | # ifdef ALT_LED2 | 137 | # ifdef ALT_LED2 |
| 138 | case ALT_LED2: | 138 | case ALT_LED2: |
| 139 | return true; | 139 | return true; |
| 140 | # endif // ALT_LED2 | 140 | # endif // ALT_LED2 |
| 141 | # endif // INDICATOR_LIGHTS | 141 | # endif // INDICATOR_LIGHTS |
| 142 | default: | 142 | default: |
| 143 | return rgblight_twinkle_is_led_used_keymap(index); | 143 | return rgblight_twinkle_is_led_used_keymap(index); |
| 144 | } | 144 | } |
| @@ -154,19 +154,19 @@ void scan_rgblight_fadeout(void) { // Don't effing change this function .... rg | |||
| 154 | 154 | ||
| 155 | if (light->life) { | 155 | if (light->life) { |
| 156 | light->life -= 1; | 156 | light->life -= 1; |
| 157 | if (biton32(layer_state) == 0) { | 157 | if (get_highest_layer(layer_state) == 0) { |
| 158 | sethsv(light->hue + rand() % 0xF, 255, light->life, (LED_TYPE *)&led[light_index]); | 158 | sethsv(light->hue + rand() % 0xF, 255, light->life, (LED_TYPE *)&led[light_index]); |
| 159 | } | 159 | } |
| 160 | light->timer = timer_read(); | 160 | light->timer = timer_read(); |
| 161 | } else { | 161 | } else { |
| 162 | if (light->enabled && biton32(layer_state) == 0) { | 162 | if (light->enabled && get_highest_layer(layer_state) == 0) { |
| 163 | rgblight_sethsv_default_helper(light_index); | 163 | rgblight_sethsv_default_helper(light_index); |
| 164 | } | 164 | } |
| 165 | litup = light->enabled = false; | 165 | litup = light->enabled = false; |
| 166 | } | 166 | } |
| 167 | } | 167 | } |
| 168 | } | 168 | } |
| 169 | if (litup && biton32(layer_state) == 0) { | 169 | if (litup && get_highest_layer(layer_state) == 0) { |
| 170 | rgblight_set(); | 170 | rgblight_set(); |
| 171 | } | 171 | } |
| 172 | } | 172 | } |
| @@ -211,8 +211,8 @@ void start_rgb_light(void) { | |||
| 211 | 211 | ||
| 212 | rgblight_sethsv_at(light->hue, 255, light->life, light_index); | 212 | rgblight_sethsv_at(light->hue, 255, light->life, light_index); |
| 213 | } | 213 | } |
| 214 | #endif | 214 | # endif |
| 215 | #endif // RGBLIGHT_ENABLE | 215 | #endif // RGBLIGHT_ENABLE |
| 216 | 216 | ||
| 217 | bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { | 217 | bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { |
| 218 | uint16_t temp_keycode = keycode; | 218 | uint16_t temp_keycode = keycode; |
| @@ -259,7 +259,9 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { | |||
| 259 | userspace_config.rgb_matrix_idle_anim ^= 1; | 259 | userspace_config.rgb_matrix_idle_anim ^= 1; |
| 260 | dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); | 260 | dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); |
| 261 | eeconfig_update_user(userspace_config.raw); | 261 | eeconfig_update_user(userspace_config.raw); |
| 262 | if (userspace_config.rgb_matrix_idle_anim) { rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); } | 262 | if (userspace_config.rgb_matrix_idle_anim) { |
| 263 | rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); | ||
| 264 | } | ||
| 263 | } | 265 | } |
| 264 | #endif | 266 | #endif |
| 265 | break; | 267 | break; |
| @@ -281,7 +283,9 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { | |||
| 281 | is_eeprom_updated = true; | 283 | is_eeprom_updated = true; |
| 282 | } | 284 | } |
| 283 | #endif | 285 | #endif |
| 284 | if (is_eeprom_updated) { eeconfig_update_user(userspace_config.raw); } | 286 | if (is_eeprom_updated) { |
| 287 | eeconfig_update_user(userspace_config.raw); | ||
| 288 | } | ||
| 285 | } | 289 | } |
| 286 | break; | 290 | break; |
| 287 | } | 291 | } |
| @@ -290,7 +294,7 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { | |||
| 290 | 294 | ||
| 291 | void keyboard_post_init_rgb(void) { | 295 | void keyboard_post_init_rgb(void) { |
| 292 | #if defined(RGBLIGHT_ENABLE) | 296 | #if defined(RGBLIGHT_ENABLE) |
| 293 | # if defined(RGBLIGHT_STARTUP_ANIMATION) | 297 | # if defined(RGBLIGHT_STARTUP_ANIMATION) |
| 294 | bool is_enabled = rgblight_config.enable; | 298 | bool is_enabled = rgblight_config.enable; |
| 295 | if (userspace_config.rgb_layer_change) { | 299 | if (userspace_config.rgb_layer_change) { |
| 296 | rgblight_enable_noeeprom(); | 300 | rgblight_enable_noeeprom(); |
| @@ -309,13 +313,13 @@ void keyboard_post_init_rgb(void) { | |||
| 309 | rgblight_disable_noeeprom(); | 313 | rgblight_disable_noeeprom(); |
| 310 | } | 314 | } |
| 311 | 315 | ||
| 312 | # endif | 316 | # endif |
| 313 | layer_state_set_user(layer_state); | 317 | layer_state_set_user(layer_state); |
| 314 | #endif | 318 | #endif |
| 315 | #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) | 319 | #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) |
| 316 | if (userspace_config.rgb_matrix_idle_anim) { | 320 | if (userspace_config.rgb_matrix_idle_anim) { |
| 317 | rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); | 321 | rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); |
| 318 | } | 322 | } |
| 319 | #endif | 323 | #endif |
| 320 | } | 324 | } |
| 321 | 325 | ||
| @@ -337,67 +341,70 @@ void matrix_scan_rgb(void) { | |||
| 337 | #endif | 341 | #endif |
| 338 | } | 342 | } |
| 339 | 343 | ||
| 344 | #ifdef RGBLIGHT_ENABLE | ||
| 345 | void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) { | ||
| 346 | rgblight_sethsv_noeeprom(hue, sat, val); | ||
| 347 | wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly | ||
| 348 | rgblight_mode_noeeprom(mode); | ||
| 349 | } | ||
| 350 | #endif | ||
| 351 | |||
| 340 | layer_state_t layer_state_set_rgb(layer_state_t state) { | 352 | layer_state_t layer_state_set_rgb(layer_state_t state) { |
| 341 | #ifdef RGBLIGHT_ENABLE | 353 | #ifdef RGBLIGHT_ENABLE |
| 342 | if (userspace_config.rgb_layer_change) { | 354 | if (userspace_config.rgb_layer_change) { |
| 343 | switch (biton32(state)) { | 355 | switch (get_highest_layer(state)) { |
| 344 | case _MACROS: | 356 | case _MACROS: |
| 345 | rgblight_sethsv_noeeprom_orange(); | 357 | rgblight_set_hsv_and_mode(HSV_ORANGE, userspace_config.is_overwatch ? RGBLIGHT_MODE_SNAKE + 2 : RGBLIGHT_MODE_SNAKE + 3); |
| 346 | userspace_config.is_overwatch ? rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 2) : rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 3); | ||
| 347 | break; | 358 | break; |
| 348 | case _MEDIA: | 359 | case _MEDIA: |
| 349 | rgblight_sethsv_noeeprom_chartreuse(); | 360 | rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_KNIGHT + 1); |
| 350 | rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 1); | ||
| 351 | break; | 361 | break; |
| 352 | case _GAMEPAD: | 362 | case _GAMEPAD: |
| 353 | rgblight_sethsv_noeeprom_orange(); | 363 | rgblight_set_hsv_and_mode(HSV_ORANGE, RGBLIGHT_MODE_SNAKE + 2); |
| 354 | rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 2); | ||
| 355 | break; | 364 | break; |
| 356 | case _DIABLO: | 365 | case _DIABLO: |
| 357 | rgblight_sethsv_noeeprom_red(); | 366 | rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_BREATHING + 3); |
| 358 | rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); | ||
| 359 | break; | 367 | break; |
| 360 | case _RAISE: | 368 | case _RAISE: |
| 361 | rgblight_sethsv_noeeprom_yellow(); | 369 | rgblight_set_hsv_and_mode(HSV_YELLOW, RGBLIGHT_MODE_BREATHING + 3); |
| 362 | rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); | ||
| 363 | break; | 370 | break; |
| 364 | case _LOWER: | 371 | case _LOWER: |
| 365 | rgblight_sethsv_noeeprom_green(); | 372 | rgblight_set_hsv_and_mode(HSV_GREEN, RGBLIGHT_MODE_BREATHING + 3); |
| 366 | rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); | ||
| 367 | break; | 373 | break; |
| 368 | case _ADJUST: | 374 | case _ADJUST: |
| 369 | rgblight_sethsv_noeeprom_red(); | 375 | rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_KNIGHT + 2); |
| 370 | rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); | ||
| 371 | break; | 376 | break; |
| 372 | default: // for any other layers, or the default layer | 377 | default: // for any other layers, or the default layer |
| 373 | switch (biton32(default_layer_state)) { | 378 | { |
| 379 | uint8_t mode = get_highest_layer(state) == _MODS ? RGBLIGHT_MODE_BREATHING : RGBLIGHT_MODE_STATIC_LIGHT; | ||
| 380 | switch (get_highest_layer(default_layer_state)) { | ||
| 374 | case _COLEMAK: | 381 | case _COLEMAK: |
| 375 | rgblight_sethsv_noeeprom_magenta(); | 382 | rgblight_set_hsv_and_mode(HSV_MAGENTA, mode); |
| 376 | break; | 383 | break; |
| 377 | case _DVORAK: | 384 | case _DVORAK: |
| 378 | rgblight_sethsv_noeeprom_springgreen(); | 385 | rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, mode); |
| 379 | break; | 386 | break; |
| 380 | case _WORKMAN: | 387 | case _WORKMAN: |
| 381 | rgblight_sethsv_noeeprom_goldenrod(); | 388 | rgblight_set_hsv_and_mode(HSV_GOLDENROD, mode); |
| 382 | break; | 389 | break; |
| 383 | case _NORMAN: | 390 | case _NORMAN: |
| 384 | rgblight_sethsv_noeeprom_coral(); | 391 | rgblight_set_hsv_and_mode(HSV_CORAL, mode); |
| 385 | break; | 392 | break; |
| 386 | case _MALTRON: | 393 | case _MALTRON: |
| 387 | rgblight_sethsv_noeeprom_yellow(); | 394 | rgblight_set_hsv_and_mode(HSV_YELLOW, mode); |
| 388 | break; | 395 | break; |
| 389 | case _EUCALYN: | 396 | case _EUCALYN: |
| 390 | rgblight_sethsv_noeeprom_pink(); | 397 | rgblight_set_hsv_and_mode(HSV_PINK, mode); |
| 391 | break; | 398 | break; |
| 392 | case _CARPLAX: | 399 | case _CARPLAX: |
| 393 | rgblight_sethsv_noeeprom_blue(); | 400 | rgblight_set_hsv_and_mode(HSV_BLUE, mode); |
| 394 | break; | 401 | break; |
| 395 | default: | 402 | default: |
| 396 | rgblight_sethsv_noeeprom_cyan(); | 403 | rgblight_set_hsv_and_mode(HSV_CYAN, mode); |
| 397 | break; | 404 | break; |
| 398 | } | 405 | } |
| 399 | biton32(state) == _MODS ? rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING) : rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it | ||
| 400 | break; | 406 | break; |
| 407 | } | ||
| 401 | } | 408 | } |
| 402 | } | 409 | } |
| 403 | #endif // RGBLIGHT_ENABLE | 410 | #endif // RGBLIGHT_ENABLE |
| @@ -408,6 +415,7 @@ layer_state_t layer_state_set_rgb(layer_state_t state) { | |||
| 408 | #ifdef RGB_MATRIX_ENABLE | 415 | #ifdef RGB_MATRIX_ENABLE |
| 409 | # include "lib/lib8tion/lib8tion.h" | 416 | # include "lib/lib8tion/lib8tion.h" |
| 410 | extern led_config_t g_led_config; | 417 | extern led_config_t g_led_config; |
| 418 | |||
| 411 | void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) { | 419 | void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) { |
| 412 | HSV hsv = {hue, sat, val}; | 420 | HSV hsv = {hue, sat, val}; |
| 413 | if (hsv.v > rgb_matrix_config.hsv.v) { | 421 | if (hsv.v > rgb_matrix_config.hsv.v) { |
diff --git a/users/drashna/rgb_stuff.h b/users/drashna/rgb_stuff.h index 7e34c93c1..50b73c1c3 100644 --- a/users/drashna/rgb_stuff.h +++ b/users/drashna/rgb_stuff.h | |||
| @@ -20,13 +20,13 @@ layer_state_t layer_state_set_rgb(layer_state_t state); | |||
| 20 | layer_state_t default_layer_state_set_rgb(layer_state_t state); | 20 | layer_state_t default_layer_state_set_rgb(layer_state_t state); |
| 21 | 21 | ||
| 22 | #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_TWINKLE) | 22 | #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_TWINKLE) |
| 23 | void scan_rgblight_fadeout(void); | 23 | void scan_rgblight_fadeout(void); |
| 24 | #endif | 24 | #endif |
| 25 | #if defined(RGBLIGHT_ENABLE) | 25 | #if defined(RGBLIGHT_ENABLE) |
| 26 | void rgblight_sethsv_default_helper(uint8_t index); | 26 | void rgblight_sethsv_default_helper(uint8_t index); |
| 27 | #endif | 27 | #endif |
| 28 | 28 | ||
| 29 | #ifdef RGB_MATRIX_ENABLE | 29 | #ifdef RGB_MATRIX_ENABLE |
| 30 | void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue); | 30 | void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue); |
| 31 | void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type); | 31 | void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type); |
| 32 | #endif | 32 | #endif |
diff --git a/users/drashna/rgblight_breathe_table.h b/users/drashna/rgblight_breathe_table.h index 05d347fcd..4c6ae38fa 100644 --- a/users/drashna/rgblight_breathe_table.h +++ b/users/drashna/rgblight_breathe_table.h | |||
| @@ -1,9 +1,10 @@ | |||
| 1 | #ifndef RGBLIGHT_EFFECT_BREATHE_TABLE | 1 | #ifndef RGBLIGHT_EFFECT_BREATHE_TABLE |
| 2 | #define RGBLIGHT_EFFECT_BREATHE_TABLE | 2 | #define RGBLIGHT_EFFECT_BREATHE_TABLE |
| 3 | 3 | ||
| 4 | // clang-format off | ||
| 4 | const uint8_t rgblight_effect_breathe_table[] PROGMEM = { | 5 | const uint8_t rgblight_effect_breathe_table[] PROGMEM = { |
| 5 | /* #define RGBLIGHT_EFFECT_BREATHE_CENTER 0.00 */ | 6 | /* #define RGBLIGHT_EFFECT_BREATHE_CENTER 0.00 */ |
| 6 | /* #define RGBLIGHT_EFFECT_BREATHE_MAX 255 */ | 7 | /* #define RGBLIGHT_EFFECT_BREATHE_MAX 255 */ |
| 7 | 8 | ||
| 8 | #if RGBLIGHT_BREATHE_TABLE_SIZE == 256 | 9 | #if RGBLIGHT_BREATHE_TABLE_SIZE == 256 |
| 9 | 0x44, 0x45, 0x47, 0x48, 0x4a, 0x4b, 0x4c, 0x4e, | 10 | 0x44, 0x45, 0x47, 0x48, 0x4a, 0x4b, 0x4c, 0x4e, |
| @@ -110,7 +111,8 @@ const uint8_t rgblight_effect_breathe_table[] PROGMEM = { | |||
| 110 | 0x4e, 0x48 | 111 | 0x4e, 0x48 |
| 111 | #endif /* 64 bytes table */ | 112 | #endif /* 64 bytes table */ |
| 112 | }; | 113 | }; |
| 114 | // clang-format on | ||
| 113 | 115 | ||
| 114 | static const int table_scale = 256/sizeof(rgblight_effect_breathe_table); | 116 | static const int table_scale = 256 / sizeof(rgblight_effect_breathe_table); |
| 115 | 117 | ||
| 116 | #endif /* RGBLIGHT_EFFECT_BREATHE_TABLE */ | 118 | #endif /* RGBLIGHT_EFFECT_BREATHE_TABLE */ |
diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index 1b5a86385..882857fc8 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk | |||
| @@ -1,16 +1,16 @@ | |||
| 1 | SRC += drashna.c \ | 1 | SRC += drashna.c \ |
| 2 | process_records.c | 2 | process_records.c |
| 3 | 3 | ||
| 4 | LINK_TIME_OPTIMIZATION_ENABLE = yes | 4 | LTO_ENABLE = yes |
| 5 | SPACE_CADET_ENABLE = no | 5 | SPACE_CADET_ENABLE = no |
| 6 | 6 | ||
| 7 | ifneq ($(strip $(NO_SECRETS)), yes) | 7 | ifneq ($(strip $(NO_SECRETS)), yes) |
| 8 | ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") | 8 | ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") |
| 9 | SRC += secrets.c | 9 | SRC += secrets.c |
| 10 | endif | 10 | endif |
| 11 | ifeq ($(strip $(NO_SECRETS)), lite) | 11 | ifeq ($(strip $(NO_SECRETS)), lite) |
| 12 | OPT_DEFS += -DNO_SECRETS | 12 | OPT_DEFS += -DNO_SECRETS |
| 13 | endif | 13 | endif |
| 14 | endif | 14 | endif |
| 15 | 15 | ||
| 16 | ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) | 16 | ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) |
| @@ -52,3 +52,10 @@ endif | |||
| 52 | ifeq ($(strip $(MAKE_BOOTLOADER)), yes) | 52 | ifeq ($(strip $(MAKE_BOOTLOADER)), yes) |
| 53 | OPT_DEFS += -DMAKE_BOOTLOADER | 53 | OPT_DEFS += -DMAKE_BOOTLOADER |
| 54 | endif | 54 | endif |
| 55 | |||
| 56 | # At least until build.mk or the like drops, this is here to prevent | ||
| 57 | # VUSB boards from enabling NKRO, as they do not support it. Ideally | ||
| 58 | # this should be handled per keyboard, but until that happens ... | ||
| 59 | ifeq ($(strip $(PROTOCOL)), VUSB) | ||
| 60 | NKRO_ENABLE = no | ||
| 61 | endif \ No newline at end of file | ||
diff --git a/users/drashna/template.c b/users/drashna/template.c index d90e6bdec..833447daa 100644 --- a/users/drashna/template.c +++ b/users/drashna/template.c | |||
| @@ -1,124 +1,82 @@ | |||
| 1 | #include "template.h" | 1 | #include "template.h" |
| 2 | 2 | ||
| 3 | |||
| 4 | // Add reconfigurable functions here, for keymap customization | 3 | // Add reconfigurable functions here, for keymap customization |
| 5 | // This allows for a global, userspace functions, and continued | 4 | // This allows for a global, userspace functions, and continued |
| 6 | // customization of the keymap. Use _keymap instead of _user | 5 | // customization of the keymap. Use _keymap instead of _user |
| 7 | // functions in the keymaps | 6 | // functions in the keymaps |
| 8 | __attribute__ ((weak)) | 7 | __attribute__((weak)) void matrix_init_keymap(void) {} |
| 9 | void matrix_init_keymap(void) {} | ||
| 10 | 8 | ||
| 11 | // Call user matrix init, then call the keymap's init function | 9 | // Call user matrix init, then call the keymap's init function |
| 12 | void matrix_init_user(void) { | 10 | void matrix_init_user(void) { matrix_init_keymap(); } |
| 13 | matrix_init_keymap(); | ||
| 14 | } | ||
| 15 | 11 | ||
| 16 | 12 | __attribute__((weak)) void matrix_scan_keymap(void) {} | |
| 17 | __attribute__ ((weak)) | ||
| 18 | void matrix_scan_keymap(void) {} | ||
| 19 | 13 | ||
| 20 | // No global matrix scan code, so just run keymap's matix | 14 | // No global matrix scan code, so just run keymap's matix |
| 21 | // scan function | 15 | // scan function |
| 22 | void matrix_scan_user(void) { | 16 | void matrix_scan_user(void) { matrix_scan_keymap(); } |
| 23 | matrix_scan_keymap(); | ||
| 24 | } | ||
| 25 | 17 | ||
| 26 | 18 | __attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } | |
| 27 | __attribute__ ((weak)) | ||
| 28 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | ||
| 29 | return true; | ||
| 30 | } | ||
| 31 | 19 | ||
| 32 | // Defines actions tor my global custom keycodes. Defined in drashna.h file | 20 | // Defines actions tor my global custom keycodes. Defined in drashna.h file |
| 33 | // Then runs the _keymap's recod handier if not processed here, | 21 | // Then runs the _keymap's recod handier if not processed here, |
| 34 | // And use "NEWPLACEHOLDER" for new safe range | 22 | // And use "NEWPLACEHOLDER" for new safe range |
| 35 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 23 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 36 | 24 | switch (keycode) { | |
| 37 | switch (keycode) { | 25 | case KC_MAKE: |
| 38 | case KC_MAKE: | 26 | if (!record->event.pressed) { |
| 39 | if (!record->event.pressed) { | 27 | SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP |
| 40 | SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP | 28 | #if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) |
| 41 | #if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) | 29 | ":dfu" |
| 42 | ":dfu" | ||
| 43 | #elif defined(BOOTLOADER_HALFKAY) | 30 | #elif defined(BOOTLOADER_HALFKAY) |
| 44 | ":teensy" | 31 | ":teensy" |
| 45 | #elif defined(BOOTLOADER_CATERINA) | 32 | #elif defined(BOOTLOADER_CATERINA) |
| 46 | ":avrdude" | 33 | ":avrdude" |
| 47 | #endif | 34 | #endif |
| 48 | SS_TAP(X_ENTER)); | 35 | SS_TAP(X_ENTER)); |
| 36 | } | ||
| 37 | return false; | ||
| 38 | break; | ||
| 39 | |||
| 40 | case VRSN: | ||
| 41 | if (record->event.pressed) { | ||
| 42 | SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); | ||
| 43 | } | ||
| 44 | return false; | ||
| 45 | break; | ||
| 49 | } | 46 | } |
| 50 | return false; | 47 | return process_record_keymap(keycode, record); |
| 51 | break; | ||
| 52 | |||
| 53 | case VRSN: | ||
| 54 | if (record->event.pressed) { | ||
| 55 | SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); | ||
| 56 | } | ||
| 57 | return false; | ||
| 58 | break; | ||
| 59 | } | ||
| 60 | return process_record_keymap(keycode, record); | ||
| 61 | } | ||
| 62 | |||
| 63 | |||
| 64 | __attribute__ ((weak)) | ||
| 65 | layer_state_t layer_state_set_keymap (layer_state_t state) { | ||
| 66 | return state; | ||
| 67 | } | ||
| 68 | |||
| 69 | layer_state_t layer_state_set_user (layer_state_t state) { | ||
| 70 | return layer_state_set_keymap (state); | ||
| 71 | } | 48 | } |
| 72 | 49 | ||
| 50 | __attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } | ||
| 73 | 51 | ||
| 52 | layer_state_t layer_state_set_user(layer_state_t state) { return layer_state_set_keymap(state); } | ||
| 74 | 53 | ||
| 75 | __attribute__ ((weak)) | 54 | __attribute__((weak)) void led_set_keymap(uint8_t usb_led) {} |
| 76 | void led_set_keymap(uint8_t usb_led) {} | ||
| 77 | |||
| 78 | void led_set_user(uint8_t usb_led) { | ||
| 79 | led_set_keymap(usb_led); | ||
| 80 | } | ||
| 81 | |||
| 82 | 55 | ||
| 56 | void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); } | ||
| 83 | 57 | ||
| 84 | __attribute__ ((weak)) | 58 | __attribute__((weak)) void suspend_power_down_keymap(void) {} |
| 85 | void suspend_power_down_keymap(void) {} | ||
| 86 | |||
| 87 | void suspend_power_down_user(void) | ||
| 88 | { | ||
| 89 | suspend_power_down_keymap(); | ||
| 90 | } | ||
| 91 | |||
| 92 | 59 | ||
| 60 | void suspend_power_down_user(void) { suspend_power_down_keymap(); } | ||
| 93 | 61 | ||
| 94 | __attribute__ ((weak)) | 62 | __attribute__((weak)) void suspend_wakeup_init_keymap(void) {} |
| 95 | void suspend_wakeup_init_keymap(void) {} | ||
| 96 | 63 | ||
| 97 | void suspend_wakeup_init_user(void) | 64 | void suspend_wakeup_init_user(void) { |
| 98 | { | 65 | suspend_wakeup_init_keymap(); |
| 99 | suspend_wakeup_init_keymap(); | 66 | #ifdef KEYBOARD_ergodox_ez |
| 100 | #ifdef KEYBOARD_ergodox_ez | 67 | wait_ms(10); |
| 101 | wait_ms(10); | 68 | #endif |
| 102 | #endif | ||
| 103 | } | 69 | } |
| 104 | 70 | ||
| 71 | __attribute__((weak)) void startup_keymap(void) {} | ||
| 105 | 72 | ||
| 106 | 73 | void startup_user(void) { | |
| 107 | __attribute__ ((weak)) | 74 | #ifdef RGBLIGHT_ENABLE |
| 108 | void startup_keymap(void) {} | ||
| 109 | |||
| 110 | void startup_user (void) { | ||
| 111 | #ifdef RGBLIGHT_ENABLE | ||
| 112 | matrix_init_rgb(); | 75 | matrix_init_rgb(); |
| 113 | #endif //RGBLIGHT_ENABLE | 76 | #endif // RGBLIGHT_ENABLE |
| 114 | startup_keymap(); | 77 | startup_keymap(); |
| 115 | } | 78 | } |
| 116 | 79 | ||
| 80 | __attribute__((weak)) void shutdown_keymap(void) {} | ||
| 117 | 81 | ||
| 118 | 82 | void shutdown_user(void) { shutdown_keymap(); } | |
| 119 | __attribute__ ((weak)) | ||
| 120 | void shutdown_keymap(void) {} | ||
| 121 | |||
| 122 | void shutdown_user (void) { | ||
| 123 | shutdown_keymap(); | ||
| 124 | } | ||
diff --git a/users/drashna/template.h b/users/drashna/template.h index dd1c48760..178f96e22 100644 --- a/users/drashna/template.h +++ b/users/drashna/template.h | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | #ifndef USERSPACE | 1 | #pragma once |
| 2 | #define USERSPACE | ||
| 3 | 2 | ||
| 4 | #include "quantum.h" | 3 | #include QMK_KEYBOARD_H |
| 5 | #include "version.h" | 4 | #include "version.h" |
| 6 | #include "eeprom.h" | 5 | #include "eeprom.h" |
| 7 | 6 | ||
| @@ -9,10 +8,8 @@ | |||
| 9 | #define BASE 0 | 8 | #define BASE 0 |
| 10 | 9 | ||
| 11 | enum custom_keycodes { | 10 | enum custom_keycodes { |
| 12 | VRSN = SAFE_RANGE, // can always be here | 11 | VRSN = SAFE_RANGE, // can always be here |
| 13 | KC_MAKE, | 12 | KC_MAKE, |
| 14 | KC_RESET, | 13 | KC_RESET, |
| 15 | NEWPLACEHOLDER //use "NEWPLACEHOLDER for keymap specific codes | 14 | NEWPLACEHOLDER // use "NEWPLACEHOLDER for keymap specific codes |
| 16 | }; | 15 | }; |
| 17 | |||
| 18 | #endif | ||
