Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Garbagetruck board definition and Vial keymap #13

Open
wants to merge 5 commits into
base: vial
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions keyboards/trashman/garbagetruck/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
Copyright 2021 Evan Sailer & epid

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

#pragma once
#include "config_common.h"

#define VENDOR_ID 0xFEAE
#define PRODUCT_ID 0x4754 // GT
#define DEVICE_VER 0x0001
#define MANUFACTURER trash man
#define PRODUCT Garbage Truck

#define MATRIX_ROWS 8
#define MATRIX_COLS 8
#define MATRIX_ROW_PINS { F0, F1, F4, F5, B7, D2, D3, B4 }
#define MATRIX_COL_PINS { B2, B3, D5, B5, B6, C6, F7, F6 }
#define DIODE_DIRECTION COL2ROW

#define ENCODERS_PAD_A { B0 }
#define ENCODERS_PAD_B { B1 }

#define DEBOUNCE 5
#define TAPPING_TERM 175
#define PERMISSIVE_HOLD

#define USB_MAX_POWER_CONSUMPTION 100
#define LOCKING_SUPPORT_ENABLE
#define LOCKING_RESYNC_ENABLE
54 changes: 54 additions & 0 deletions keyboards/trashman/garbagetruck/garbagetruck.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
Copyright 2021 Evan Sailer, epid, & QMK Firmware

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

#include "garbagetruck.h"

#define LED1 D7
#define LED2 D6
#define LED3 D4

void matrix_init_user(void) {
setPinOutput(LED1);
writePinLow(LED1);
setPinOutput(LED2);
writePinLow(LED2);
setPinOutput(LED3);
writePinLow(LED3);
}

layer_state_t layer_state_set_user(layer_state_t state) {
writePinLow(LED1);
writePinLow(LED2);
writePinLow(LED3);
switch (get_highest_layer(state)) {
case 1:
writePinHigh(LED1);
break;
case 2:
writePinHigh(LED2);
break;
case 3:
writePinHigh(LED3);
break;
}
return state;
}
42 changes: 42 additions & 0 deletions keyboards/trashman/garbagetruck/garbagetruck.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
Copyright 2021 Evan Sailer, epid, & QMK Firmware

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

#pragma once
#include "quantum.h"

#define XXX KC_NO

#define LAYOUT_625(\
K00, K01, K02, K03, K04, K05, K06, K07, K47, K46, K45, K44, K43, K42, K41, K40, \
K10, K11, K12, K13, K14, K15, K16, K17, K57, K56, K55, K54, K53, K52, K51, K50, \
K20, K21, K22, K23, K24, K25, K26, K27, K67, K66, K65, K64, K63, K62, K61, K60, \
K30, K31, K32, K35, K76, K75, K74, K73, K72, K71, K70 \
) {\
{ K00, K01, K02, K03, K04, K05, K06, K07 }, \
{ K10, K11, K12, K13, K14, K15, K16, K17 }, \
{ K20, K21, K22, K23, K24, K25, K26, K27 }, \
{ K30, K31, K32, XXX, XXX, K35, XXX, XXX }, \
{ K40, K41, K42, K43, K44, K45, K46, K47 }, \
{ K50, K51, K52, K53, K54, K55, K56, K57 }, \
{ K60, K61, K62, K63, K64, K65, K66, K67 }, \
{ K70, K71, K72, K73, K74, K75, K76, XXX } \
}
12 changes: 12 additions & 0 deletions keyboards/trashman/garbagetruck/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"keyboard_name": "Garbage Truck",
"url": "https://trashman.wiki/keyboards/garbage-truck",
"maintainer": "qmk",
"width": 18,
"height": 4.5,
"layouts": {
"LAYOUT": {
"layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Del", "x":11, "y":0}, {"label":"Back", "x":12, "y":0}, {"label":"7", "x":15, "y":0}, {"label":"8", "x":16, "y":0}, {"label":"9", "x":17, "y":0}, {"label":"Mute", "x":13.5, "y":0.25}, {"label":"Esc", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K", "x":8.25, "y":1}, {"label":"L", "x":9.25, "y":1}, {"label":";", "x":10.25, "y":1}, {"label":"Enter", "x":11.25, "y":1, "w":1.75}, {"label":"4", "x":15, "y":1}, {"label":"5", "x":16, "y":1}, {"label":"6", "x":17, "y":1}, {"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<", "x":8.75, "y":2}, {"label":">", "x":9.75, "y":2}, {"label":"?", "x":10.75, "y":2}, {"label":"Shift", "x":11.75, "y":2, "w":1.25}, {"label":"1", "x":15, "y":2}, {"label":"2", "x":16, "y":2}, {"label":"3", "x":17, "y":2}, {"label":"Up", "x":13.5, "y":2.5}, {"label":"Ctrl", "x":0, "y":3, "w":1.25}, {"label":"Gui", "x":1.25, "y":3, "w":1.25}, {"label":"Alt", "x":2.5, "y":3, "w":1.25}, {"x":3.75, "y":3, "w":6.25}, {"label":"Alt", "x":10, "y":3}, {"label":"Ctl", "x":11, "y":3}, {"label":"0", "x":16, "y":3}, {"label":".", "x":17, "y":3}, {"label":"Left", "x":12.5, "y":3.5}, {"label":"Down", "x":13.5, "y":3.5}, {"label":"Right", "x":14.5, "y":3.5}]
}
}
}
61 changes: 61 additions & 0 deletions keyboards/trashman/garbagetruck/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
Copyright 2021 Evan Sailer, epid, & QMK Firmware

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_625(
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSPC, KC_DEL , KC_7 , KC_8 , KC_9 ,
KC_ESC , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_MUTE, KC_4 , KC_5 , KC_6 ,
KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_1 , KC_2 , KC_3 ,
KC_LCTL, KC_LGUI, KC_LALT, LT(1, KC_SPC), MO(2) , MO(3) , KC_LEFT, KC_DOWN, KC_RGHT, KC_0 , KC_DOT
),
[1] = LAYOUT_625(
_______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT , _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[2] = LAYOUT_625(
RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[3] = LAYOUT_625(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};

bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
}
return true;
}
9 changes: 9 additions & 0 deletions keyboards/trashman/garbagetruck/keymaps/vial/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#define VIAL_KEYBOARD_UID {0xB3, 0xF4, 0xA0, 0x11, 0x04, 0xB2, 0xAA, 0x5E}

