aboutsummaryrefslogtreecommitdiff
path: root/keyboards/joshajohnson
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/joshajohnson')
-rw-r--r--keyboards/joshajohnson/hub16/keyboard.json (renamed from keyboards/joshajohnson/hub16/info.json)7
-rwxr-xr-xkeyboards/joshajohnson/hub16/keymaps/default/keymap.c2
-rwxr-xr-xkeyboards/joshajohnson/hub16/keymaps/via/keymap.c2
-rw-r--r--keyboards/joshajohnson/hub16/matrix.c23
-rwxr-xr-xkeyboards/joshajohnson/hub16/rules.mk13
-rw-r--r--keyboards/joshajohnson/hub20/keyboard.json (renamed from keyboards/joshajohnson/hub20/info.json)10
-rw-r--r--keyboards/joshajohnson/hub20/keymaps/default/keymap.c2
-rw-r--r--keyboards/joshajohnson/hub20/keymaps/left_hand_numpad/keymap.c2
-rw-r--r--keyboards/joshajohnson/hub20/keymaps/right_hand_numpad/keymap.c2
-rw-r--r--keyboards/joshajohnson/hub20/keymaps/via/keymap.c2
-rw-r--r--keyboards/joshajohnson/hub20/rules.mk15
11 files changed, 33 insertions, 47 deletions
diff --git a/keyboards/joshajohnson/hub16/info.json b/keyboards/joshajohnson/hub16/keyboard.json
index 920b42feec..7d8f0ab356 100644
--- a/keyboards/joshajohnson/hub16/info.json
+++ b/keyboards/joshajohnson/hub16/keyboard.json
@@ -37,6 +37,13 @@
},
"processor": "atmega32u4",
"bootloader": "caterina",
+ "features": {
+ "bootmagic": true,
+ "mousekey": true,
+ "extrakey": true,
+ "rgblight": true,
+ "encoder": true
+ },
"debounce": 20,
"layouts": {
"LAYOUT": {
diff --git a/keyboards/joshajohnson/hub16/keymaps/default/keymap.c b/keyboards/joshajohnson/hub16/keymaps/default/keymap.c
index efe10d3743..fbcb5a5a5d 100755
--- a/keyboards/joshajohnson/hub16/keymaps/default/keymap.c
+++ b/keyboards/joshajohnson/hub16/keymaps/default/keymap.c
@@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, RGB_MOD, RGB_RMOD, RGB_TOG,
RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI,
RGB_SAD, RGB_SAI, _______, _______,
- _______, _______, QK_BOOT, _______
+ _______, _______, QK_BOOT, _______
),
};
diff --git a/keyboards/joshajohnson/hub16/keymaps/via/keymap.c b/keyboards/joshajohnson/hub16/keymaps/via/keymap.c
index 1f5a4d4b12..760ac0bc65 100755
--- a/keyboards/joshajohnson/hub16/keymaps/via/keymap.c
+++ b/keyboards/joshajohnson/hub16/keymaps/via/keymap.c
@@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, RGB_MOD, RGB_RMOD, RGB_TOG,
RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI,
RGB_SAD, RGB_SAI, _______, _______,
- _______, _______, QK_BOOT, _______
+ _______, _______, QK_BOOT, _______
),
[2] = LAYOUT(
diff --git a/keyboards/joshajohnson/hub16/matrix.c b/keyboards/joshajohnson/hub16/matrix.c
index 4f32070e66..26222cf15a 100644
--- a/keyboards/joshajohnson/hub16/matrix.c
+++ b/keyboards/joshajohnson/hub16/matrix.c
@@ -14,12 +14,9 @@ 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 "util.h"
#include "matrix.h"
-#include "quantum.h"
// Encoder things
#define SWITCH_1 F7
@@ -34,22 +31,22 @@ extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values
extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values
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]);
}
}
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]);
}
}
@@ -67,7 +64,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
// For each col...
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 : (MATRIX_ROW_SHIFTER << col_index);
@@ -82,8 +79,8 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
void matrix_init_custom(void) {
// initialize key pins
- setPinInput(SWITCH_1);
- setPinInput(SWITCH_2);
+ gpio_set_pin_input(SWITCH_1);
+ gpio_set_pin_input(SWITCH_2);
init_pins();
}
@@ -115,8 +112,8 @@ static bool read_encoder_switches(matrix_row_t current_matrix[], uint8_t current
bool btn_2_rise = 0;
btn_1_array <<= 1;
btn_2_array <<= 1;
- btn_1_array |= readPin(SWITCH_1);
- btn_2_array |= readPin(SWITCH_2);
+ btn_1_array |= gpio_read_pin(SWITCH_1);
+ btn_2_array |= gpio_read_pin(SWITCH_2);
(btn_1_array == 0b01111111) ? (btn_1_rise = 1) : (btn_1_rise = 0);
(btn_2_array == 0b01111111) ? (btn_2_rise = 1) : (btn_2_rise = 0);
diff --git a/keyboards/joshajohnson/hub16/rules.mk b/keyboards/joshajohnson/hub16/rules.mk
index 51fa8f6ee6..9a337c23b8 100755
--- a/keyboards/joshajohnson/hub16/rules.mk
+++ b/keyboards/joshajohnson/hub16/rules.mk
@@ -1,16 +1,3 @@
-# Build Options
-# change yes to no to disable
-#
CUSTOM_MATRIX = lite # Custom scanning of matrix
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # 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 = no # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-ENCODER_ENABLE = yes # Rotary Encoder support
SRC = matrix.c
diff --git a/keyboards/joshajohnson/hub20/info.json b/keyboards/joshajohnson/hub20/keyboard.json
index b1b25dc1d4..4bedd20c4a 100644
--- a/keyboards/joshajohnson/hub20/info.json
+++ b/keyboards/joshajohnson/hub20/keyboard.json
@@ -30,6 +30,16 @@
},
"driver": "ws2812"
},
+ "features": {
+ "bootmagic": true,
+ "command": false,
+ "console": false,
+ "encoder": true,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "rgb_matrix": true
+ },
"matrix_pins": {
"cols": ["A6", "A7", "B7", "B6"],
"rows": ["A13", "B14", "A10", "A0", "A2", "A1"]
diff --git a/keyboards/joshajohnson/hub20/keymaps/default/keymap.c b/keyboards/joshajohnson/hub20/keymaps/default/keymap.c
index e943780258..fe6dd37d05 100644
--- a/keyboards/joshajohnson/hub20/keymaps/default/keymap.c
+++ b/keyboards/joshajohnson/hub20/keymaps/default/keymap.c
@@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_PENT, KC_PDOT, KC_P0, KC_P0
),
[1] = LAYOUT_all(
- QK_BOOT, _______,
+ QK_BOOT, _______,
RGB_TOG, RGB_RMOD, RGB_MOD, _______,
_______, RGB_VAD, RGB_VAI, _______,
_______, RGB_HUD, RGB_HUI, _______,
diff --git a/keyboards/joshajohnson/hub20/keymaps/left_hand_numpad/keymap.c b/keyboards/joshajohnson/hub20/keymaps/left_hand_numpad/keymap.c
index fe848d7c33..a7853accc5 100644
--- a/keyboards/joshajohnson/hub20/keymaps/left_hand_numpad/keymap.c
+++ b/keyboards/joshajohnson/hub20/keymaps/left_hand_numpad/keymap.c
@@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_PENT, KC_PDOT, KC_P0
),
[1] = LAYOUT_left_handed(
- QK_BOOT, _______,
+ QK_BOOT, _______,
RGB_TOG, RGB_RMOD, RGB_MOD, _______,
_______, RGB_VAD, RGB_VAI, _______,
RGB_HUD, RGB_HUI, _______,
diff --git a/keyboards/joshajohnson/hub20/keymaps/right_hand_numpad/keymap.c b/keyboards/joshajohnson/hub20/keymaps/right_hand_numpad/keymap.c
index 71168069fb..78198ab951 100644
--- a/keyboards/joshajohnson/hub20/keymaps/right_hand_numpad/keymap.c
+++ b/keyboards/joshajohnson/hub20/keymaps/right_hand_numpad/keymap.c
@@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_P0, KC_PDOT, KC_PENT
),
[1] = LAYOUT_right_handed(
- QK_BOOT, _______,
+ QK_BOOT, _______,
RGB_TOG, RGB_RMOD, RGB_MOD, _______,
_______, RGB_VAD, RGB_VAI,
_______, RGB_HUD, RGB_HUI, _______,
diff --git a/keyboards/joshajohnson/hub20/keymaps/via/keymap.c b/keyboards/joshajohnson/hub20/keymaps/via/keymap.c
index b8d7e6fdc8..3dfdd4dbd9 100644
--- a/keyboards/joshajohnson/hub20/keymaps/via/keymap.c
+++ b/keyboards/joshajohnson/hub20/keymaps/via/keymap.c
@@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_PENT, KC_PDOT, KC_P0, KC_P0
),
[1] = LAYOUT_all(
- QK_BOOT, _______,
+ QK_BOOT, _______,
RGB_TOG, RGB_RMOD, RGB_MOD, _______,
_______, RGB_VAD, RGB_VAI, _______,
_______, RGB_HUD, RGB_HUI, _______,
diff --git a/keyboards/joshajohnson/hub20/rules.mk b/keyboards/joshajohnson/hub20/rules.mk
deleted file mode 100644
index f559246b9e..0000000000
--- a/keyboards/joshajohnson/hub20/rules.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # 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 = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-RGB_MATRIX_ENABLE = yes
-ENCODER_ENABLE = yes
-