diff --git a/keyboards/ai03/orbit/orbit.c b/keyboards/ai03/orbit/orbit.c index 0c1e0dc32e..dce16e4cc1 100644 --- a/keyboards/ai03/orbit/orbit.c +++ b/keyboards/ai03/orbit/orbit.c @@ -18,7 +18,7 @@ void led_init_ports(void) { // Initialize indicator LEDs to output - if (isLeftHand) { + if (is_keyboard_left()) { gpio_set_pin_output(C6); gpio_set_pin_output(B6); gpio_set_pin_output(B5); @@ -36,7 +36,7 @@ void led_init_ports(void) { // // (LEFT) 0 1 2 | 3 4 5 (RIGHT) void led_toggle(uint8_t id, bool on) { - if (isLeftHand) { + if (is_keyboard_left()) { switch (id) { case 0: // Left hand C6 diff --git a/keyboards/basekeys/slice/keymaps/default/keymap.c b/keyboards/basekeys/slice/keymaps/default/keymap.c index a407d35ab7..b168bcd247 100644 --- a/keyboards/basekeys/slice/keymaps/default/keymap.c +++ b/keyboards/basekeys/slice/keymaps/default/keymap.c @@ -115,7 +115,7 @@ const char *read_logo(void) { } oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0; + return is_keyboard_left() ? OLED_ROTATION_180 : OLED_ROTATION_0; } bool oled_task_user(void) { diff --git a/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c b/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c index 7d4133a99b..6a87f52268 100644 --- a/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c +++ b/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c @@ -115,7 +115,7 @@ const char *read_logo(void) { } oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0; + return is_keyboard_left() ? OLED_ROTATION_180 : OLED_ROTATION_0; } bool oled_task_user(void) { diff --git a/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c b/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c index bd7923b36b..3e3ccb5376 100644 --- a/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c +++ b/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c @@ -199,7 +199,7 @@ const char *read_logo(void) { } oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0; + return is_keyboard_left() ? OLED_ROTATION_180 : OLED_ROTATION_0; } bool oled_task_user(void) { diff --git a/keyboards/giabalanai/keymaps/2firmware/keymap.c b/keyboards/giabalanai/keymaps/2firmware/keymap.c index f60d1d07e0..9aa7fbc611 100644 --- a/keyboards/giabalanai/keymaps/2firmware/keymap.c +++ b/keyboards/giabalanai/keymaps/2firmware/keymap.c @@ -468,7 +468,7 @@ void keyboard_post_init_user(void) { user_config.raw = eeconfig_read_user(); // When USB cable is connected to the left side keyboard, use QWERTY layout by default. - if (is_keyboard_master() && isLeftHand) { + if (is_keyboard_master() && is_keyboard_left()) { default_layer_set(1UL << _QWERTY); } diff --git a/keyboards/halfcliff/matrix.c b/keyboards/halfcliff/matrix.c index fc9d437a45..05073908fa 100644 --- a/keyboards/halfcliff/matrix.c +++ b/keyboards/halfcliff/matrix.c @@ -182,7 +182,7 @@ void matrix_init(void) { split_pre_init(); // Set pinout for right half if pinout for that half is defined - if (!isLeftHand) { + if (!is_keyboard_left()) { #ifdef DIRECT_PINS_RIGHT const pin_t direct_pins_right[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS_RIGHT; for (uint8_t i = 0; i < MATRIX_ROWS; i++) { @@ -205,7 +205,7 @@ void matrix_init(void) { #endif } - thisHand = isLeftHand ? 0 : (ROWS_PER_HAND); + thisHand = is_keyboard_left() ? 0 : (ROWS_PER_HAND); thatHand = ROWS_PER_HAND - thisHand; // initialize key pins diff --git a/keyboards/handwired/lagrange/transport.c b/keyboards/handwired/lagrange/transport.c index 3ff2e9f409..ef0006172d 100644 --- a/keyboards/handwired/lagrange/transport.c +++ b/keyboards/handwired/lagrange/transport.c @@ -158,7 +158,7 @@ void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) /* Update the layer and LED state if necessary. */ - if (!isLeftHand) { + if (!is_keyboard_left()) { if (context.led_state.raw != new_context.led_state.raw) { context.led_state.raw = new_context.led_state.raw; led_update_kb(context.led_state); diff --git a/keyboards/keebio/kbo5000/rev1/rev1.c b/keyboards/keebio/kbo5000/rev1/rev1.c index 1fd1b9b905..f2c98da111 100644 --- a/keyboards/keebio/kbo5000/rev1/rev1.c +++ b/keyboards/keebio/kbo5000/rev1/rev1.c @@ -9,12 +9,11 @@ void matrix_init_kb(void) { matrix_init_user(); } -bool led_update_kb(led_t led_state) { +void led_update_ports(led_t led_state) { // Only update if left half - if (isLeftHand && led_update_user(led_state)) { + if (is_keyboard_left()) { gpio_write_pin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); } - return true; } bool encoder_update_kb(uint8_t index, bool clockwise) { diff --git a/keyboards/keebio/quefrency/rev2/rev2.c b/keyboards/keebio/quefrency/rev2/rev2.c index 63a02ee20b..992f621ef6 100644 --- a/keyboards/keebio/quefrency/rev2/rev2.c +++ b/keyboards/keebio/quefrency/rev2/rev2.c @@ -9,12 +9,11 @@ void matrix_init_kb(void) { matrix_init_user(); } -bool led_update_kb(led_t led_state) { +void led_update_ports(led_t led_state) { // Only update if left half - if (isLeftHand && led_update_user(led_state)) { + if (is_keyboard_left()) { gpio_write_pin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); } - return true; } #ifdef ENCODER_ENABLE diff --git a/keyboards/keebio/quefrency/rev3/rev3.c b/keyboards/keebio/quefrency/rev3/rev3.c index 3e61e07928..82fb267879 100644 --- a/keyboards/keebio/quefrency/rev3/rev3.c +++ b/keyboards/keebio/quefrency/rev3/rev3.c @@ -22,12 +22,11 @@ void matrix_init_kb(void) { matrix_init_user(); } -bool led_update_kb(led_t led_state) { +void led_update_ports(led_t led_state) { // Only update if left half - if (led_update_user(led_state) && isLeftHand) { + if (is_keyboard_left()) { gpio_write_pin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); } - return true; } #ifdef ENCODER_ENABLE diff --git a/keyboards/keebio/sinc/sinc.c b/keyboards/keebio/sinc/sinc.c index faa3540af9..102ede7cff 100644 --- a/keyboards/keebio/sinc/sinc.c +++ b/keyboards/keebio/sinc/sinc.c @@ -17,14 +17,12 @@ along with this program. If not, see . #include "quantum.h" #include "split_util.h" -#ifdef BACKLIGHT_ENABLE -bool led_update_kb(led_t led_state) { - if (!led_update_user(led_state)) { return false; } +#ifdef LED_CAPS_LOCK_PIN +void led_update_ports(led_t led_state) { // Only update if left half - if (isLeftHand && led_update_user(led_state)) { + if (is_keyboard_left()) { gpio_write_pin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); } - return true; } #endif diff --git a/keyboards/nullbitsco/snap/matrix.c b/keyboards/nullbitsco/snap/matrix.c index 64b451641d..94716d4032 100644 --- a/keyboards/nullbitsco/snap/matrix.c +++ b/keyboards/nullbitsco/snap/matrix.c @@ -13,8 +13,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "matrix.h" #include +#include "matrix.h" +#include "keyboard.h" #include "split_util.h" #include "wait.h" @@ -51,7 +52,7 @@ static void init_pins(void) { } // Set extended pin (only on right side) - if (!isLeftHand) { + if (!is_keyboard_left()) { // Set extended pin to input, pullup gpio_set_pin_input_high(MATRIX_EXT_PIN_RIGHT); } @@ -81,7 +82,7 @@ static void read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) static void read_ext_pin(matrix_row_t current_matrix[]) { // Read the state of the extended matrix pin - if (!isLeftHand) { + if (!is_keyboard_left()) { if (gpio_read_pin(MATRIX_EXT_PIN_RIGHT) == 0) { current_matrix[EXT_PIN_ROW] |= (COL_SHIFTER << EXT_PIN_COL); } else { @@ -91,7 +92,7 @@ static void read_ext_pin(matrix_row_t current_matrix[]) { } void matrix_init_custom(void) { - if (!isLeftHand) { + if (!is_keyboard_left()) { row_pins = row_pins_right; col_pins = col_pins_right; } diff --git a/keyboards/rgbkb/sol3/rev1/rev1.c b/keyboards/rgbkb/sol3/rev1/rev1.c index 96402f851c..afe0ef17f6 100644 --- a/keyboards/rgbkb/sol3/rev1/rev1.c +++ b/keyboards/rgbkb/sol3/rev1/rev1.c @@ -43,7 +43,7 @@ bool dip_switch_update_kb(uint8_t index, bool active) { } case 1: { // Handle RGB Encoder switch press - action_exec(MAKE_KEYEVENT(isLeftHand ? 4 : 10, 6, active)); + action_exec(MAKE_KEYEVENT(is_keyboard_left() ? 4 : 10, 6, active)); break; } } diff --git a/keyboards/sekigon/grs_70ec/matrix.c b/keyboards/sekigon/grs_70ec/matrix.c index 718423e57b..cd582b30e4 100644 --- a/keyboards/sekigon/grs_70ec/matrix.c +++ b/keyboards/sekigon/grs_70ec/matrix.c @@ -52,7 +52,7 @@ void matrix_init_custom(void) { ecsm_init(&ecsm_config); - thisHand = isLeftHand ? 0 : (ROWS_PER_HAND); + thisHand = is_keyboard_left() ? 0 : (ROWS_PER_HAND); thatHand = ROWS_PER_HAND - thisHand; split_post_init();