Skip to content

Commit

Permalink
Migrate some dip switch config to info.json (qmk#22437)
Browse files Browse the repository at this point in the history
  • Loading branch information
zvecr committed Nov 22, 2023
1 parent 3a5e425 commit a0a6820
Show file tree
Hide file tree
Showing 42 changed files with 72 additions and 90 deletions.
2 changes: 0 additions & 2 deletions keyboards/abacus/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ along with this program. If not, see <http:https://www.gnu.org/licenses/>.

#pragma once

#define DIP_SWITCH_PINS { D0 }

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
Expand Down
3 changes: 3 additions & 0 deletions keyboards/abacus/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"rows": ["D3", "D2", "D4", "C6"]
},
"diode_direction": "COL2ROW",
"dip_switch": {
"pins": ["D0"]
},
"encoder": {
"rotary": [
{"pin_a": "F1", "pin_b": "F0"}
Expand Down
2 changes: 0 additions & 2 deletions keyboards/ducky/one2mini/1861st/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@ along with this program. If not, see <http:https://www.gnu.org/licenses/>.

#pragma once

#define DIP_SWITCH_MATRIX_GRID { {0,14}, {1,14}, {2,14}, {3,14} }

#define GPIO_INPUT_PIN_DELAY (NUC123_HCLK / 6 / 1000000L)
3 changes: 3 additions & 0 deletions keyboards/ducky/one2mini/1861st/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"rows": ["D11", "B4", "B5", "B6", "B7"]
},
"diode_direction": "COL2ROW",
"dip_switch": {
"matrix_grid": [ [0,14], [1,14], [2,14], [3,14] ]
},
"layout_aliases": {
"LAYOUT_iso": "LAYOUT_60_iso"
},
Expand Down
2 changes: 0 additions & 2 deletions keyboards/ducky/one2sf/1967st/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@ along with this program. If not, see <http:https://www.gnu.org/licenses/>.

#pragma once

#define DIP_SWITCH_MATRIX_GRID { {0,14}, {1,14}, {2,14}, {3,14} }

#define GPIO_INPUT_PIN_DELAY (NUC123_HCLK / 6 / 1000000L)
3 changes: 3 additions & 0 deletions keyboards/ducky/one2sf/1967st/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"rows": ["D11", "B4", "B5", "B6", "B7"]
},
"diode_direction": "COL2ROW",
"dip_switch": {
"matrix_grid": [ [0,14], [1,14], [2,14], [3,14] ]
},
"layouts": {
"LAYOUT_all": {
"layout": [
Expand Down
20 changes: 0 additions & 20 deletions keyboards/handwired/6key/config.h

This file was deleted.

3 changes: 3 additions & 0 deletions keyboards/handwired/6key/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"rows": ["B4", "D0"]
},
"diode_direction": "COL2ROW",
"dip_switch": {
"pins": ["C6"]
},
"processor": "atmega32u4",
"bootloader": "caterina",
"layouts": {
Expand Down
3 changes: 0 additions & 3 deletions keyboards/helix/rev3_4rows/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ along with this program. If not, see <http:https://www.gnu.org/licenses/>.
#define SPLIT_HAND_MATRIX_GRID D7,B2
#define SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT

/* Dip switch on matrix grid */
#define DIP_SWITCH_MATRIX_GRID { {0,6}, {1,6}, {5,6}, {6,6} }

#ifdef RGB_MATRIX_ENABLE
#define RGB_MATRIX_LED_COUNT 50
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
Expand Down
5 changes: 4 additions & 1 deletion keyboards/helix/rev3_4rows/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"driver": "ws2812",
"sat_steps": 8,
"val_steps": 8,
"speed_steps": 10,
"speed_steps": 10
},
"dip_switch": {
"matrix_grid": [ [0,6], [1,6], [5,6], [6,6] ]
},
"encoder": {
"rotary": [
Expand Down
3 changes: 0 additions & 3 deletions keyboards/helix/rev3_5rows/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ along with this program. If not, see <http:https://www.gnu.org/licenses/>.
#define SPLIT_HAND_MATRIX_GRID D7,B2
#define SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT

/* Dip switch on matrix grid */
#define DIP_SWITCH_MATRIX_GRID { {0,6}, {1,6}, {5,6}, {6,6} }

#ifdef RGB_MATRIX_ENABLE
#define RGB_MATRIX_LED_COUNT 64
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
Expand Down
3 changes: 3 additions & 0 deletions keyboards/helix/rev3_5rows/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"val_steps": 8,
"speed_steps": 10
},
"dip_switch": {
"matrix_grid": [ [0,6], [1,6], [5,6], [6,6] ]
},
"encoder": {
"rotary": [
{"pin_a": "B6", "pin_b": "B5"}
Expand Down
5 changes: 0 additions & 5 deletions keyboards/inland/kb83/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,8 @@

#pragma once


#define RGB_TRIGGER_ON_KEYDOWN

/* DIP switch */
#define DIP_SWITCH_PINS \
{ A9 }

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
Expand Down
3 changes: 3 additions & 0 deletions keyboards/inland/kb83/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"rows": ["B15", "C6", "C7", "C8", "C9", "A8"]
},
"diode_direction": "ROW2COL",
"dip_switch": {
"pins": ["A9"]
},
"eeprom": {
"driver": "wear_leveling",
"wear_leveling": {
Expand Down
4 changes: 0 additions & 4 deletions keyboards/inland/v83p/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

#define ENCODER_DEFAULT_POS 0x3

/* DIP switch */
#define DIP_SWITCH_PINS \
{ C11 }

/* I2C Config for LED Driver */
#define SNLED27351_DRIVER_COUNT 2
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
Expand Down
3 changes: 3 additions & 0 deletions keyboards/inland/v83p/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
"cols": ["C1","C2","C3","A0","A1","A2","A3","A4","A5","A6","A7","C4","C5","B0","B1","B2"],
"rows": ["B15", "C6", "C7", "C8", "C9", "B14"]
},
"dip_switch": {
"pins": ["C11"]
},
"encoder": {
"rotary": [
{ "pin_a": "A8", "pin_b": "B13" }
Expand Down
5 changes: 0 additions & 5 deletions keyboards/jian/rev1/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,3 @@ along with this program. If not, see <http:https://www.gnu.org/licenses/>.
// iOS device need lessthan 100
#define USB_MAX_POWER_CONSUMPTION 100
#endif

#define DIP_SWITCH_MATRIX_GRID { \
{1, 0}, {2, 0}, {3, 0}, {3, 1}, {3, 2}, {3, 3}, \
{7, 3}, {7, 2}, {7, 1}, {7, 0}, {6, 0}, {5, 0} \
}
6 changes: 6 additions & 0 deletions keyboards/jian/rev1/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
"rows": ["D3", "D2", "E6", "B4"]
},
"diode_direction": "COL2ROW",
"dip_switch": {
"matrix_grid": [
[1, 0], [2, 0], [3, 0], [3, 1], [3, 2], [3, 3],
[7, 3], [7, 2], [7, 1], [7, 0], [6, 0], [5, 0]
]
},
"backlight": {
"pin": "B6",
"levels": 5
Expand Down
4 changes: 0 additions & 4 deletions keyboards/mechwild/bbs/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

#pragma once


/* allows the "key" button on the blackpill to toggle caps lock for user testing before soldering */
#define DIP_SWITCH_PINS { A0 }

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
Expand Down
3 changes: 3 additions & 0 deletions keyboards/mechwild/bbs/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"rows": ["B12", "B10", "B13", "B1", "B14"]
},
"diode_direction": "COL2ROW",
"dip_switch": {
"pins": ["A0"]
},
"indicators": {
"caps_lock": "C13",
"on_state": 0
Expand Down
3 changes: 0 additions & 3 deletions keyboards/mechwild/puckbuddy/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
/* Define custom font */
#define OLED_FONT_H "keyboards/mechwild/puckbuddy/glcdfont.c"

/* allows the "key" button on the blackpill to toggle caps lock for user testing before soldering */
#define DIP_SWITCH_PINS { A0 }

/* set the tapping term for glidepoint pad to register a tap click */
//#define CIRQUE_PINNACLE_TAPPING_TERM 0 // This is set to 0 to disable it

Expand Down
3 changes: 3 additions & 0 deletions keyboards/mechwild/puckbuddy/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"rows": ["B12", "B13", "B14", "B15"]
},
"diode_direction": "COL2ROW",
"dip_switch": {
"pins": ["A0"]
},
"encoder": {
"rotary": [
{"pin_a": "B1", "pin_b": "B0"},
Expand Down
3 changes: 0 additions & 3 deletions keyboards/mechwild/sugarglider/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
/* Define custom font */
#define OLED_FONT_H "keyboards/mechwild/sugarglider/glcdfont.c"

/* allows the "key" button on the blackpill to toggle caps lock for user testing before soldering */
#define DIP_SWITCH_PINS { A0 }

#define CIRQUE_PINNACLE_TAP_ENABLE
#define POINTING_DEVICE_GESTURES_SCROLL_ENABLE

Expand Down
3 changes: 3 additions & 0 deletions keyboards/mechwild/sugarglider/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
"build": {
"debounce_type": "sym_eager_pk"
},
"dip_switch": {
"pins": ["A0"]
},
"encoder": {
"rotary": [
{"pin_a": "B0", "pin_b": "A2", "resolution": 4},
Expand Down
3 changes: 3 additions & 0 deletions keyboards/miiiw/blackio83/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"cols": ["H0", "H1", "H2", "H3", "H4", "H5", "H6", "H7", "H8", "H9", "H10", "H11", "H12", "H13", "H14", "H15"],
"rows": ["A7", "A6", "A5", "A4", "A3", "A2"]
},
"dip_switch": {
"pins": ["B0", "B1", "B8", "B12"]
},
"processor": "STM32F072",
"rgb_matrix": {
"driver": "ws2812",
Expand Down
13 changes: 0 additions & 13 deletions keyboards/miiiw/blackio83/rev_0100/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,7 @@

#pragma once

/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
*/

/* Dip Switch */
#define POWER_SWITCH_PIN B0
#define DIP_SWITCH_PINS { B0, B1, B8, B12 }

/* 16 with dummy columns for shift registers */
#define SHR_SERIES_NUM 2
Expand Down
2 changes: 0 additions & 2 deletions keyboards/pearlboards/pandora/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ along with this program. If not, see <http:https://www.gnu.org/licenses/>.

#pragma once

#define DIP_SWITCH_PINS { B2, B5 }

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE

Expand Down
3 changes: 3 additions & 0 deletions keyboards/pearlboards/pandora/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"rows": ["B4", "D7", "D6", "B3", "B0"]
},
"diode_direction": "COL2ROW",
"dip_switch": {
"pins": ["B2", "B5"]
},
"encoder": {
"rotary": [
{"pin_a": "F6", "pin_b": "F5", "resolution": 1}
Expand Down
2 changes: 0 additions & 2 deletions keyboards/planck/rev6/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

#pragma once

#define DIP_SWITCH_PINS { B14, A15, A0, B9 }

#define MUSIC_MAP
#undef AUDIO_VOICES
#undef AUDIO_PIN
Expand Down
3 changes: 3 additions & 0 deletions keyboards/planck/rev6/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"rows": ["A10", "A9", "A8", "B15", "C13", "C14", "C15", "A2"]
},
"diode_direction": "COL2ROW",
"dip_switch": {
"pins": ["B14", "A15", "A0", "B9"]
},
"encoder": {
"rotary": [
{"pin_a": "B12", "pin_b": "B13"}
Expand Down
3 changes: 0 additions & 3 deletions keyboards/planck/rev6_drop/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@

#pragma once

#define DIP_SWITCH_PINS \
{ B14, A15, A0, B9 }

#define MUSIC_MAP
#undef AUDIO_VOICES
#undef AUDIO_PIN
Expand Down
3 changes: 3 additions & 0 deletions keyboards/planck/rev6_drop/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"rows": ["A10", "A9", "A8", "B15", "C13", "C14", "C15", "A2"]
},
"diode_direction": "COL2ROW",
"dip_switch": {
"pins": ["B14", "A15", "A0", "B9"]
},
"encoder": {
"rotary": [
{"pin_a": "B12", "pin_b": "B13"}
Expand Down
3 changes: 0 additions & 3 deletions keyboards/planck/rev7/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@

#pragma once

#define DIP_SWITCH_PINS \
{ B14, A15, A0, B9 }

#define MUSIC_MAP
#undef AUDIO_VOICES
#undef AUDIO_PIN
Expand Down
3 changes: 3 additions & 0 deletions keyboards/planck/rev7/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"rows": ["A10", "A9", "A8", "B15", "C13", "C14", "C15", "A2"]
},
"diode_direction": "COL2ROW",
"dip_switch": {
"pins": ["B14", "A15", "A0", "B9"]
},
"encoder": {
"rotary": [
{"pin_a": "B12", "pin_b": "B13"}
Expand Down
2 changes: 0 additions & 2 deletions keyboards/planck/thk/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ along with this program. If not, see <http:https://www.gnu.org/licenses/>.

#pragma once

#define DIP_SWITCH_PINS { D0, D1, D4, D6 }

// THK uses D5 for audio
#undef AUDIO_PIN
#define AUDIO_PIN D5
Expand Down
3 changes: 3 additions & 0 deletions keyboards/planck/thk/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"rows": ["A7", "A6", "A5", "A4"]
},
"diode_direction": "COL2ROW",
"dip_switch": {
"pins": ["D0", "D1", "D4", "D6"]
},
"encoder": {
"rotary": [
{"pin_a": "B4", "pin_b": "B3"},
Expand Down
2 changes: 0 additions & 2 deletions keyboards/preonic/rev3/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

#pragma once

#define DIP_SWITCH_PINS { B14, A15, A0, B9 }

#define MUSIC_MAP
#undef AUDIO_VOICES
#undef AUDIO_PIN
Expand Down
Loading

0 comments on commit a0a6820

Please sign in to comment.