summaryrefslogtreecommitdiff
path: root/keyboards/handwired
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2019-11-21 22:40:29 -0800
committerJames Young <18669334+noroadsleft@users.noreply.github.com>2019-11-21 22:40:29 -0800
commit6cf574396adfb08f7fe7fe6f7ce68387fd474018 (patch)
treed83695e2b7e2b7ba2b53869d24cadde0a4d8e788 /keyboards/handwired
parentf0a9c10b6d70424ed43d624f5fdb6d5f8388953f (diff)
downloadqmk_firmware-6cf574396adfb08f7fe7fe6f7ce68387fd474018.tar.gz
qmk_firmware-6cf574396adfb08f7fe7fe6f7ce68387fd474018.zip
[Keyboard] Update default keymaps to use `layer_state_t` (#7444)
* Update default keymaps to use `layer_state_t` * Convert binon32 as get_highest_layer in default keymaps
Diffstat (limited to 'keyboards/handwired')
-rw-r--r--keyboards/handwired/2x5keypad/keymaps/default/keymap.c2
-rw-r--r--keyboards/handwired/bluepill/keymaps/default/keymap.c4
-rw-r--r--keyboards/handwired/jot50/keymaps/default/keymap.c2
-rw-r--r--keyboards/handwired/jotanck/keymaps/default/keymap.c4
-rw-r--r--keyboards/handwired/prime_exl/keymaps/default/keymap.c4
-rw-r--r--keyboards/handwired/promethium/keymaps/default/keymap.c2
-rw-r--r--keyboards/handwired/pteron/keymaps/default/keymap.c2
-rw-r--r--keyboards/handwired/wulkan/keymaps/default/keymap.c2
-rw-r--r--keyboards/handwired/xealous/keymaps/default/keymap.c2
9 files changed, 12 insertions, 12 deletions
diff --git a/keyboards/handwired/2x5keypad/keymaps/default/keymap.c b/keyboards/handwired/2x5keypad/keymaps/default/keymap.c
index 91a0e28f6a..23614a9b78 100644
--- a/keyboards/handwired/2x5keypad/keymaps/default/keymap.c
+++ b/keyboards/handwired/2x5keypad/keymaps/default/keymap.c
@@ -143,7 +143,7 @@ layer_state_t layer_state_set_user(layer_state_t state)
{
turn_off_leds();
- switch (biton32(state))
+ switch (get_highest_layer(state))
{
case NORMAL_LAYER:
break;
diff --git a/keyboards/handwired/bluepill/keymaps/default/keymap.c b/keyboards/handwired/bluepill/keymaps/default/keymap.c
index 8a34930390..3d93c24d93 100644
--- a/keyboards/handwired/bluepill/keymaps/default/keymap.c
+++ b/keyboards/handwired/bluepill/keymaps/default/keymap.c
@@ -50,8 +50,8 @@ KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9,
};
/* Layer based ilumination, just binary */
-uint32_t layer_state_set_user(uint32_t state) {
- switch (biton32(state)) {
+layer_state_t layer_state_set_user(layer_state_t state) {
+ switch (get_highest_layer(state)) {
case _FNONE:
palSetPad(GPIOA, 0); //OFF Color A
palClearPad(GPIOA, 1); //ON Color B
diff --git a/keyboards/handwired/jot50/keymaps/default/keymap.c b/keyboards/handwired/jot50/keymaps/default/keymap.c
index 7342dcd22e..7b674af528 100644
--- a/keyboards/handwired/jot50/keymaps/default/keymap.c
+++ b/keyboards/handwired/jot50/keymaps/default/keymap.c
@@ -74,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-uint32_t layer_state_set_user(uint32_t state) {
+layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}
diff --git a/keyboards/handwired/jotanck/keymaps/default/keymap.c b/keyboards/handwired/jotanck/keymaps/default/keymap.c
index 2467559a60..3de30d396b 100644
--- a/keyboards/handwired/jotanck/keymaps/default/keymap.c
+++ b/keyboards/handwired/jotanck/keymaps/default/keymap.c
@@ -78,9 +78,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-uint32_t layer_state_set_user(uint32_t state) {
+layer_state_t layer_state_set_user(layer_state_t state) {
#ifdef JOTANCK_LEDS
- switch (biton32(state)) {
+ switch (get_highest_layer(state)) {
case _LOWER:
writePinHigh(JOTANCK_LED1);
writePinLow(JOTANCK_LED2);
diff --git a/keyboards/handwired/prime_exl/keymaps/default/keymap.c b/keyboards/handwired/prime_exl/keymaps/default/keymap.c
index 1dac7825e4..7cf9197081 100644
--- a/keyboards/handwired/prime_exl/keymaps/default/keymap.c
+++ b/keyboards/handwired/prime_exl/keymaps/default/keymap.c
@@ -132,9 +132,9 @@ void led_set_user(uint8_t usb_led) {
}
//function for layer indicator LED
-uint32_t layer_state_set_user(uint32_t state)
+layer_state_t layer_state_set_user(layer_state_t state)
{
- if (biton32(state) == 2) {
+ if (get_highest_layer(state) == 2) {
writePinHigh(C6);
} else {
writePinLow(C6);
diff --git a/keyboards/handwired/promethium/keymaps/default/keymap.c b/keyboards/handwired/promethium/keymaps/default/keymap.c
index 207984407c..14a293bb39 100644
--- a/keyboards/handwired/promethium/keymaps/default/keymap.c
+++ b/keyboards/handwired/promethium/keymaps/default/keymap.c
@@ -986,7 +986,7 @@ void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool *
}
#endif
-uint32_t layer_state_set_kb(uint32_t state)
+layer_state_t layer_state_set_user(layer_state_t state)
{
// turn on punc layer if both fun & num are on
if ((state & ((1UL<<_NUM) | (1UL<<_FUN))) == ((1UL<<_NUM) | (1UL<<_FUN))) {
diff --git a/keyboards/handwired/pteron/keymaps/default/keymap.c b/keyboards/handwired/pteron/keymaps/default/keymap.c
index 3079cc7afd..976fbb6e16 100644
--- a/keyboards/handwired/pteron/keymaps/default/keymap.c
+++ b/keyboards/handwired/pteron/keymaps/default/keymap.c
@@ -99,6 +99,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-uint32_t layer_state_set_user(uint32_t state) {
+layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}
diff --git a/keyboards/handwired/wulkan/keymaps/default/keymap.c b/keyboards/handwired/wulkan/keymaps/default/keymap.c
index 5134fb0002..fec8442ee3 100644
--- a/keyboards/handwired/wulkan/keymaps/default/keymap.c
+++ b/keyboards/handwired/wulkan/keymaps/default/keymap.c
@@ -102,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-uint32_t layer_state_set_user(uint32_t state) {
+layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}
diff --git a/keyboards/handwired/xealous/keymaps/default/keymap.c b/keyboards/handwired/xealous/keymaps/default/keymap.c
index ca82445a55..41a3f8c805 100644
--- a/keyboards/handwired/xealous/keymaps/default/keymap.c
+++ b/keyboards/handwired/xealous/keymaps/default/keymap.c
@@ -87,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
float tone_qwerty[][2] = TONE_QWERTY;
float tone_numpad[][2] = TONE_NUMPAD;
-uint32_t default_layer_state_set_kb(uint32_t state) {
+layer_state_t default_layer_state_set_kb(layer_state_t state) {
if (state == 1UL<<_QWERTY) {
PLAY_SONG(tone_qwerty);
} else if (state == 1UL<<_NUMPAD) {