Move ActiveLayer back to keyboard_layout.c too

That is the only place we use it from, no need to expose it outside of that.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
This commit is contained in:
Gergely Nagy
2016-12-13 19:59:06 +01:00
parent c77027992b
commit d98955a947
2 changed files with 2 additions and 6 deletions

View File

@@ -4,7 +4,7 @@
static uint8_t keyMasks[SLOT_COUNT][MAX_KEY_COUNT_PER_MODULE];
uint8_t ActiveLayer = LAYER_ID_BASE;
static uint8_t ActiveLayer = LAYER_ID_BASE;
uint8_t prevKeyStates[SLOT_COUNT][MAX_KEY_COUNT_PER_MODULE];
static inline __attribute__((always_inline)) uhk_key_t getKeycode(uint8_t slotId, uint8_t keyId)
@@ -77,7 +77,7 @@ bool handleKey(uhk_key_t key, int scancodeIdx, usb_keyboard_report_t *report, co
break;
case UHK_KEY_LAYER:
if (key_toggled_on(prevKeyStates, currKeyStates, keyId)) {
ActiveLayer = layer;
ActiveLayer = key.layer.target;
}
if (key_toggled_off(prevKeyStates, currKeyStates, keyId)) {
ActiveLayer = LAYER_ID_BASE;

View File

@@ -1,8 +1,6 @@
#ifndef __LAYER_H__
#define __LAYER_H__
#include <stdint.h>
// Macros:
#define LAYER_ID_BASE 0
@@ -12,6 +10,4 @@
#define LAYER_COUNT 4
extern uint8_t ActiveLayer;
#endif