update about SPLIT_HAND_MATRIX_GRID and DIP_SWITCH_MATRIX_GRID

This commit is contained in:
keyaki-namiki 2020-07-09 16:02:18 +09:00
parent 5f166739b9
commit 4e8cb7c60a
4 changed files with 55 additions and 0 deletions

View File

@ -49,6 +49,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
/* Split hand configration */
#define SPLIT_HAND_MATRIX_GRID D7,B2
/* Dip switch on matrix grid */
#define DIP_SWITCH_MATRIX_GRID { {0,6}, {1,6}, {5,6}, {6,6} }
/*
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
*/

View File

@ -141,6 +141,30 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
}
void dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if(active) { // Left no.1
;
} else { }
break;
case 1:
if(active) { // Left no.2
;
} else { }
break;
case 2:
if(active) { // Right no.2
;
} else { }
break;
case 3:
if (active) { // Right no.1
;
} else { }
break;
}
}
layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);

View File

@ -131,6 +131,30 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
}
void dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if(active) { // Left no.1
;
} else { }
break;
case 1:
if(active) { // Left no.2
;
} else { }
break;
case 2:
if(active) { // Right no.2
;
} else { }
break;
case 3:
if (active) { // Right no.1
;
} else { }
break;
}
}
layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);

View File

@ -35,4 +35,5 @@ SPLIT_KEYBOARD = yes
#RGB_MATRIX_ENABLE = WS2812
OLED_DRIVER_ENABLE = yes
ENCODER_ENABLE = yes
DIP_SWITCH_ENABLE = yes
LINK_TIME_OPTIMIZATION_ENABLE = yes