aboutsummaryrefslogtreecommitdiff
path: root/keyboards/redscarf_iiplus/verb
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/redscarf_iiplus/verb')
-rw-r--r--keyboards/redscarf_iiplus/verb/keyboard.json (renamed from keyboards/redscarf_iiplus/verb/info.json)7
-rwxr-xr-xkeyboards/redscarf_iiplus/verb/matrix.c79
-rwxr-xr-xkeyboards/redscarf_iiplus/verb/rules.mk13
3 files changed, 45 insertions, 54 deletions
diff --git a/keyboards/redscarf_iiplus/verb/info.json b/keyboards/redscarf_iiplus/verb/keyboard.json
index 82892e9325..a027fe1003 100644
--- a/keyboards/redscarf_iiplus/verb/info.json
+++ b/keyboards/redscarf_iiplus/verb/keyboard.json
@@ -8,6 +8,13 @@
"pid": "0x0000",
"device_version": "0.0.1"
},
+ "features": {
+ "backlight": true,
+ "bootmagic": false,
+ "extrakey": true,
+ "mousekey": false,
+ "nkro": true
+ },
"backlight": {
"pin": "B7"
},
diff --git a/keyboards/redscarf_iiplus/verb/matrix.c b/keyboards/redscarf_iiplus/verb/matrix.c
index aa2cd8e510..886704f9ef 100755
--- a/keyboards/redscarf_iiplus/verb/matrix.c
+++ b/keyboards/redscarf_iiplus/verb/matrix.c
@@ -14,15 +14,12 @@ GNU General Public License for more details.
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 <stdint.h>
-#include <stdbool.h>
#include "wait.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
-#include "quantum.h"
#if (MATRIX_COLS <= 8)
# define print_matrix_header() print("\nr/c 01234567\n")
@@ -117,7 +114,7 @@ static void init_pins(void) {
for (int col = 0; col < MATRIX_COLS; col++) {
pin_t pin = direct_pins[row][col];
if (pin != NO_PIN) {
- setPinInputHigh(pin);
+ gpio_set_pin_input_high(pin);
}
}
}
@@ -130,7 +127,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
pin_t pin = direct_pins[current_row][col_index];
if (pin != NO_PIN) {
- current_matrix[current_row] |= readPin(pin) ? 0 : (ROW_SHIFTER << col_index);
+ current_matrix[current_row] |= gpio_read_pin(pin) ? 0 : (ROW_SHIFTER << col_index);
}
}
@@ -153,27 +150,27 @@ static void select_row(uint8_t col)
{
switch (col) {
case 0:
- writePinLow(B0);
- writePinLow(B1);
- writePinLow(B2);
+ gpio_write_pin_low(B0);
+ gpio_write_pin_low(B1);
+ gpio_write_pin_low(B2);
break;
case 1:
- writePinLow(B0);
- writePinLow(B1);
+ gpio_write_pin_low(B0);
+ gpio_write_pin_low(B1);
break;
case 2:
- writePinLow(B0);
- writePinLow(B2);
+ gpio_write_pin_low(B0);
+ gpio_write_pin_low(B2);
break;
case 3:
- writePinLow(B0);
+ gpio_write_pin_low(B0);
break;
case 4:
- writePinLow(B1);
- writePinLow(B2);
+ gpio_write_pin_low(B1);
+ gpio_write_pin_low(B2);
break;
case 5:
- writePinLow(B1);
+ gpio_write_pin_low(B1);
break;
}
}
@@ -182,46 +179,46 @@ static void unselect_row(uint8_t col)
{
switch (col) {
case 0:
- writePinHigh(B0);
- writePinHigh(B1);
- writePinHigh(B2);
+ gpio_write_pin_high(B0);
+ gpio_write_pin_high(B1);
+ gpio_write_pin_high(B2);
break;
case 1:
- writePinHigh(B0);
- writePinHigh(B1);
+ gpio_write_pin_high(B0);
+ gpio_write_pin_high(B1);
break;
case 2:
- writePinHigh(B0);
- writePinHigh(B2);
+ gpio_write_pin_high(B0);
+ gpio_write_pin_high(B2);
break;
case 3:
- writePinHigh(B0);
+ gpio_write_pin_high(B0);
break;
case 4:
- writePinHigh(B1);
- writePinHigh(B2);
+ gpio_write_pin_high(B1);
+ gpio_write_pin_high(B2);
break;
case 5:
- writePinHigh(B1);
+ gpio_write_pin_high(B1);
break;
}
}
static void unselect_rows(void)
{
- setPinOutput(B0);
- setPinOutput(B1);
- setPinOutput(B2);
+ gpio_set_pin_output(B0);
+ gpio_set_pin_output(B1);
+ gpio_set_pin_output(B2);
// make all pins high to select Y7, nothing is connected to that (otherwise the first row will act weird)
- writePinHigh(B0);
- writePinHigh(B1);
- writePinHigh(B2);
+ gpio_write_pin_high(B0);
+ gpio_write_pin_high(B1);
+ gpio_write_pin_high(B2);
}
static void init_pins(void) {
unselect_rows();
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
- setPinInputHigh(col_pins[x]);
+ gpio_set_pin_input_high(col_pins[x]);
}
}
@@ -241,7 +238,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
for(uint8_t col_index = 0; col_index < 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
current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index);
@@ -257,26 +254,26 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
static void select_col(uint8_t col)
{
- setPinOutput(col_pins[col]);
- writePinLow(col_pins[col]);
+ gpio_set_pin_output(col_pins[col]);
+ gpio_write_pin_low(col_pins[col]);
}
static void unselect_col(uint8_t col)
{
- setPinInputHigh(col_pins[col]);
+ gpio_set_pin_input_high(col_pins[col]);
}
static void unselect_cols(void)
{
for(uint8_t x = 0; x < MATRIX_COLS; x++) {
- setPinInputHigh(col_pins[x]);
+ gpio_set_pin_input_high(col_pins[x]);
}
}
static void init_pins(void) {
unselect_cols();
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
- setPinInputHigh(row_pins[x]);
+ gpio_set_pin_input_high(row_pins[x]);
}
}
@@ -296,7 +293,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[row_index];
// Check row pin state
- if (readPin(row_pins[row_index]) == 0)
+ if (gpio_read_pin(row_pins[row_index]) == 0)
{
// Pin LO, set col bit
current_matrix[row_index] |= (ROW_SHIFTER << current_col);
diff --git a/keyboards/redscarf_iiplus/verb/rules.mk b/keyboards/redscarf_iiplus/verb/rules.mk
index 73a2fe6487..8784813b33 100755
--- a/keyboards/redscarf_iiplus/verb/rules.mk
+++ b/keyboards/redscarf_iiplus/verb/rules.mk
@@ -1,15 +1,2 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = no # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-
CUSTOM_MATRIX = yes
SRC += matrix.c