1
0

Refactor keyboard/keymap use of deprecated isLeftHand (#25891)

This commit is contained in:
Joel Challis
2025-12-21 20:52:48 +00:00
committed by GitHub
parent d420bcad33
commit f82d4d8680
14 changed files with 25 additions and 29 deletions

View File

@@ -13,8 +13,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "matrix.h"
#include <string.h>
#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;
}