#define VIAL_UNLOCK_COMBO_ROWS { 0, 1 }
#define VIAL_UNLOCK_COMBO_COLS { 0, 1 }

#define DYNAMIC_KEYMAP_LAYER_COUNT 4
#define LAYER_STATE_8BIT
// #define VIAL_COMBO_ENTRIES 8
// #define VIAL_TAP_DANCE_ENTRIES 8
50 changes: 50 additions & 0 deletions keyboards/trashman/garbagetruck/keymaps/vial/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
Copyright 2021 Evan Sailer, epid, & QMK Firmware

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_625(
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSPC, KC_DEL , KC_7 , KC_8 , KC_9 ,
KC_ESC , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_MUTE, KC_4 , KC_5 , KC_6 ,
KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_1 , KC_2 , KC_3 ,
KC_LCTL, KC_LGUI, KC_LALT, LT(1, KC_SPC), MO(2) , MO(3) , KC_LEFT, KC_DOWN, KC_RGHT, KC_0 , KC_DOT
),
[1] = LAYOUT_625(
_______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT , _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[2] = LAYOUT_625(
RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[3] = LAYOUT_625(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};
6 changes: 6 additions & 0 deletions keyboards/trashman/garbagetruck/keymaps/vial/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
VIA_ENABLE = yes
VIAL_ENABLE = yes
LTO_ENABLE = yes

VIAL_ENCODERS_ENABLE = yes
VIAL_INSECURE = yes
32 changes: 32 additions & 0 deletions keyboards/trashman/garbagetruck/keymaps/vial/vial.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "Garbage Truck",
"vendorId": "0xFEAE",
"productId": "0x4754",
"lighting": "none",
"matrix": {
"rows": 8,
"cols": 8
},
"layouts": {
"labels": [
[
"Bottom Row",
"6.25u",
"7u Symmetric",
"7u Offset"
]
],
"keymap": [
["0,0","0,1","0,2","0,3","0,4","0,5","0,6","0,7","4,7","4,6","4,5","4,4","4,3",{"x":2},"4,2","4,1","4,0"],
[{"y":-0.75,"x":13.5},"5,3"],
[{"y":-0.25,"w":1.25},"1,0","1,1","1,2","1,3","1,4","1,5","1,6","1,7","5,7","5,6","5,5",{"w":1.75},"5,4",{"x":2},"5,2","5,1","5,0"],
[{"y":-0.75,"x":13},"0,0\n\n\n\n\n\n\n\n\ne","0,1\n\n\n\n\n\n\n\n\ne"],
[{"y":-0.25,"w":1.75},"2,0","2,1","2,2","2,3","2,4","2,5","2,6","2,7","6,7","6,6","6,5",{"w":1.25},"6,4",{"x":2},"6,2","6,1","6,0"],
[{"y":-0.5,"x":13.5},"6,3"],
[{"y":-0.5,"w":1.25},"3,0",{"w":1.25},"3,1",{"w":1.25},"3,2\n\n\n0,0",{"w":6.25},"3,5\n\n\n0,0","7,6\n\n\n0,0","7,5\n\n\n0,0",{"x":4},"7,1","7,0"],
[{"y":-0.5,"x":12.5},"7,4","7,3","7,2"],
[{"y":-0.25,"x":2.5,"w":7},"3,5\n\n\n0,1",{"w":1.25},"7,6\n\n\n0,1",{"w":1.25},"7,5\n\n\n0,1"],
[{"x":2.5,"w":1.25},"3,2\n\n\n0,2",{"w":7},"3,5\n\n\n0,2",{"w":1.25},"7,5\n\n\n0,2"]
]
}
}
Loading