4 #define TAPPING_TERM 200
7 static void do_code16 (uint16_t code, void (*f) (uint8_t)) {
9 case QK_MODS ... QK_MODS_MAX:
24 if (code < QK_RMODS_MIN) return;
36 static inline void qk_register_weak_mods(uint8_t kc) {
37 add_weak_mods(MOD_BIT(kc));
38 send_keyboard_report();
41 static inline void qk_unregister_weak_mods(uint8_t kc) {
42 del_weak_mods(MOD_BIT(kc));
43 send_keyboard_report();
46 static inline void qk_register_mods(uint8_t kc) {
47 add_weak_mods(MOD_BIT(kc));
48 send_keyboard_report();
51 static inline void qk_unregister_mods(uint8_t kc) {
52 del_weak_mods(MOD_BIT(kc));
53 send_keyboard_report();
56 void register_code16 (uint16_t code) {
57 if (IS_MOD(code) || code == KC_NO) {
58 do_code16 (code, qk_register_mods);
60 do_code16 (code, qk_register_weak_mods);
65 void unregister_code16 (uint16_t code) {
66 unregister_code (code);
67 if (IS_MOD(code) || code == KC_NO) {
68 do_code16 (code, qk_unregister_mods);
70 do_code16 (code, qk_unregister_weak_mods);
74 __attribute__ ((weak))
75 bool process_action_kb(keyrecord_t *record) {
79 __attribute__ ((weak))
80 bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
81 return process_record_user(keycode, record);
84 __attribute__ ((weak))
85 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
89 void reset_keyboard(void) {
96 #ifdef CATERINA_BOOTLOADER
97 *(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific
102 // Shift / paren setup
105 #define LSPO_KEY KC_9
108 #define RSPC_KEY KC_0
111 static bool shift_interrupted[2] = {0, 0};
112 static uint16_t scs_timer = 0;
114 bool process_record_quantum(keyrecord_t *record) {
116 /* This gets the keycode from the key pressed */
117 keypos_t key = record->event.key;
120 #if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
121 /* TODO: Use store_or_get_action() or a similar function. */
122 if (!disable_action_cache) {
125 if (record->event.pressed) {
126 layer = layer_switch_get_layer(key);
127 update_source_layers_cache(key, layer);
129 layer = read_source_layers_cache(key);
131 keycode = keymap_key_to_keycode(layer, key);
134 keycode = keymap_key_to_keycode(layer_switch_get_layer(key), key);
136 // This is how you use actions here
137 // if (keycode == KC_LEAD) {
139 // action.code = ACTION_DEFAULT_LAYER_SET(0);
140 // process_action(record, action);
145 process_record_kb(keycode, record) &&
147 process_midi(keycode, record) &&
150 process_music(keycode, record) &&
152 #ifdef TAP_DANCE_ENABLE
153 process_tap_dance(keycode, record) &&
155 #ifndef DISABLE_LEADER
156 process_leader(keycode, record) &&
158 #ifndef DISABLE_CHORDING
159 process_chording(keycode, record) &&
162 process_combo(keycode, record) &&
164 #ifdef UNICODE_ENABLE
165 process_unicode(keycode, record) &&
168 process_ucis(keycode, record) &&
170 #ifdef PRINTING_ENABLE
171 process_printer(keycode, record) &&
173 #ifdef UNICODEMAP_ENABLE
174 process_unicode_map(keycode, record) &&
180 // Shift / paren setup
184 if (record->event.pressed) {
190 if (record->event.pressed) {
191 print("\nDEBUG: enabled.\n");
196 #ifdef RGBLIGHT_ENABLE
198 if (record->event.pressed) {
204 if (record->event.pressed) {
210 if (record->event.pressed) {
211 rgblight_increase_hue();
216 if (record->event.pressed) {
217 rgblight_decrease_hue();
222 if (record->event.pressed) {
223 rgblight_increase_sat();
228 if (record->event.pressed) {
229 rgblight_decrease_sat();
234 if (record->event.pressed) {
235 rgblight_increase_val();
240 if (record->event.pressed) {
241 rgblight_decrease_val();
246 case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_NKRO:
247 if (record->event.pressed) {
248 // MAGIC actions (BOOTMAGIC without the boot)
249 if (!eeconfig_is_enabled()) {
253 keymap_config.raw = eeconfig_read_keymap();
256 case MAGIC_SWAP_CONTROL_CAPSLOCK:
257 keymap_config.swap_control_capslock = true;
259 case MAGIC_CAPSLOCK_TO_CONTROL:
260 keymap_config.capslock_to_control = true;
262 case MAGIC_SWAP_LALT_LGUI:
263 keymap_config.swap_lalt_lgui = true;
265 case MAGIC_SWAP_RALT_RGUI:
266 keymap_config.swap_ralt_rgui = true;
269 keymap_config.no_gui = true;
271 case MAGIC_SWAP_GRAVE_ESC:
272 keymap_config.swap_grave_esc = true;
274 case MAGIC_SWAP_BACKSLASH_BACKSPACE:
275 keymap_config.swap_backslash_backspace = true;
277 case MAGIC_HOST_NKRO:
278 keymap_config.nkro = true;
280 case MAGIC_SWAP_ALT_GUI:
281 keymap_config.swap_lalt_lgui = true;
282 keymap_config.swap_ralt_rgui = true;
284 case MAGIC_UNSWAP_CONTROL_CAPSLOCK:
285 keymap_config.swap_control_capslock = false;
287 case MAGIC_UNCAPSLOCK_TO_CONTROL:
288 keymap_config.capslock_to_control = false;
290 case MAGIC_UNSWAP_LALT_LGUI:
291 keymap_config.swap_lalt_lgui = false;
293 case MAGIC_UNSWAP_RALT_RGUI:
294 keymap_config.swap_ralt_rgui = false;
297 keymap_config.no_gui = false;
299 case MAGIC_UNSWAP_GRAVE_ESC:
300 keymap_config.swap_grave_esc = false;
302 case MAGIC_UNSWAP_BACKSLASH_BACKSPACE:
303 keymap_config.swap_backslash_backspace = false;
305 case MAGIC_UNHOST_NKRO:
306 keymap_config.nkro = false;
308 case MAGIC_UNSWAP_ALT_GUI:
309 keymap_config.swap_lalt_lgui = false;
310 keymap_config.swap_ralt_rgui = false;
312 case MAGIC_TOGGLE_NKRO:
313 keymap_config.nkro = !keymap_config.nkro;
318 eeconfig_update_keymap(keymap_config.raw);
319 clear_keyboard(); // clear to prevent stuck keys
325 if (record->event.pressed) {
326 shift_interrupted[0] = false;
327 scs_timer = timer_read ();
328 register_mods(MOD_BIT(KC_LSFT));
331 #ifdef DISABLE_SPACE_CADET_ROLLOVER
332 if (get_mods() & MOD_BIT(KC_RSFT)) {
333 shift_interrupted[0] = true;
334 shift_interrupted[1] = true;
337 if (!shift_interrupted[0] && timer_elapsed(scs_timer) < TAPPING_TERM) {
338 register_code(LSPO_KEY);
339 unregister_code(LSPO_KEY);
341 unregister_mods(MOD_BIT(KC_LSFT));
348 if (record->event.pressed) {
349 shift_interrupted[1] = false;
350 scs_timer = timer_read ();
351 register_mods(MOD_BIT(KC_RSFT));
354 #ifdef DISABLE_SPACE_CADET_ROLLOVER
355 if (get_mods() & MOD_BIT(KC_LSFT)) {
356 shift_interrupted[0] = true;
357 shift_interrupted[1] = true;
360 if (!shift_interrupted[1] && timer_elapsed(scs_timer) < TAPPING_TERM) {
361 register_code(RSPC_KEY);
362 unregister_code(RSPC_KEY);
364 unregister_mods(MOD_BIT(KC_RSFT));
370 shift_interrupted[0] = true;
371 shift_interrupted[1] = true;
376 return process_action_kb(record);
379 const bool ascii_to_qwerty_shift_lut[0x80] PROGMEM = {
380 0, 0, 0, 0, 0, 0, 0, 0,
381 0, 0, 0, 0, 0, 0, 0, 0,
382 0, 0, 0, 0, 0, 0, 0, 0,
383 0, 0, 0, 0, 0, 0, 0, 0,
384 0, 1, 1, 1, 1, 1, 1, 0,
385 1, 1, 1, 1, 0, 0, 0, 0,
386 0, 0, 0, 0, 0, 0, 0, 0,
387 0, 0, 1, 0, 1, 0, 1, 1,
388 1, 1, 1, 1, 1, 1, 1, 1,
389 1, 1, 1, 1, 1, 1, 1, 1,
390 1, 1, 1, 1, 1, 1, 1, 1,
391 1, 1, 1, 0, 0, 0, 1, 1,
392 0, 0, 0, 0, 0, 0, 0, 0,
393 0, 0, 0, 0, 0, 0, 0, 0,
394 0, 0, 0, 0, 0, 0, 0, 0,
395 0, 0, 0, 1, 1, 1, 1, 0
398 const uint8_t ascii_to_qwerty_keycode_lut[0x80] PROGMEM = {
399 0, 0, 0, 0, 0, 0, 0, 0,
400 KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0,
401 0, 0, 0, 0, 0, 0, 0, 0,
402 0, 0, 0, KC_ESC, 0, 0, 0, 0,
403 KC_SPC, KC_1, KC_QUOT, KC_3, KC_4, KC_5, KC_7, KC_QUOT,
404 KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH,
405 KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7,
406 KC_8, KC_9, KC_SCLN, KC_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH,
407 KC_2, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G,
408 KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O,
409 KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W,
410 KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_6, KC_MINS,
411 KC_GRV, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G,
412 KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O,
413 KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W,
414 KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL
417 /* for users whose OSes are set to Colemak */
419 #include "keymap_colemak.h"
421 const bool ascii_to_colemak_shift_lut[0x80] PROGMEM = {
422 0, 0, 0, 0, 0, 0, 0, 0,
423 0, 0, 0, 0, 0, 0, 0, 0,
424 0, 0, 0, 0, 0, 0, 0, 0,
425 0, 0, 0, 0, 0, 0, 0, 0,
426 0, 1, 1, 1, 1, 1, 1, 0,
427 1, 1, 1, 1, 0, 0, 0, 0,
428 0, 0, 0, 0, 0, 0, 0, 0,
429 0, 0, 1, 0, 1, 0, 1, 1,
430 1, 1, 1, 1, 1, 1, 1, 1,
431 1, 1, 1, 1, 1, 1, 1, 1,
432 1, 1, 1, 1, 1, 1, 1, 1,
433 1, 1, 1, 0, 0, 0, 1, 1,
434 0, 0, 0, 0, 0, 0, 0, 0,
435 0, 0, 0, 0, 0, 0, 0, 0,
436 0, 0, 0, 0, 0, 0, 0, 0,
437 0, 0, 0, 1, 1, 1, 1, 0
440 const uint8_t ascii_to_colemak_keycode_lut[0x80] PROGMEM = {
441 0, 0, 0, 0, 0, 0, 0, 0,
442 KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0,
443 0, 0, 0, 0, 0, 0, 0, 0,
444 0, 0, 0, KC_ESC, 0, 0, 0, 0,
445 KC_SPC, KC_1, KC_QUOT, KC_3, KC_4, KC_5, KC_7, KC_QUOT,
446 KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH,
447 KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7,
448 KC_8, KC_9, CM_SCLN, CM_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH,
449 KC_2, CM_A, CM_B, CM_C, CM_D, CM_E, CM_F, CM_G,
450 CM_H, CM_I, CM_J, CM_K, CM_L, CM_M, CM_N, CM_O,
451 CM_P, CM_Q, CM_R, CM_S, CM_T, CM_U, CM_V, CM_W,
452 CM_X, CM_Y, CM_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_6, KC_MINS,
453 KC_GRV, CM_A, CM_B, CM_C, CM_D, CM_E, CM_F, CM_G,
454 CM_H, CM_I, CM_J, CM_K, CM_L, CM_M, CM_N, CM_O,
455 CM_P, CM_Q, CM_R, CM_S, CM_T, CM_U, CM_V, CM_W,
456 CM_X, CM_Y, CM_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL
461 void send_string(const char *str) {
464 uint8_t ascii_code = pgm_read_byte(str);
465 if (!ascii_code) break;
466 keycode = pgm_read_byte(&ascii_to_qwerty_keycode_lut[ascii_code]);
467 if (pgm_read_byte(&ascii_to_qwerty_shift_lut[ascii_code])) {
468 register_code(KC_LSFT);
469 register_code(keycode);
470 unregister_code(keycode);
471 unregister_code(KC_LSFT);
474 register_code(keycode);
475 unregister_code(keycode);
481 void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
482 if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
489 void tap_random_base64(void) {
490 #if defined(__AVR_ATmega32U4__)
491 uint8_t key = (TCNT0 + TCNT1 + TCNT3 + TCNT4) % 64;
493 uint8_t key = rand() % 64;
497 register_code(KC_LSFT);
498 register_code(key + KC_A);
499 unregister_code(key + KC_A);
500 unregister_code(KC_LSFT);
503 register_code(key - 26 + KC_A);
504 unregister_code(key - 26 + KC_A);
508 unregister_code(KC_0);
511 register_code(key - 53 + KC_1);
512 unregister_code(key - 53 + KC_1);
515 register_code(KC_LSFT);
516 register_code(KC_EQL);
517 unregister_code(KC_EQL);
518 unregister_code(KC_LSFT);
521 register_code(KC_SLSH);
522 unregister_code(KC_SLSH);
527 void matrix_init_quantum() {
528 #ifdef BACKLIGHT_ENABLE
529 backlight_init_ports();
534 void matrix_scan_quantum() {
539 #ifdef TAP_DANCE_ENABLE
540 matrix_scan_tap_dance();
550 #if defined(BACKLIGHT_ENABLE) && defined(BACKLIGHT_PIN)
552 static const uint8_t backlight_pin = BACKLIGHT_PIN;
554 #if BACKLIGHT_PIN == B7
555 # define COM1x1 COM1C1
557 #elif BACKLIGHT_PIN == B6
558 # define COM1x1 COM1B1
560 #elif BACKLIGHT_PIN == B5
561 # define COM1x1 COM1A1
564 # error "Backlight pin not supported - use B5, B6, or B7"
567 __attribute__ ((weak))
568 void backlight_init_ports(void)
571 // Setup backlight pin as output and output low.
573 _SFR_IO8((backlight_pin >> 4) + 1) |= _BV(backlight_pin & 0xF);
575 _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF);
577 // Use full 16-bit resolution.
580 // I could write a wall of text here to explain... but TL;DW
581 // Go read the ATmega32u4 datasheet.
582 // And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on
584 // Pin PB7 = OCR1C (Timer 1, Channel C)
585 // Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0
586 // (i.e. start high, go low when counter matches.)
587 // WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0
588 // Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1
590 TCCR1A = _BV(COM1x1) | _BV(WGM11); // = 0b00001010;
591 TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
594 #ifdef BACKLIGHT_BREATHING
595 breathing_defaults();
599 __attribute__ ((weak))
600 void backlight_set(uint8_t level)
602 // Prevent backlight blink on lowest level
604 _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF);
607 // Turn off PWM control on backlight pin, revert to output low.
608 TCCR1A &= ~(_BV(COM1x1));
610 } else if ( level == BACKLIGHT_LEVELS ) {
611 // Turn on PWM control of backlight pin
612 TCCR1A |= _BV(COM1x1);
613 // Set the brightness
616 // Turn on PWM control of backlight pin
617 TCCR1A |= _BV(COM1x1);
618 // Set the brightness
619 OCR1x = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2));
622 #ifdef BACKLIGHT_BREATHING
623 breathing_intensity_default();
628 #ifdef BACKLIGHT_BREATHING
630 #define BREATHING_NO_HALT 0
631 #define BREATHING_HALT_OFF 1
632 #define BREATHING_HALT_ON 2
634 static uint8_t breath_intensity;
635 static uint8_t breath_speed;
636 static uint16_t breathing_index;
637 static uint8_t breathing_halt;
639 void breathing_enable(void)
641 if (get_backlight_level() == 0)
647 // Set breathing_index to be at the midpoint (brightest point)
648 breathing_index = 0x20 << breath_speed;
651 breathing_halt = BREATHING_NO_HALT;
653 // Enable breathing interrupt
654 TIMSK1 |= _BV(OCIE1A);
657 void breathing_pulse(void)
659 if (get_backlight_level() == 0)
665 // Set breathing_index to be at the midpoint + 1 (brightest point)
666 breathing_index = 0x21 << breath_speed;
669 breathing_halt = BREATHING_HALT_ON;
671 // Enable breathing interrupt
672 TIMSK1 |= _BV(OCIE1A);
675 void breathing_disable(void)
677 // Disable breathing interrupt
678 TIMSK1 &= ~_BV(OCIE1A);
679 backlight_set(get_backlight_level());
682 void breathing_self_disable(void)
684 if (get_backlight_level() == 0)
686 breathing_halt = BREATHING_HALT_OFF;
690 breathing_halt = BREATHING_HALT_ON;
693 //backlight_set(get_backlight_level());
696 void breathing_toggle(void)
700 if (get_backlight_level() == 0)
706 // Set breathing_index to be at the midpoint + 1 (brightest point)
707 breathing_index = 0x21 << breath_speed;
710 breathing_halt = BREATHING_NO_HALT;
713 // Toggle breathing interrupt
714 TIMSK1 ^= _BV(OCIE1A);
716 // Restore backlight level
719 backlight_set(get_backlight_level());
723 bool is_breathing(void)
725 return (TIMSK1 && _BV(OCIE1A));
728 void breathing_intensity_default(void)
730 //breath_intensity = (uint8_t)((uint16_t)100 * (uint16_t)get_backlight_level() / (uint16_t)BACKLIGHT_LEVELS);
731 breath_intensity = ((BACKLIGHT_LEVELS - get_backlight_level()) * ((BACKLIGHT_LEVELS + 1) / 2));
734 void breathing_intensity_set(uint8_t value)
736 breath_intensity = value;
739 void breathing_speed_default(void)
744 void breathing_speed_set(uint8_t value)
746 bool is_breathing_now = is_breathing();
747 uint8_t old_breath_speed = breath_speed;
749 if (is_breathing_now)
751 // Disable breathing interrupt
752 TIMSK1 &= ~_BV(OCIE1A);
755 breath_speed = value;
757 if (is_breathing_now)
759 // Adjust index to account for new speed
760 breathing_index = (( (uint8_t)( (breathing_index) >> old_breath_speed ) ) & 0x3F) << breath_speed;
762 // Enable breathing interrupt
763 TIMSK1 |= _BV(OCIE1A);
768 void breathing_speed_inc(uint8_t value)
770 if ((uint16_t)(breath_speed - value) > 10 )
772 breathing_speed_set(0);
776 breathing_speed_set(breath_speed - value);
780 void breathing_speed_dec(uint8_t value)
782 if ((uint16_t)(breath_speed + value) > 10 )
784 breathing_speed_set(10);
788 breathing_speed_set(breath_speed + value);
792 void breathing_defaults(void)
794 breathing_intensity_default();
795 breathing_speed_default();
796 breathing_halt = BREATHING_NO_HALT;
799 /* Breathing Sleep LED brighness(PWM On period) table
800 * (64[steps] * 4[duration]) / 64[PWM periods/s] = 4 second breath cycle
802 * http://www.wolframalpha.com/input/?i=%28sin%28+x%2F64*pi%29**8+*+255%2C+x%3D0+to+63
803 * (0..63).each {|x| p ((sin(x/64.0*PI)**8)*255).to_i }
805 static const uint8_t breathing_table[64] PROGMEM = {
806 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 4, 6, 10,
807 15, 23, 32, 44, 58, 74, 93, 113, 135, 157, 179, 199, 218, 233, 245, 252,
808 255, 252, 245, 233, 218, 199, 179, 157, 135, 113, 93, 74, 58, 44, 32, 23,
809 15, 10, 6, 4, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
812 ISR(TIMER1_COMPA_vect)
814 // OCR1x = (pgm_read_byte(&breathing_table[ ( (uint8_t)( (breathing_index++) >> breath_speed ) ) & 0x3F ] )) * breath_intensity;
817 uint8_t local_index = ( (uint8_t)( (breathing_index++) >> breath_speed ) ) & 0x3F;
819 if (((breathing_halt == BREATHING_HALT_ON) && (local_index == 0x20)) || ((breathing_halt == BREATHING_HALT_OFF) && (local_index == 0x3F)))
821 // Disable breathing interrupt
822 TIMSK1 &= ~_BV(OCIE1A);
825 OCR1x = (uint16_t)(((uint16_t)pgm_read_byte(&breathing_table[local_index]) * 257)) >> breath_intensity;
835 __attribute__ ((weak))
836 void backlight_init_ports(void)
841 __attribute__ ((weak))
842 void backlight_set(uint8_t level)
850 // Functions for spitting out values
853 void send_dword(uint32_t number) { // this might not actually work
854 uint16_t word = (number >> 16);
856 send_word(number & 0xFFFFUL);
859 void send_word(uint16_t number) {
860 uint8_t byte = number >> 8;
862 send_byte(number & 0xFF);
865 void send_byte(uint8_t number) {
866 uint8_t nibble = number >> 4;
868 send_nibble(number & 0xF);
871 void send_nibble(uint8_t number) {
875 unregister_code(KC_0);
878 register_code(KC_1 + (number - 1));
879 unregister_code(KC_1 + (number - 1));
882 register_code(KC_A + (number - 0xA));
883 unregister_code(KC_A + (number - 0xA));
888 void api_send_unicode(uint32_t unicode) {
891 dword_to_bytes(unicode, chunk);
892 MT_SEND_DATA(DT_UNICODE, chunk, 5);
896 __attribute__ ((weak))
897 void led_set_user(uint8_t usb_led) {
901 __attribute__ ((weak))
902 void led_set_kb(uint8_t usb_led) {
903 led_set_user(usb_led);
906 __attribute__ ((weak))
907 void led_init_ports(void)
912 __attribute__ ((weak))
913 void led_set(uint8_t usb_led)
918 // // Using PE6 Caps Lock LED
919 // if (usb_led & (1<<USB_LED_CAPS_LOCK))
936 //------------------------------------------------------------------------------
937 // Override these functions in your keymap file to play different tunes on
938 // different events such as startup and bootloader jump
940 __attribute__ ((weak))
941 void startup_user() {}
943 __attribute__ ((weak))
944 void shutdown_user() {}
946 //------------------------------------------------------------------------------