diff options
Diffstat (limited to 'keyboards/torn')
-rw-r--r-- | keyboards/torn/keyboard.json (renamed from keyboards/torn/info.json) | 8 | ||||
-rw-r--r-- | keyboards/torn/matrix.c | 12 | ||||
-rw-r--r-- | keyboards/torn/rules.mk | 13 |
3 files changed, 14 insertions, 19 deletions
diff --git a/keyboards/torn/info.json b/keyboards/torn/keyboard.json index c1b83188f0..162e7d08c0 100644 --- a/keyboards/torn/info.json +++ b/keyboards/torn/keyboard.json @@ -9,6 +9,14 @@ "device_version": "0.0.1", "max_power": 100 }, + "features": { + "bootmagic": false, + "encoder": true, + "extrakey": false, + "mousekey": false, + "oled": true, + "wpm": true + }, "encoder": { "rotary": [ {"pin_a": "B2", "pin_b": "B1"} diff --git a/keyboards/torn/matrix.c b/keyboards/torn/matrix.c index b674f21d57..64a808534c 100644 --- a/keyboards/torn/matrix.c +++ b/keyboards/torn/matrix.c @@ -30,15 +30,15 @@ static const mcp23018_pin_t secondary_row_pins[MATRIX_ROWS] = SECONDARY_RO static const mcp23018_pin_t secondary_col_pins[SPLIT_MATRIX_COLS] = SECONDARY_COL_PINS; static void select_row(uint8_t row) { - setPinOutput(row_pins[row]); - writePinLow(row_pins[row]); + gpio_set_pin_output(row_pins[row]); + gpio_write_pin_low(row_pins[row]); } -static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); } +static void unselect_row(uint8_t row) { gpio_set_pin_input_high(row_pins[row]); } static void unselect_rows(void) { for (uint8_t x = 0; x < MATRIX_ROWS; x++) { - setPinInputHigh(row_pins[x]); + gpio_set_pin_input_high(row_pins[x]); } } @@ -50,7 +50,7 @@ static void select_secondary_row(uint8_t row) { static void init_pins(void) { unselect_rows(); for (uint8_t x = 0; x < SPLIT_MATRIX_COLS; x++) { - setPinInputHigh(col_pins[x]); + gpio_set_pin_input_high(col_pins[x]); } } @@ -60,7 +60,7 @@ static matrix_row_t read_cols(void) { // For each col... for (uint8_t col_index = 0; col_index < SPLIT_MATRIX_COLS; col_index++) { // Select the col pin to read (active low) - uint8_t pin_state = readPin(col_pins[col_index]); + uint8_t pin_state = gpio_read_pin(col_pins[col_index]); // Populate the matrix row with the state of the col pin state |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); diff --git a/keyboards/torn/rules.mk b/keyboards/torn/rules.mk index f855a651a5..213b5db8ab 100644 --- a/keyboards/torn/rules.mk +++ b/keyboards/torn/rules.mk @@ -1,16 +1,3 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = no # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -ENCODER_ENABLE = yes # Enable rotary encoder -OLED_ENABLE = yes -WPM_ENABLE = yes CUSTOM_MATRIX = lite SRC += matrix.c \ |