summaryrefslogtreecommitdiff
path: root/tmk_core/common
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-11-06 08:38:36 -0500
committerJack Humbert <jack.humb@gmail.com>2017-11-06 08:38:36 -0500
commitcf9f6bbd917c56e7347993f9116953628b16bc6a (patch)
tree0eebf47fa40eb871b45b1a84514714c5e8243940 /tmk_core/common
parent41df0dc9a75dd9ffc3f0026eb673337d2aa0c5c6 (diff)
adds per-layer rgb color option to ez
Diffstat (limited to 'tmk_core/common')
-rw-r--r--tmk_core/common/action_layer.c7
-rw-r--r--tmk_core/common/action_layer.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c
index c6a166a823..277a8f5d95 100644
--- a/tmk_core/common/action_layer.c
+++ b/tmk_core/common/action_layer.c
@@ -64,10 +64,15 @@ void default_layer_xor(uint32_t state)
uint32_t layer_state = 0;
__attribute__((weak))
-uint32_t layer_state_set_kb(uint32_t state) {
+uint32_t layer_state_set_user(uint32_t state) {
return state;
}
+__attribute__((weak))
+uint32_t layer_state_set_kb(uint32_t state) {
+ return layer_state_set_user(state);
+}
+
static void layer_state_set(uint32_t state)
{
state = layer_state_set_kb(state);
diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h
index d89ed6e5ce..e71604d872 100644
--- a/tmk_core/common/action_layer.h
+++ b/tmk_core/common/action_layer.h
@@ -73,6 +73,8 @@ void layer_xor(uint32_t state);
#define layer_debug()
__attribute__((weak))
+uint32_t layer_state_set_user(uint32_t state);
+__attribute__((weak))
uint32_t layer_state_set_kb(uint32_t state);
#endif