diff options
Diffstat (limited to 'keyboards/mechlovin')
-rw-r--r-- | keyboards/mechlovin/adelais/rgb_led/rev1/config.h | 1 | ||||
-rw-r--r-- | keyboards/mechlovin/adelais/standard_led/arm/config.h | 1 | ||||
-rw-r--r-- | keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h | 1 | ||||
-rw-r--r-- | keyboards/mechlovin/hannah910/config.h | 1 | ||||
-rw-r--r-- | keyboards/mechlovin/hannah910/hannah910.c | 6 | ||||
-rw-r--r-- | keyboards/mechlovin/hex4b/keymaps/nazzer/keymap.c | 28 | ||||
-rw-r--r-- | keyboards/mechlovin/hex4b/rev1/config.h | 1 | ||||
-rw-r--r-- | keyboards/mechlovin/hex4b/rev2/config.h | 1 | ||||
-rw-r--r-- | keyboards/mechlovin/hex6c/config.h | 1 | ||||
-rw-r--r-- | keyboards/mechlovin/infinity87/rev2/config.h | 1 | ||||
-rw-r--r-- | keyboards/mechlovin/infinity875/config.h | 1 | ||||
-rw-r--r-- | keyboards/mechlovin/jay60/config.h | 1 | ||||
-rw-r--r-- | keyboards/mechlovin/kanu/config.h | 1 | ||||
-rw-r--r-- | keyboards/mechlovin/kay60/config.h | 1 | ||||
-rw-r--r-- | keyboards/mechlovin/olly/bb/config.h | 1 | ||||
-rw-r--r-- | keyboards/mechlovin/olly/jf/config.h | 1 | ||||
-rw-r--r-- | keyboards/mechlovin/serratus/config.h | 1 | ||||
-rw-r--r-- | keyboards/mechlovin/th1800/config.h | 1 | ||||
-rw-r--r-- | keyboards/mechlovin/zed60/config.h | 1 |
19 files changed, 17 insertions, 34 deletions
diff --git a/keyboards/mechlovin/adelais/rgb_led/rev1/config.h b/keyboards/mechlovin/adelais/rgb_led/rev1/config.h index ab38809514..7f151ae09a 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev1/config.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev1/config.h @@ -2,7 +2,6 @@ #define MATRIX_ROW_PINS { B1, A0, C13, A1, A2} #define MATRIX_COL_PINS { A10, A9, A8, B15, B14, B13, B12, B11, B10, B8, B4, B5, B3, C14, A15 } -#define UNUSED_PINS #define RGB_DI_PIN A7 #define DRIVER_LED_TOTAL 91 diff --git a/keyboards/mechlovin/adelais/standard_led/arm/config.h b/keyboards/mechlovin/adelais/standard_led/arm/config.h index 22b7999c06..72386fdc59 100644 --- a/keyboards/mechlovin/adelais/standard_led/arm/config.h +++ b/keyboards/mechlovin/adelais/standard_led/arm/config.h @@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B1, A0, C13, A1, A2} #define MATRIX_COL_PINS { A10, A9, A8, B15, B14, B13, B12, B11, B10, B8, B4, B5, B3, C14, A15 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h b/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h index fecdf4d110..31acc74b90 100644 --- a/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h +++ b/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/mechlovin/hannah910/config.h b/keyboards/mechlovin/hannah910/config.h index f42451577b..3a222e8d87 100644 --- a/keyboards/mechlovin/hannah910/config.h +++ b/keyboards/mechlovin/hannah910/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B5, B6, D3, C6, C7 } #define MATRIX_COL_PINS { E6, B1, B3, F0, F1, F4, F5, F6, F7, D5, D4, B4, D6, D7, B0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechlovin/hannah910/hannah910.c b/keyboards/mechlovin/hannah910/hannah910.c index 3237636be2..70c1a7b8e3 100644 --- a/keyboards/mechlovin/hannah910/hannah910.c +++ b/keyboards/mechlovin/hannah910/hannah910.c @@ -34,20 +34,20 @@ void led_set_kb(uint8_t usb_led) { layer_state_t layer_state_set_user(layer_state_t state) { // if on layer 1, turn on D2 LED, otherwise off. - if (biton32(state) == 1) { + if (get_highest_layer(state) == 1) { writePinHigh(D2); } else { writePinLow(D2); } // if on layer 2, turn on D1 LED, otherwise off. - if (biton32(state) == 2) { + if (get_highest_layer(state) == 2) { writePinHigh(D1); } else { writePinLow(D1); } // if on layer 3, turn on D0 LED, otherwise off. - if (biton32(state) == 3) { + if (get_highest_layer(state) == 3) { writePinHigh(D0); } else { writePinLow(D0); diff --git a/keyboards/mechlovin/hex4b/keymaps/nazzer/keymap.c b/keyboards/mechlovin/hex4b/keymaps/nazzer/keymap.c index 437233be52..e0634d85dc 100644 --- a/keyboards/mechlovin/hex4b/keymaps/nazzer/keymap.c +++ b/keyboards/mechlovin/hex4b/keymaps/nazzer/keymap.c @@ -53,9 +53,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; bool led_update_user(led_t led_state) { - + // Toggle CAPS_LOCK LED normally - + # if LED_PIN_ON_STATE == 0 // invert the whole thing to avoid having to conditionally !led_state.x later led_state.raw = ~led_state.raw; @@ -69,30 +69,30 @@ bool led_update_user(led_t led_state) { } layer_state_t layer_state_set_user(layer_state_t state) { - - uint8_t layer = biton32(state); - + + uint8_t layer = get_highest_layer(state); + #if defined(LED_NUM_LOCK_PIN) && defined(LED_SCROLL_LOCK_PIN) switch (layer) { case 0: - writePin(LED_SCROLL_LOCK_PIN, !LED_PIN_ON_STATE); - writePin(LED_NUM_LOCK_PIN, !LED_PIN_ON_STATE); + writePin(LED_SCROLL_LOCK_PIN, !LED_PIN_ON_STATE); + writePin(LED_NUM_LOCK_PIN, !LED_PIN_ON_STATE); break; case 1: - writePin(LED_SCROLL_LOCK_PIN, LED_PIN_ON_STATE); - writePin(LED_NUM_LOCK_PIN, !LED_PIN_ON_STATE); + writePin(LED_SCROLL_LOCK_PIN, LED_PIN_ON_STATE); + writePin(LED_NUM_LOCK_PIN, !LED_PIN_ON_STATE); break; case 2: - writePin(LED_SCROLL_LOCK_PIN, !LED_PIN_ON_STATE); - writePin(LED_NUM_LOCK_PIN, LED_PIN_ON_STATE); + writePin(LED_SCROLL_LOCK_PIN, !LED_PIN_ON_STATE); + writePin(LED_NUM_LOCK_PIN, LED_PIN_ON_STATE); break; case 3: - writePin(LED_SCROLL_LOCK_PIN, LED_PIN_ON_STATE); - writePin(LED_NUM_LOCK_PIN, LED_PIN_ON_STATE); + writePin(LED_SCROLL_LOCK_PIN, LED_PIN_ON_STATE); + writePin(LED_NUM_LOCK_PIN, LED_PIN_ON_STATE); break; } #endif - return state; + return state; } diff --git a/keyboards/mechlovin/hex4b/rev1/config.h b/keyboards/mechlovin/hex4b/rev1/config.h index 7dcdb6b3a4..8afeeaf593 100644 --- a/keyboards/mechlovin/hex4b/rev1/config.h +++ b/keyboards/mechlovin/hex4b/rev1/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B7, A2, A1, A3, A4, A5 } #define MATRIX_COL_PINS { B6, B5, B3, B2, B1, B0, A0, A6, A7, C7, C6, C5, C4, D1, D0 } -#define UNUSED_PINS #define LED_NUM_LOCK_PIN D6 #define LED_CAPS_LOCK_PIN D7 diff --git a/keyboards/mechlovin/hex4b/rev2/config.h b/keyboards/mechlovin/hex4b/rev2/config.h index 70207ed481..9eb4e03feb 100644 --- a/keyboards/mechlovin/hex4b/rev2/config.h +++ b/keyboards/mechlovin/hex4b/rev2/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { A4, B12, B13, B14, B15, A1 } #define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, A6, A5, A3, C13, B7, B6, B5, B4, B3 } -#define UNUSED_PINS #define LED_NUM_LOCK_PIN C15 #define LED_CAPS_LOCK_PIN B9 diff --git a/keyboards/mechlovin/hex6c/config.h b/keyboards/mechlovin/hex6c/config.h index d76d271047..c3125f217f 100644 --- a/keyboards/mechlovin/hex6c/config.h +++ b/keyboards/mechlovin/hex6c/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { A10, B13, B12, B11, C14, C15 } #define MATRIX_COL_PINS { A13, A14, A1, A0, C13, B9, B4, B7, B8, B5, B6, A9, A5, A6, A7, B1, B2, B10, B3, B14, B15 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechlovin/infinity87/rev2/config.h b/keyboards/mechlovin/infinity87/rev2/config.h index 412816a0d4..65eaa9a7fa 100644 --- a/keyboards/mechlovin/infinity87/rev2/config.h +++ b/keyboards/mechlovin/infinity87/rev2/config.h @@ -27,7 +27,6 @@ * */ #define MATRIX_ROW_PINS { D5, D2, D4, D3, D0, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/mechlovin/infinity875/config.h b/keyboards/mechlovin/infinity875/config.h index 0f81a71f96..4f02ed39c9 100644 --- a/keyboards/mechlovin/infinity875/config.h +++ b/keyboards/mechlovin/infinity875/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ #define MATRIX_ROW_PINS { D5, D2, D4, D3, D0, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/mechlovin/jay60/config.h b/keyboards/mechlovin/jay60/config.h index b0e3d3bd4b..5228f40751 100644 --- a/keyboards/mechlovin/jay60/config.h +++ b/keyboards/mechlovin/jay60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C2, C1, C0, D7, A1 } #define MATRIX_COL_PINS { B6, B5, B3, B2, B1, B0, A0, A6, A7, C7, C6, C5, C4, C3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechlovin/kanu/config.h b/keyboards/mechlovin/kanu/config.h index 880d87a4ac..d9028d0740 100644 --- a/keyboards/mechlovin/kanu/config.h +++ b/keyboards/mechlovin/kanu/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B5, B6, D3, C6, C7 } #define MATRIX_COL_PINS { E6, B1, B3, F0, F1, F4, F5, F6, F7, D5, D4, B4, D6, D7, B0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechlovin/kay60/config.h b/keyboards/mechlovin/kay60/config.h index 7896a6edf4..2cae8a3b67 100644 --- a/keyboards/mechlovin/kay60/config.h +++ b/keyboards/mechlovin/kay60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D5, D3, D2, B1, B5} #define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, B2, B3, B7, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechlovin/olly/bb/config.h b/keyboards/mechlovin/olly/bb/config.h index 52b1e77f6a..00ecb21470 100644 --- a/keyboards/mechlovin/olly/bb/config.h +++ b/keyboards/mechlovin/olly/bb/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ #define MATRIX_ROW_PINS {D6, A5, A4, A3, A6} -#define UNUSED_PINS #define BACKLIGHT_PIN D4 #define BACKLIGHT_BREATHING diff --git a/keyboards/mechlovin/olly/jf/config.h b/keyboards/mechlovin/olly/jf/config.h index d9d839b3b8..4dc4785332 100644 --- a/keyboards/mechlovin/olly/jf/config.h +++ b/keyboards/mechlovin/olly/jf/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ #define MATRIX_ROW_PINS { D5, D6, A5, A4, A3, A6} -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/mechlovin/serratus/config.h b/keyboards/mechlovin/serratus/config.h index 965c34bbd0..4b497875da 100644 --- a/keyboards/mechlovin/serratus/config.h +++ b/keyboards/mechlovin/serratus/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ #define MATRIX_ROW_PINS { D5, D2, D4, D3, D0, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/mechlovin/th1800/config.h b/keyboards/mechlovin/th1800/config.h index 423af0bc14..46c370ae2e 100644 --- a/keyboards/mechlovin/th1800/config.h +++ b/keyboards/mechlovin/th1800/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6, B7, D0, D1, D5, D6 } #define MATRIX_COL_PINS { A3, D7, C0, C1, C2, C3, C4, C5, C6, C7, A7, A6, A5, A4, B3, B2, B0, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechlovin/zed60/config.h b/keyboards/mechlovin/zed60/config.h index 7d096d3e96..af78e10b7c 100644 --- a/keyboards/mechlovin/zed60/config.h +++ b/keyboards/mechlovin/zed60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B10, B2, B1, B0, A2 } #define MATRIX_COL_PINS { A10, A3, A9, A8, B15, B14, B13, B12, B5, B4, B3, A15, B7, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW |