From 853388d9dd5e4fd91a0400c41fe06c65ec0103a8 Mon Sep 17 00:00:00 2001 From: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Date: Tue, 26 Jan 2021 19:24:21 -0800 Subject: [PATCH] Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles --- .../annepro2/keymaps/default-full-caps/keymap.c | 13 +++++++++++++ .../keymaps/default-layer-indicators/keymap.c | 13 +++++++++++++ keyboards/annepro2/keymaps/default/keymap.c | 13 +++++++++++++ 3 files changed, 39 insertions(+) diff --git a/keyboards/annepro2/keymaps/default-full-caps/keymap.c b/keyboards/annepro2/keymaps/default-full-caps/keymap.c index 329c70dd4ab..4204985b53d 100644 --- a/keyboards/annepro2/keymaps/default-full-caps/keymap.c +++ b/keyboards/annepro2/keymaps/default-full-caps/keymap.c @@ -8,6 +8,7 @@ enum anne_pro_layers { _FN2_LAYER, }; +// Key symbols are based on QMK. Use them to remap your keyboard /* * Layer _BASE_LAYER * ,-----------------------------------------------------------------------------------------. @@ -97,6 +98,18 @@ void matrix_init_user(void) { void matrix_scan_user(void) { } +// Code to run after initializing the keyboard +void keyboard_post_init_user(void) { + // Here are two common functions that you can use. For more LED functions, refer to the file "qmk_ap2_led.h" + + // annepro2-shine disables LEDs by default. Uncomment this function to enable them at startup. + // annepro2LedEnable(); + + // Additionally, it also chooses the first LED profile by default. Refer to the "profiles" array in main.c in + // annepro2-shine to see the order. Replace "i" with the index of your preferred profile. (i.e the RED profile is index 0) + // annepro2LedSetProfile(i); +} + layer_state_t layer_state_set_user(layer_state_t layer) { return layer; } diff --git a/keyboards/annepro2/keymaps/default-layer-indicators/keymap.c b/keyboards/annepro2/keymaps/default-layer-indicators/keymap.c index b58f916b47c..6ab7f8a5cce 100644 --- a/keyboards/annepro2/keymaps/default-layer-indicators/keymap.c +++ b/keyboards/annepro2/keymaps/default-layer-indicators/keymap.c @@ -8,6 +8,7 @@ enum anne_pro_layers { _FN2_LAYER, }; +// Key symbols are based on QMK. Use them to remap your keyboard /* * Layer _BASE_LAYER * ,-----------------------------------------------------------------------------------------. @@ -97,6 +98,18 @@ void matrix_init_user(void) { void matrix_scan_user(void) { } +// Code to run after initializing the keyboard +void keyboard_post_init_user(void) { + // Here are two common functions that you can use. For more LED functions, refer to the file "qmk_ap2_led.h" + + // annepro2-shine disables LEDs by default. Uncomment this function to enable them at startup. + // annepro2LedEnable(); + + // Additionally, it also chooses the first LED profile by default. Refer to the "profiles" array in main.c in + // annepro2-shine to see the order. Replace "i" with the index of your preferred profile. (i.e the RED profile is index 0) + // annepro2LedSetProfile(i); +} + layer_state_t layer_state_set_user(layer_state_t layer) { switch(get_highest_layer(layer)) { case _FN1_LAYER: diff --git a/keyboards/annepro2/keymaps/default/keymap.c b/keyboards/annepro2/keymaps/default/keymap.c index 33f81fc38fc..5e8f778958b 100644 --- a/keyboards/annepro2/keymaps/default/keymap.c +++ b/keyboards/annepro2/keymaps/default/keymap.c @@ -8,6 +8,7 @@ enum anne_pro_layers { _FN2_LAYER, }; +// Key symbols are based on QMK. Use them to remap your keyboard /* * Layer _BASE_LAYER * ,-----------------------------------------------------------------------------------------. @@ -97,6 +98,18 @@ void matrix_init_user(void) { void matrix_scan_user(void) { } +// Code to run after initializing the keyboard +void keyboard_post_init_user(void) { + // Here are two common functions that you can use. For more LED functions, refer to the file "qmk_ap2_led.h" + + // annepro2-shine disables LEDs by default. Uncomment this function to enable them at startup. + // annepro2LedEnable(); + + // Additionally, it also chooses the first LED profile by default. Refer to the "profiles" array in main.c in + // annepro2-shine to see the order. Replace "i" with the index of your preferred profile. (i.e the RED profile is index 0) + // annepro2LedSetProfile(i); +} + layer_state_t layer_state_set_user(layer_state_t layer) { return layer; }