summaryrefslogtreecommitdiffstats
path: root/tmk_core
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/common/keyboard.c8
-rw-r--r--tmk_core/common/keycode.h7
-rw-r--r--tmk_core/protocol/chibios/main.c15
3 files changed, 24 insertions, 6 deletions
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index 3a1262a9f..c46a701b3 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -29,6 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "sendchar.h"
#include "eeconfig.h"
#include "backlight.h"
+#include "action_layer.h"
#ifdef BOOTMAGIC_ENABLE
# include "bootmagic.h"
#else
@@ -52,6 +53,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef SERIAL_LINK_ENABLE
# include "serial_link/system/serial_link.h"
#endif
+#ifdef VISUALIZER_ENABLE
+# include "visualizer/visualizer.h"
+#endif
#ifdef MATRIX_HAS_GHOST
static bool has_ghost_in_row(uint8_t row)
@@ -181,6 +185,10 @@ MATRIX_LOOP_END:
serial_link_update();
#endif
+#ifdef VISUALIZER_ENABLE
+ visualizer_update(default_layer_state, layer_state, host_keyboard_leds());
+#endif
+
// update LED
if (led_status != host_keyboard_leds()) {
led_status = host_keyboard_leds();
diff --git a/tmk_core/common/keycode.h b/tmk_core/common/keycode.h
index 448195306..2f208c54e 100644
--- a/tmk_core/common/keycode.h
+++ b/tmk_core/common/keycode.h
@@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define IS_SPECIAL(code) ((0xA5 <= (code) && (code) <= 0xDF) || (0xE8 <= (code) && (code) <= 0xFF))
#define IS_SYSTEM(code) (KC_PWR <= (code) && (code) <= KC_WAKE)
-#define IS_CONSUMER(code) (KC_MUTE <= (code) && (code) <= KC_WFAV)
+#define IS_CONSUMER(code) (KC_MUTE <= (code) && (code) <= KC_MRWD)
#define IS_FN(code) (KC_FN0 <= (code) && (code) <= KC_FN31)
#define IS_MOUSEKEY(code) (KC_MS_UP <= (code) && (code) <= KC_MS_ACCEL2)
#define IS_MOUSEKEY_MOVE(code) (KC_MS_UP <= (code) && (code) <= KC_MS_RIGHT)
@@ -156,8 +156,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define KC_WSTP KC_WWW_STOP
#define KC_WREF KC_WWW_REFRESH
#define KC_WFAV KC_WWW_FAVORITES
-/* Jump to bootloader */
-#define KC_BTLD KC_BOOTLOADER
/* Transparent */
#define KC_TRANSPARENT 1
#define KC_TRNS KC_TRANSPARENT
@@ -428,9 +426,6 @@ enum internal_special_keycodes {
KC_MEDIA_FAST_FORWARD,
KC_MEDIA_REWIND, /* 0xBC */
- /* Jump to bootloader */
- KC_BOOTLOADER = 0xBF,
-
/* Fn key */
KC_FN0 = 0xC0,
KC_FN1,
diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c
index aeb11752f..b0eb9aef8 100644
--- a/tmk_core/protocol/chibios/main.c
+++ b/tmk_core/protocol/chibios/main.c
@@ -38,6 +38,9 @@
#ifdef SERIAL_LINK_ENABLE
#include "serial_link/system/serial_link.h"
#endif
+#ifdef VISUALIZER_ENABLE
+#include "visualizer/visualizer.h"
+#endif
#include "suspend.h"
@@ -105,6 +108,11 @@ int main(void) {
init_serial_link();
#endif
+#ifdef VISUALIZER_ENABLE
+ visualizer_init();
+#endif
+
+
host_driver_t* driver = NULL;
/* Wait until the USB or serial link is active */
@@ -147,6 +155,9 @@ int main(void) {
if(USB_DRIVER.state == USB_SUSPENDED) {
print("[s]");
+#ifdef VISUALIZER_ENABLE
+ visualizer_suspend();
+#endif
while(USB_DRIVER.state == USB_SUSPENDED) {
/* Do this in the suspended state */
#ifdef SERIAL_LINK_ENABLE
@@ -164,6 +175,10 @@ int main(void) {
#ifdef MOUSEKEY_ENABLE
mousekey_send();
#endif /* MOUSEKEY_ENABLE */
+
+#ifdef VISUALIZER_ENABLE
+ visualizer_resume();
+#endif
}
keyboard_task();