diff --git a/keyboards/annepro2/annepro2.h b/keyboards/annepro2/annepro2.h index aa8f485e27a..007f2d5471e 100644 --- a/keyboards/annepro2/annepro2.h +++ b/keyboards/annepro2/annepro2.h @@ -17,6 +17,9 @@ #pragma once #include "quantum.h" +#include +#include "qmk_ap2_led.h" +#include "config.h" #define OVERRIDE __attribute__((noinline)) diff --git a/keyboards/annepro2/keymaps/default-full-caps/config.h b/keyboards/annepro2/keymaps/default-full-caps/config.h index 1840bc74849..413c5d8dc52 100644 --- a/keyboards/annepro2/keymaps/default-full-caps/config.h +++ b/keyboards/annepro2/keymaps/default-full-caps/config.h @@ -1,2 +1,20 @@ + /* Copyright 2021 OpenAnnePro community + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + // Obins stock firmware has something similar to this already enabled, but disabled by default in QMK #define PERMISSIVE_HOLD diff --git a/keyboards/annepro2/keymaps/default-full-caps/keymap.c b/keyboards/annepro2/keymaps/default-full-caps/keymap.c index c67a92644b2..a46e111799e 100644 --- a/keyboards/annepro2/keymaps/default-full-caps/keymap.c +++ b/keyboards/annepro2/keymaps/default-full-caps/keymap.c @@ -1,7 +1,20 @@ -#include -#include "annepro2.h" -#include "qmk_ap2_led.h" -#include "config.h" + /* Copyright 2021 OpenAnnePro community + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H enum anne_pro_layers { _BASE_LAYER, @@ -94,12 +107,6 @@ enum anne_pro_layers { // clang-format on -const uint16_t keymaps_size = sizeof(keymaps); - -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" @@ -112,8 +119,6 @@ void keyboard_post_init_user(void) { // annepro2LedSetProfile(i); } -layer_state_t layer_state_set_user(layer_state_t layer) { return layer; } - // The function to handle the caps lock logic bool led_update_user(led_t leds) { if (leds.caps_lock) { diff --git a/keyboards/annepro2/keymaps/default-layer-indicators/config.h b/keyboards/annepro2/keymaps/default-layer-indicators/config.h index 1840bc74849..413c5d8dc52 100644 --- a/keyboards/annepro2/keymaps/default-layer-indicators/config.h +++ b/keyboards/annepro2/keymaps/default-layer-indicators/config.h @@ -1,2 +1,20 @@ + /* Copyright 2021 OpenAnnePro community + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + // Obins stock firmware has something similar to this already enabled, but disabled by default in QMK #define PERMISSIVE_HOLD diff --git a/keyboards/annepro2/keymaps/default-layer-indicators/keymap.c b/keyboards/annepro2/keymaps/default-layer-indicators/keymap.c index c840145f454..ecdf6cf479a 100644 --- a/keyboards/annepro2/keymaps/default-layer-indicators/keymap.c +++ b/keyboards/annepro2/keymaps/default-layer-indicators/keymap.c @@ -1,7 +1,20 @@ -#include -#include "annepro2.h" -#include "qmk_ap2_led.h" -#include "config.h" + /* Copyright 2021 OpenAnnePro community + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H enum anne_pro_layers { _BASE_LAYER, @@ -93,11 +106,6 @@ enum anne_pro_layers { }; // clang-format on -const uint16_t keymaps_size = sizeof(keymaps); - -void matrix_init_user(void) {} - -void matrix_scan_user(void) {} // Code to run after initializing the keyboard void keyboard_post_init_user(void) { @@ -111,8 +119,8 @@ void keyboard_post_init_user(void) { // annepro2LedSetProfile(i); } -layer_state_t layer_state_set_user(layer_state_t layer) { - switch (get_highest_layer(layer)) { +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { case _FN1_LAYER: // Set the leds to green annepro2LedSetForegroundColor(0x00, 0xFF, 0x00); @@ -126,7 +134,7 @@ layer_state_t layer_state_set_user(layer_state_t layer) { annepro2LedResetForegroundColor(); break; } - return layer; + return state; } // The function to handle the caps lock logic diff --git a/keyboards/annepro2/keymaps/default/config.h b/keyboards/annepro2/keymaps/default/config.h index 1840bc74849..413c5d8dc52 100644 --- a/keyboards/annepro2/keymaps/default/config.h +++ b/keyboards/annepro2/keymaps/default/config.h @@ -1,2 +1,20 @@ + /* Copyright 2021 OpenAnnePro community + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + // Obins stock firmware has something similar to this already enabled, but disabled by default in QMK #define PERMISSIVE_HOLD diff --git a/keyboards/annepro2/keymaps/default/keymap.c b/keyboards/annepro2/keymaps/default/keymap.c index 95a72a1df77..f3a3063167a 100644 --- a/keyboards/annepro2/keymaps/default/keymap.c +++ b/keyboards/annepro2/keymaps/default/keymap.c @@ -1,7 +1,20 @@ -#include -#include "annepro2.h" -#include "qmk_ap2_led.h" -#include "config.h" + /* Copyright 2021 OpenAnnePro community + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H enum anne_pro_layers { _BASE_LAYER, @@ -91,11 +104,6 @@ enum anne_pro_layers { ), }; // clang-format on -const uint16_t keymaps_size = sizeof(keymaps); - -void matrix_init_user(void) {} - -void matrix_scan_user(void) {} // Code to run after initializing the keyboard void keyboard_post_init_user(void) { @@ -108,5 +116,3 @@ void keyboard_post_init_user(void) { // 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; }