summaryrefslogtreecommitdiff
path: root/tmk_core
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/common/keyboard.c3
-rw-r--r--tmk_core/protocol/arm_atsam/md_rgb_matrix.c10
-rw-r--r--tmk_core/protocol/arm_atsam/md_rgb_matrix_programs.c4
3 files changed, 9 insertions, 8 deletions
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index 34fed0caba..ce3255c069 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -307,9 +307,6 @@ void keyboard_init(void) {
#ifdef RGBLIGHT_ENABLE
rgblight_init();
#endif
-#ifdef RGB_MATRIX_ENABLE
- rgb_matrix_init();
-#endif
#ifdef ENCODER_ENABLE
encoder_init();
#endif
diff --git a/tmk_core/protocol/arm_atsam/md_rgb_matrix.c b/tmk_core/protocol/arm_atsam/md_rgb_matrix.c
index 0ea7e38395..eb71443b88 100644
--- a/tmk_core/protocol/arm_atsam/md_rgb_matrix.c
+++ b/tmk_core/protocol/arm_atsam/md_rgb_matrix.c
@@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef RGB_MATRIX_ENABLE
#include "arm_atsam_protocol.h"
#include "led.h"
#include "rgb_matrix.h"
@@ -196,7 +197,7 @@ void md_rgb_matrix_prepare(void) {
}
}
-void led_set_one(int i, uint8_t r, uint8_t g, uint8_t b) {
+static void led_set_one(int i, uint8_t r, uint8_t g, uint8_t b) {
if (i < ISSI3733_LED_COUNT) {
#ifdef USE_MASSDROP_CONFIGURATOR
md_rgb_matrix_config_override(i);
@@ -208,13 +209,13 @@ void led_set_one(int i, uint8_t r, uint8_t g, uint8_t b) {
}
}
-void led_set_all(uint8_t r, uint8_t g, uint8_t b) {
+static void led_set_all(uint8_t r, uint8_t g, uint8_t b) {
for (uint8_t i = 0; i < ISSI3733_LED_COUNT; i++) {
led_set_one(i, r, g, b);
}
}
-void init(void) {
+static void init(void) {
DBGC(DC_LED_MATRIX_INIT_BEGIN);
issi3733_prepare_arrays();
@@ -227,7 +228,7 @@ void init(void) {
DBGC(DC_LED_MATRIX_INIT_COMPLETE);
}
-void flush(void) {
+static void flush(void) {
#ifdef USE_MASSDROP_CONFIGURATOR
if (!led_enabled) {
return;
@@ -470,3 +471,4 @@ static void md_rgb_matrix_config_override(int i) {
}
#endif // USE_MASSDROP_CONFIGURATOR
+#endif // RGB_MATRIX_ENABLE \ No newline at end of file
diff --git a/tmk_core/protocol/arm_atsam/md_rgb_matrix_programs.c b/tmk_core/protocol/arm_atsam/md_rgb_matrix_programs.c
index b43008cc5b..1149cea7a1 100644
--- a/tmk_core/protocol/arm_atsam/md_rgb_matrix_programs.c
+++ b/tmk_core/protocol/arm_atsam/md_rgb_matrix_programs.c
@@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef RGB_MATRIX_ENABLE
#ifdef USE_MASSDROP_CONFIGURATOR
# include "md_rgb_matrix.h"
@@ -96,4 +97,5 @@ void *led_setups[] = {leds_rainbow_s, leds_rainbow_ns, leds_teal_salmon, leds_ye
const uint8_t led_setups_count = sizeof(led_setups) / sizeof(led_setups[0]);
-#endif
+#endif // USE_MASSDROP_CONFIGURATOR
+#endif // RGB_MATRIX_ENABLE \ No newline at end of file