summaryrefslogtreecommitdiff
path: root/keyboards/jones/v1
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2023-02-28 11:22:29 +1100
committerNick Brassel <nick@tzarc.org>2023-02-28 11:22:29 +1100
commitbacec14073b2e897d5a52caf12de5a6a1f7b4078 (patch)
treed4e3e57aac1a829a191831efd2e62c8a43217885 /keyboards/jones/v1
parentd70e9b8659a7fbbd7069fd542bd07e67e04327a1 (diff)
parentb865b9e1706ad28ae4882bd2e0331e98808295fa (diff)
Merge remote-tracking branch 'upstream/develop'
Diffstat (limited to 'keyboards/jones/v1')
-rw-r--r--keyboards/jones/v1/config.h18
-rw-r--r--keyboards/jones/v1/info.json11
-rw-r--r--keyboards/jones/v1/keymaps/via/config.h3
-rw-r--r--keyboards/jones/v1/keymaps/via/keymap.c10
-rw-r--r--keyboards/jones/v1/rules.mk6
5 files changed, 16 insertions, 32 deletions
diff --git a/keyboards/jones/v1/config.h b/keyboards/jones/v1/config.h
index 0d4ab90a60..1936d5d256 100644
--- a/keyboards/jones/v1/config.h
+++ b/keyboards/jones/v1/config.h
@@ -17,12 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#include "config_common.h"
-
-/* key matrix size */
-// Same number for Round-Robin matrix.
-#define MATRIX_ROWS 10
-#define MATRIX_COLS 10
// Same pins for Round-Robin matrix.
#define MATRIX_ROW_PINS { B3, B2, E6, D6, D4, B0, B1, B7, B4, D7 }
@@ -30,11 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
-/* Rotary Encoder */
-#define ENCODERS_PAD_A { F5, D2 }
-#define ENCODERS_PAD_B { F4, D3 }
-#define ENCODER_RESOLUTION 4 //the default & suggested is 4
-
/* Audio */
#ifdef AUDIO_ENABLE
#define AUDIO_PIN C6
@@ -55,13 +44,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF // Overriding RGB Lighting on/off status
#endif
-/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
-#define DEBOUNCE 5
-
-/* Bootmagic Lite trigger key. Left-Top of the layout. */
-#define BOOTMAGIC_LITE_ROW 0
-#define BOOTMAGIC_LITE_COLUMN 9
-
/* External EEPROM */
// Use 24LC64 EEPROM
#define EEPROM_I2C_24LC64
diff --git a/keyboards/jones/v1/info.json b/keyboards/jones/v1/info.json
index e323445fc9..37f0b70087 100644
--- a/keyboards/jones/v1/info.json
+++ b/keyboards/jones/v1/info.json
@@ -8,6 +8,17 @@
"pid": "0x175A",
"device_version": "1.0.0"
},
+ "encoder": {
+ "rotary": [
+ {"pin_a": "F5", "pin_b": "F4"},
+ {"pin_a": "D2", "pin_b": "D3"}
+ ]
+ },
+ "bootmagic": {
+ "matrix": [0, 9]
+ },
+ "processor": "atmega32u4",
+ "bootloader": "atmel-dfu",
"layouts": {
"LAYOUT": {
"layout": [
diff --git a/keyboards/jones/v1/keymaps/via/config.h b/keyboards/jones/v1/keymaps/via/config.h
index 5d24e1f91a..a66ab80904 100644
--- a/keyboards/jones/v1/keymaps/via/config.h
+++ b/keyboards/jones/v1/keymaps/via/config.h
@@ -24,9 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// when turn knob clockwise or counterclockwise.
// This is handy to assign key codes by VIA.
-// Number of endoder
-#define ENCODERS 2
-
// Mappings of encoder rotation to key position in key matrix.
// First encoder, Left side : k85, k86
// Second encoder, Right side : k95, k96
diff --git a/keyboards/jones/v1/keymaps/via/keymap.c b/keyboards/jones/v1/keymaps/via/keymap.c
index 00277bb7b1..31a182733a 100644
--- a/keyboards/jones/v1/keymaps/via/keymap.c
+++ b/keyboards/jones/v1/keymaps/via/keymap.c
@@ -158,7 +158,7 @@ layer_state_t default_layer_state_set_user(layer_state_t state) {
}
bool led_update_user(led_t led_state) {
- rgblight_set_layer_state(3, IS_HOST_LED_ON(USB_LED_CAPS_LOCK));
+ rgblight_set_layer_state(3, led_state.caps_lock);
return true;
}
@@ -168,12 +168,12 @@ bool led_update_user(led_t led_state) {
//------------------------------------------------------------------------------
// Rotary Encoder
//------------------------------------------------------------------------------
-static uint8_t encoder_state[ENCODERS] = {0};
-static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY;
-static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY;
+static uint8_t encoder_state[NUM_ENCODERS] = {0};
+static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY;
+static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY;
void encoder_action_unregister(void) {
- for (int index = 0; index < ENCODERS; ++index) {
+ for (int index = 0; index < NUM_ENCODERS; ++index) {
if (encoder_state[index]) {
keyevent_t encoder_event = (keyevent_t) {
.key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index],
diff --git a/keyboards/jones/v1/rules.mk b/keyboards/jones/v1/rules.mk
index 56d629cfe9..cfc8879b74 100644
--- a/keyboards/jones/v1/rules.mk
+++ b/keyboards/jones/v1/rules.mk
@@ -1,9 +1,3 @@
-# MCU name
-MCU = atmega32u4
-
-# Bootloader selection
-BOOTLOADER = atmel-dfu
-
# Build Options
# change yes to no to disable
#