diff options
| author | yiancar <yiangosyiangou@cytanet.com.cy> | 2020-08-25 04:37:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-24 20:37:01 -0700 |
| commit | 5460489b5177245371d23b84b94673951866d003 (patch) | |
| tree | de427ab289da564e53fd03870eb5a4bae71741ab | |
| parent | ecb212106950d4ffc5dca64fc06f031b6b12fcc1 (diff) | |
| download | qmk_firmware-5460489b5177245371d23b84b94673951866d003.tar.gz qmk_firmware-5460489b5177245371d23b84b94673951866d003.zip | |
[Keyboard] Barleycorn (#10118)
* Initial commit
* Barleycorn rename
* Update readme.md
* PR checklist fixes
* Update info.json
* Update keyboards/barleycorn/rules.mk
* Update keyboards/barleycorn/config.h
* Update keyboards/barleycorn/rules.mk
* Update keyboards/barleycorn/config.h
* Update keyboards/barleycorn/info.json
* Update keyboards/barleycorn/info.json
* Update keyboards/barleycorn/readme.md
* Update keyboards/barleycorn/rules.mk
* Update keyboards/barleycorn/rules.mk
* PR review
* Update keyboards/barleycorn/readme.md
* Update keyboards/barleycorn/rules.mk
* Update keyboards/barleycorn/keymaps/default/readme.md
* Update keyboards/barleycorn/keymaps/iso/readme.md
* Update keyboards/barleycorn/rules.mk
* Update keyboards/barleycorn/readme.md
* Update keyboards/barleycorn/rules.mk
* Update keyboards/barleycorn/matrix.c
* Update keyboards/barleycorn/barleycorn.c
* added ansi/iso keymaps!
* Update keyboards/barleycorn/info.json
| -rw-r--r-- | keyboards/barleycorn/barleycorn.c | 37 | ||||
| -rw-r--r-- | keyboards/barleycorn/barleycorn.h | 63 | ||||
| -rw-r--r-- | keyboards/barleycorn/config.h | 103 | ||||
| -rw-r--r-- | keyboards/barleycorn/info.json | 283 | ||||
| -rw-r--r-- | keyboards/barleycorn/keymaps/default/keymap.c | 34 | ||||
| -rw-r--r-- | keyboards/barleycorn/keymaps/default/readme.md | 11 | ||||
| -rw-r--r-- | keyboards/barleycorn/keymaps/iso/keymap.c | 35 | ||||
| -rw-r--r-- | keyboards/barleycorn/keymaps/iso/readme.md | 11 | ||||
| -rw-r--r-- | keyboards/barleycorn/keymaps/via/keymap.c | 48 | ||||
| -rw-r--r-- | keyboards/barleycorn/keymaps/via/readme.md | 3 | ||||
| -rw-r--r-- | keyboards/barleycorn/keymaps/via/rules.mk | 3 | ||||
| -rw-r--r-- | keyboards/barleycorn/matrix.c | 138 | ||||
| -rw-r--r-- | keyboards/barleycorn/readme.md | 23 | ||||
| -rw-r--r-- | keyboards/barleycorn/rules.mk | 27 |
14 files changed, 819 insertions, 0 deletions
diff --git a/keyboards/barleycorn/barleycorn.c b/keyboards/barleycorn/barleycorn.c new file mode 100644 index 000000000..4d555de19 --- /dev/null +++ b/keyboards/barleycorn/barleycorn.c | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | /* Copyright 2020 Yiancar | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include "barleycorn.h" | ||
| 17 | |||
| 18 | void keyboard_pre_init_kb(void) { | ||
| 19 | // Set our LED pins as output | ||
| 20 | setPinOutput(B5); | ||
| 21 | setPinOutput(C0); | ||
| 22 | keyboard_pre_init_user(); | ||
| 23 | } | ||
| 24 | |||
| 25 | bool led_update_kb(led_t led_state) { | ||
| 26 | bool res = led_update_user(led_state); | ||
| 27 | if(res) { | ||
| 28 | // writePin sets the pin high for 1 and low for 0. | ||
| 29 | // In this example the pins are inverted, setting | ||
| 30 | // it low/0 turns it on, and high/1 turns the LED off. | ||
| 31 | // This behavior depends on whether the LED is between the pin | ||
| 32 | // and VCC or the pin and GND. | ||
| 33 | writePin(B5, led_state.caps_lock); | ||
| 34 | writePin(C0, led_state.num_lock); | ||
| 35 | } | ||
| 36 | return res; | ||
| 37 | } | ||
diff --git a/keyboards/barleycorn/barleycorn.h b/keyboards/barleycorn/barleycorn.h new file mode 100644 index 000000000..0b266feae --- /dev/null +++ b/keyboards/barleycorn/barleycorn.h | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | /* Copyright 2020 Yiancar | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | #define XXX KC_NO | ||
| 20 | |||
| 21 | #include "quantum.h" | ||
| 22 | |||
| 23 | #define LAYOUT_all( \ | ||
| 24 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, K0E, K0F, K0G, K0H, \ | ||
| 25 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, K1F, K1G, K1H, \ | ||
| 26 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, K2F, K2G, K2H, \ | ||
| 27 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, \ | ||
| 28 | K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H \ | ||
| 29 | ) { \ | ||
| 30 | { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H }, \ | ||
| 31 | { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H }, \ | ||
| 32 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H }, \ | ||
| 33 | { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H }, \ | ||
| 34 | { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H } \ | ||
| 35 | } | ||
| 36 | |||
| 37 | #define LAYOUT_ansi( \ | ||
| 38 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, K0E, K0F, K0G, K0H, \ | ||
| 39 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, K1F, K1G, K1H, \ | ||
| 40 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, K2F, K2G, K2H, \ | ||
| 41 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, \ | ||
| 42 | K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H \ | ||
| 43 | ) { \ | ||
| 44 | { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H }, \ | ||
| 45 | { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H }, \ | ||
| 46 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H }, \ | ||
| 47 | { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H }, \ | ||
| 48 | { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H } \ | ||
| 49 | } | ||
| 50 | |||
| 51 | #define LAYOUT_iso( \ | ||
| 52 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, K0E, K0F, K0G, K0H, \ | ||
| 53 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, K1G, K1H, \ | ||
| 54 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, \ | ||
| 55 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, \ | ||
| 56 | K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H \ | ||
| 57 | ) { \ | ||
| 58 | { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H }, \ | ||
| 59 | { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H }, \ | ||
| 60 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H }, \ | ||
| 61 | { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H }, \ | ||
| 62 | { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H } \ | ||
| 63 | } | ||
diff --git a/keyboards/barleycorn/config.h b/keyboards/barleycorn/config.h new file mode 100644 index 000000000..77714a87f --- /dev/null +++ b/keyboards/barleycorn/config.h | |||
| @@ -0,0 +1,103 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2020 Yiancar | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #pragma once | ||
| 19 | |||
| 20 | #include "config_common.h" | ||
| 21 | |||
| 22 | #define VENDOR_ID 0x8968 | ||
| 23 | #define PRODUCT_ID 0x4749 | ||
| 24 | #define DEVICE_VER 0x0001 | ||
| 25 | #define MANUFACTURER Yiancar-Designs | ||
| 26 | #define PRODUCT Barleycorn | ||
| 27 | |||
| 28 | /* key matrix size */ | ||
| 29 | #define MATRIX_ROWS 5 | ||
| 30 | #define MATRIX_COLS 18 | ||
| 31 | |||
| 32 | /* | ||
| 33 | * Keyboard Matrix Assignments | ||
| 34 | * | ||
| 35 | * Change this to how you wired your keyboard | ||
| 36 | * COLS: AVR pins used for columns, left to right | ||
| 37 | * ROWS: AVR pins used for rows, top to bottom | ||
| 38 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
| 39 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
| 40 | * | ||
| 41 | */ | ||
| 42 | |||
| 43 | /* A Custom matrix.c is used to poll the port expander C6 shows that the pins are hardwired there */ | ||
| 44 | #define MATRIX_ROW_PINS { B4, B3, B2, B1, C1 } | ||
| 45 | #define MATRIX_COL_PINS { B0, D7, D6, D4, D1, D0, C3, C2, D5, D5, D5, D5, D5, D5, D5, D5, D5, D5 } | ||
| 46 | #define UNUSED_PINS | ||
| 47 | #define PORT_EXPANDER_ADDRESS 0x20 | ||
| 48 | |||
| 49 | /* COL2ROW, ROW2COL*/ | ||
| 50 | #define DIODE_DIRECTION COL2ROW | ||
| 51 | |||
| 52 | #define USB_MAX_POWER_CONSUMPTION 100 | ||
| 53 | |||
| 54 | |||
| 55 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 56 | #define LOCKING_SUPPORT_ENABLE | ||
| 57 | /* Locking resynchronize hack */ | ||
| 58 | #define LOCKING_RESYNC_ENABLE | ||
| 59 | |||
| 60 | /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | ||
| 61 | * This is userful for the Windows task manager shortcut (ctrl+shift+esc). | ||
| 62 | */ | ||
| 63 | // #define GRAVE_ESC_CTRL_OVERRIDE | ||
| 64 | |||
| 65 | /* | ||
| 66 | * Force NKRO | ||
| 67 | * | ||
| 68 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 69 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 70 | * makefile for this to work.) | ||
| 71 | * | ||
| 72 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 73 | * until the next keyboard reset. | ||
| 74 | * | ||
| 75 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 76 | * fully operational during normal computer usage. | ||
| 77 | * | ||
| 78 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 79 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 80 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 81 | * power-up. | ||
| 82 | * | ||
| 83 | */ | ||
| 84 | //#define FORCE_NKRO | ||
| 85 | |||
| 86 | |||
| 87 | /* | ||
| 88 | * Feature disable options | ||
| 89 | * These options are also useful to firmware size reduction. | ||
| 90 | */ | ||
| 91 | |||
| 92 | /* disable debug print */ | ||
| 93 | //#define NO_DEBUG | ||
| 94 | |||
| 95 | /* disable print */ | ||
| 96 | //#define NO_PRINT | ||
| 97 | |||
| 98 | /* disable action features */ | ||
| 99 | //#define NO_ACTION_LAYER | ||
| 100 | //#define NO_ACTION_TAPPING | ||
| 101 | //#define NO_ACTION_ONESHOT | ||
| 102 | //#define NO_ACTION_MACRO | ||
| 103 | //#define NO_ACTION_FUNCTION | ||
diff --git a/keyboards/barleycorn/info.json b/keyboards/barleycorn/info.json new file mode 100644 index 000000000..4334f383f --- /dev/null +++ b/keyboards/barleycorn/info.json | |||
| @@ -0,0 +1,283 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "Barleycorn", | ||
| 3 | "maintainer": "Yiancar", | ||
| 4 | "width": 19.5, | ||
| 5 | "height": 5, | ||
| 6 | "layouts": { | ||
| 7 | "LAYOUT_all": { | ||
| 8 | "layout": [ | ||
| 9 | {"label":"0,0", "x":0, "y":0}, | ||
| 10 | {"label":"0,1", "x":1, "y":0}, | ||
| 11 | {"label":"0,2", "x":2, "y":0}, | ||
| 12 | {"label":"0,3", "x":3, "y":0}, | ||
| 13 | {"label":"0,4", "x":4, "y":0}, | ||
| 14 | {"label":"0,5", "x":5, "y":0}, | ||
| 15 | {"label":"0,6", "x":6, "y":0}, | ||
| 16 | {"label":"0,7", "x":7, "y":0}, | ||
| 17 | {"label":"0,8", "x":8, "y":0}, | ||
| 18 | {"label":"0,9", "x":9, "y":0}, | ||
| 19 | {"label":"0,10", "x":10, "y":0}, | ||
| 20 | {"label":"0,11", "x":11, "y":0}, | ||
| 21 | {"label":"0,12", "x":12, "y":0}, | ||
| 22 | {"label":"0,13", "x":13, "y":0}, | ||
| 23 | {"label":"1,13", "x":14, "y":0}, | ||
| 24 | {"label":"0,14", "x":15.5, "y":0}, | ||
| 25 | {"label":"0,15", "x":16.5, "y":0}, | ||
| 26 | {"label":"0,16", "x":17.5, "y":0}, | ||
| 27 | {"label":"0,17", "x":18.5, "y":0}, | ||
| 28 | |||
| 29 | {"label":"1,0", "x":0, "y":1, "w":1.5}, | ||
| 30 | {"label":"1,1", "x":1.5, "y":1}, | ||
| 31 | {"label":"1,2", "x":2.5, "y":1}, | ||
| 32 | {"label":"1,3", "x":3.5, "y":1}, | ||
| 33 | {"label":"1,4", "x":4.5, "y":1}, | ||
| 34 | {"label":"1,5", "x":5.5, "y":1}, | ||
| 35 | {"label":"1,6", "x":6.5, "y":1}, | ||
| 36 | {"label":"1,7", "x":7.5, "y":1}, | ||
| 37 | {"label":"1,8", "x":8.5, "y":1}, | ||
| 38 | {"label":"1,9", "x":9.5, "y":1}, | ||
| 39 | {"label":"1,10", "x":10.5, "y":1}, | ||
| 40 | {"label":"1,11", "x":11.5, "y":1}, | ||
| 41 | {"label":"1,12", "x":12.5, "y":1}, | ||
| 42 | {"label":"2,12", "x":13.5, "y":1, "w":1.5}, | ||
| 43 | {"label":"1,14", "x":15.5, "y":1}, | ||
| 44 | {"label":"1,15", "x":16.5, "y":1}, | ||
| 45 | {"label":"1,16", "x":17.5, "y":1}, | ||
| 46 | {"label":"1,17", "x":18.5, "y":1}, | ||
| 47 | |||
| 48 | {"label":"2,0", "x":0, "y":2, "w":1.75}, | ||
| 49 | {"label":"2,1", "x":1.75, "y":2}, | ||
| 50 | {"label":"2,2", "x":2.75, "y":2}, | ||
| 51 | {"label":"2,3", "x":3.75, "y":2}, | ||
| 52 | {"label":"2,4", "x":4.75, "y":2}, | ||
| 53 | {"label":"2,5", "x":5.75, "y":2}, | ||
| 54 | {"label":"2,6", "x":6.75, "y":2}, | ||
| 55 | {"label":"2,7", "x":7.75, "y":2}, | ||
| 56 | {"label":"2,8", "x":8.75, "y":2}, | ||
| 57 | {"label":"2,9", "x":9.75, "y":2}, | ||
| 58 | {"label":"2,10", "x":10.75, "y":2}, | ||
| 59 | {"label":"2,11", "x":11.75, "y":2}, | ||
| 60 | {"label":"2,13", "x":12.75, "y":2, "w":2.25}, | ||
| 61 | {"label":"2,14", "x":15.5, "y":2}, | ||
| 62 | {"label":"2,15", "x":16.5, "y":2}, | ||
| 63 | {"label":"2,16", "x":17.5, "y":2}, | ||
| 64 | {"label":"2,17", "x":18.5, "y":2}, | ||
| 65 | |||
| 66 | {"label":"3,0", "x":0, "y":3, "w":1.25}, | ||
| 67 | {"label":"3,1", "x":1.25, "y":3}, | ||
| 68 | {"label":"3,2", "x":2.25, "y":3}, | ||
| 69 | {"label":"3,3", "x":3.25, "y":3}, | ||
| 70 | {"label":"3,4", "x":4.25, "y":3}, | ||
| 71 | {"label":"3,5", "x":5.25, "y":3}, | ||
| 72 | {"label":"3,6", "x":6.25, "y":3}, | ||
| 73 | {"label":"3,7", "x":7.25, "y":3}, | ||
| 74 | {"label":"3,8", "x":8.25, "y":3}, | ||
| 75 | {"label":"3,9", "x":9.25, "y":3}, | ||
| 76 | {"label":"3,10", "x":10.25, "y":3}, | ||
| 77 | {"label":"3,11", "x":11.25, "y":3}, | ||
| 78 | {"label":"3,12", "x":12.25, "y":3, "w":1.75}, | ||
| 79 | {"label":"3,13", "x":14.25, "y":3.25}, | ||
| 80 | {"label":"3,14", "x":15.5, "y":3}, | ||
| 81 | {"label":"3,15", "x":16.5, "y":3}, | ||
| 82 | {"label":"3,16", "x":17.5, "y":3}, | ||
| 83 | {"label":"3,17", "x":18.5, "y":3}, | ||
| 84 | |||
| 85 | {"label":"4,0", "x":0, "y":4, "w":1.25}, | ||
| 86 | {"label":"4,1", "x":1.25, "y":4, "w":1.25}, | ||
| 87 | {"label":"4,2", "x":2.5, "y":4, "w":1.25}, | ||
| 88 | {"label":"4,6", "x":3.75, "y":4, "w":6.25}, | ||
| 89 | {"label":"4,10", "x":10, "y":4, "w":1.5}, | ||
| 90 | {"label":"4,11", "x":11.5, "y":4, "w":1.5}, | ||
| 91 | {"label":"4,12", "x":13.25, "y":4.25}, | ||
| 92 | {"label":"4,13", "x":14.25, "y":4.25}, | ||
| 93 | {"label":"4,14", "x":15.25, "y":4.25}, | ||
| 94 | {"label":"4,15", "x":16.5, "y":4}, | ||
| 95 | {"label":"4,16", "x":17.5, "y":4}, | ||
| 96 | {"label":"4,17", "x":18.5, "y":4} | ||
| 97 | ] | ||
| 98 | }, | ||
| 99 | "LAYOUT_ansi": { | ||
| 100 | "layout": [ | ||
| 101 | {"label":"0,0", "x":0, "y":0}, | ||
| 102 | {"label":"0,1", "x":1, "y":0}, | ||
| 103 | {"label":"0,2", "x":2, "y":0}, | ||
| 104 | {"label":"0,3", "x":3, "y":0}, | ||
| 105 | {"label":"0,4", "x":4, "y":0}, | ||
| 106 | {"label":"0,5", "x":5, "y":0}, | ||
| 107 | {"label":"0,6", "x":6, "y":0}, | ||
| 108 | {"label":"0,7", "x":7, "y":0}, | ||
| 109 | {"label":"0,8", "x":8, "y":0}, | ||
| 110 | {"label":"0,9", "x":9, "y":0}, | ||
| 111 | {"label":"0,10", "x":10, "y":0}, | ||
| 112 | {"label":"0,11", "x":11, "y":0}, | ||
| 113 | {"label":"0,12", "x":12, "y":0}, | ||
| 114 | {"label":"0,13", "x":13, "y":0}, | ||
| 115 | {"label":"1,13", "x":14, "y":0}, | ||
| 116 | {"label":"0,14", "x":15.5, "y":0}, | ||
| 117 | {"label":"0,15", "x":16.5, "y":0}, | ||
| 118 | {"label":"0,16", "x":17.5, "y":0}, | ||
| 119 | {"label":"0,17", "x":18.5, "y":0}, | ||
| 120 | |||
| 121 | {"label":"1,0", "x":0, "y":1, "w":1.5}, | ||
| 122 | {"label":"1,1", "x":1.5, "y":1}, | ||
| 123 | {"label":"1,2", "x":2.5, "y":1}, | ||
| 124 | {"label":"1,3", "x":3.5, "y":1}, | ||
| 125 | {"label":"1,4", "x":4.5, "y":1}, | ||
| 126 | {"label":"1,5", "x":5.5, "y":1}, | ||
| 127 | {"label":"1,6", "x":6.5, "y":1}, | ||
| 128 | {"label":"1,7", "x":7.5, "y":1}, | ||
| 129 | {"label":"1,8", "x":8.5, "y":1}, | ||
| 130 | {"label":"1,9", "x":9.5, "y":1}, | ||
| 131 | {"label":"1,10", "x":10.5, "y":1}, | ||
| 132 | {"label":"1,11", "x":11.5, "y":1}, | ||
| 133 | {"label":"1,12", "x":12.5, "y":1}, | ||
| 134 | {"label":"2,12", "x":13.5, "y":1, "w":1.5}, | ||
| 135 | {"label":"1,14", "x":15.5, "y":1}, | ||
| 136 | {"label":"1,15", "x":16.5, "y":1}, | ||
| 137 | {"label":"1,16", "x":17.5, "y":1}, | ||
| 138 | {"label":"1,17", "x":18.5, "y":1}, | ||
| 139 | |||
| 140 | {"label":"2,0", "x":0, "y":2, "w":1.75}, | ||
| 141 | {"label":"2,1", "x":1.75, "y":2}, | ||
| 142 | {"label":"2,2", "x":2.75, "y":2}, | ||
| 143 | {"label":"2,3", "x":3.75, "y":2}, | ||
| 144 | {"label":"2,4", "x":4.75, "y":2}, | ||
| 145 | {"label":"2,5", "x":5.75, "y":2}, | ||
| 146 | {"label":"2,6", "x":6.75, "y":2}, | ||
| 147 | {"label":"2,7", "x":7.75, "y":2}, | ||
| 148 | {"label":"2,8", "x":8.75, "y":2}, | ||
| 149 | {"label":"2,9", "x":9.75, "y":2}, | ||
| 150 | {"label":"2,10", "x":10.75, "y":2}, | ||
| 151 | {"label":"2,11", "x":11.75, "y":2}, | ||
| 152 | {"label":"2,13", "x":12.75, "y":2, "w":2.25}, | ||
| 153 | {"label":"2,14", "x":15.5, "y":2}, | ||
| 154 | {"label":"2,15", "x":16.5, "y":2}, | ||
| 155 | {"label":"2,16", "x":17.5, "y":2}, | ||
| 156 | {"label":"2,17", "x":18.5, "y":2}, | ||
| 157 | |||
| 158 | {"label":"3,0", "x":0, "y":3, "w":2.25}, | ||
| 159 | {"label":"3,2", "x":2.25, "y":3}, | ||
| 160 | {"label":"3,3", "x":3.25, "y":3}, | ||
| 161 | {"label":"3,4", "x":4.25, "y":3}, | ||
| 162 | {"label":"3,5", "x":5.25, "y":3}, | ||
| 163 | {"label":"3,6", "x":6.25, "y":3}, | ||
| 164 | {"label":"3,7", "x":7.25, "y":3}, | ||
| 165 | {"label":"3,8", "x":8.25, "y":3}, | ||
| 166 | {"label":"3,9", "x":9.25, "y":3}, | ||
| 167 | {"label":"3,10", "x":10.25, "y":3}, | ||
| 168 | {"label":"3,11", "x":11.25, "y":3}, | ||
| 169 | {"label":"3,12", "x":12.25, "y":3, "w":1.75}, | ||
| 170 | {"label":"3,13", "x":14.25, "y":3.25}, | ||
| 171 | {"label":"3,14", "x":15.5, "y":3}, | ||
| 172 | {"label":"3,15", "x":16.5, "y":3}, | ||
| 173 | {"label":"3,16", "x":17.5, "y":3}, | ||
| 174 | {"label":"3,17", "x":18.5, "y":3}, | ||
| 175 | |||
| 176 | {"label":"4,0", "x":0, "y":4, "w":1.25}, | ||
| 177 | {"label":"4,1", "x":1.25, "y":4, "w":1.25}, | ||
| 178 | {"label":"4,2", "x":2.5, "y":4, "w":1.25}, | ||
| 179 | {"label":"4,6", "x":3.75, "y":4, "w":6.25}, | ||
| 180 | {"label":"4,10", "x":10, "y":4, "w":1.5}, | ||
| 181 | {"label":"4,11", "x":11.5, "y":4, "w":1.5}, | ||
| 182 | {"label":"4,12", "x":13.25, "y":4.25}, | ||
| 183 | {"label":"4,13", "x":14.25, "y":4.25}, | ||
| 184 | {"label":"4,14", "x":15.25, "y":4.25}, | ||
| 185 | {"label":"4,15", "x":16.5, "y":4}, | ||
| 186 | {"label":"4,16", "x":17.5, "y":4}, | ||
| 187 | {"label":"4,17", "x":18.5, "y":4} | ||
| 188 | ] | ||
| 189 | }, | ||
| 190 | "LAYOUT_iso": { | ||
| 191 | "layout": [ | ||
| 192 | {"label":"0,0", "x":0, "y":0}, | ||
| 193 | {"label":"0,1", "x":1, "y":0}, | ||
| 194 | {"label":"0,2", "x":2, "y":0}, | ||
| 195 | {"label":"0,3", "x":3, "y":0}, | ||
| 196 | {"label":"0,4", "x":4, "y":0}, | ||
| 197 | {"label":"0,5", "x":5, "y":0}, | ||
| 198 | {"label":"0,6", "x":6, "y":0}, | ||
| 199 | {"label":"0,7", "x":7, "y":0}, | ||
| 200 | {"label":"0,8", "x":8, "y":0}, | ||
| 201 | {"label":"0,9", "x":9, "y":0}, | ||
| 202 | {"label":"0,10", "x":10, "y":0}, | ||
| 203 | {"label":"0,11", "x":11, "y":0}, | ||
| 204 | {"label":"0,12", "x":12, "y":0}, | ||
| 205 | {"label":"0,13", "x":13, "y":0}, | ||
| 206 | {"label":"1,13", "x":14, "y":0}, | ||
| 207 | {"label":"0,14", "x":15.5, "y":0}, | ||
| 208 | {"label":"0,15", "x":16.5, "y":0}, | ||
| 209 | {"label":"0,16", "x":17.5, "y":0}, | ||
| 210 | {"label":"0,17", "x":18.5, "y":0}, | ||
| 211 | |||
| 212 | {"label":"1,0", "x":0, "y":1, "w":1.5}, | ||
| 213 | {"label":"1,1", "x":1.5, "y":1}, | ||
| 214 | {"label":"1,2", "x":2.5, "y":1}, | ||
| 215 | {"label":"1,3", "x":3.5, "y":1}, | ||
| 216 | {"label":"1,4", "x":4.5, "y":1}, | ||
| 217 | {"label":"1,5", "x":5.5, "y":1}, | ||
| 218 | {"label":"1,6", "x":6.5, "y":1}, | ||
| 219 | {"label":"1,7", "x":7.5, "y":1}, | ||
| 220 | {"label":"1,8", "x":8.5, "y":1}, | ||
| 221 | {"label":"1,9", "x":9.5, "y":1}, | ||
| 222 | {"label":"1,10", "x":10.5, "y":1}, | ||
| 223 | {"label":"1,11", "x":11.5, "y":1}, | ||
| 224 | {"label":"1,12", "x":12.5, "y":1}, | ||
| 225 | {"label":"1,14", "x":15.5, "y":1}, | ||
| 226 | {"label":"1,15", "x":16.5, "y":1}, | ||
| 227 | {"label":"1,16", "x":17.5, "y":1}, | ||
| 228 | {"label":"1,17", "x":18.5, "y":1}, | ||
| 229 | |||
| 230 | {"label":"2,0", "x":0, "y":2, "w":1.75}, | ||
| 231 | {"label":"2,1", "x":1.75, "y":2}, | ||
| 232 | {"label":"2,2", "x":2.75, "y":2}, | ||
| 233 | {"label":"2,3", "x":3.75, "y":2}, | ||
| 234 | {"label":"2,4", "x":4.75, "y":2}, | ||
| 235 | {"label":"2,5", "x":5.75, "y":2}, | ||
| 236 | {"label":"2,6", "x":6.75, "y":2}, | ||
| 237 | {"label":"2,7", "x":7.75, "y":2}, | ||
| 238 | {"label":"2,8", "x":8.75, "y":2}, | ||
| 239 | {"label":"2,9", "x":9.75, "y":2}, | ||
| 240 | {"label":"2,10", "x":10.75, "y":2}, | ||
| 241 | {"label":"2,11", "x":11.75, "y":2}, | ||
| 242 | {"label":"2,12", "x":12.75, "y":2}, | ||
| 243 | {"label":"2,13", "x":13.75, "y":1, "w":1.25, "h":2}, | ||
| 244 | {"label":"2,14", "x":15.5, "y":2}, | ||
| 245 | {"label":"2,15", "x":16.5, "y":2}, | ||
| 246 | {"label":"2,16", "x":17.5, "y":2}, | ||
| 247 | {"label":"2,17", "x":18.5, "y":2}, | ||
| 248 | |||
| 249 | {"label":"3,0", "x":0, "y":3, "w":1.25}, | ||
| 250 | {"label":"3,1", "x":1.25, "y":3}, | ||
| 251 | {"label":"3,2", "x":2.25, "y":3}, | ||
| 252 | {"label":"3,3", "x":3.25, "y":3}, | ||
| 253 | {"label":"3,4", "x":4.25, "y":3}, | ||
| 254 | {"label":"3,5", "x":5.25, "y":3}, | ||
| 255 | {"label":"3,6", "x":6.25, "y":3}, | ||
| 256 | {"label":"3,7", "x":7.25, "y":3}, | ||
| 257 | {"label":"3,8", "x":8.25, "y":3}, | ||
| 258 | {"label":"3,9", "x":9.25, "y":3}, | ||
| 259 | {"label":"3,10", "x":10.25, "y":3}, | ||
| 260 | {"label":"3,11", "x":11.25, "y":3}, | ||
| 261 | {"label":"3,12", "x":12.25, "y":3, "w":1.75}, | ||
| 262 | {"label":"3,13", "x":14.25, "y":3.25}, | ||
| 263 | {"label":"3,14", "x":15.5, "y":3}, | ||
| 264 | {"label":"3,15", "x":16.5, "y":3}, | ||
| 265 | {"label":"3,16", "x":17.5, "y":3}, | ||
| 266 | {"label":"3,17", "x":18.5, "y":3}, | ||
| 267 | |||
| 268 | {"label":"4,0", "x":0, "y":4, "w":1.25}, | ||
| 269 | {"label":"4,1", "x":1.25, "y":4, "w":1.25}, | ||
| 270 | {"label":"4,2", "x":2.5, "y":4, "w":1.25}, | ||
| 271 | {"label":"4,6", "x":3.75, "y":4, "w":6.25}, | ||
| 272 | {"label":"4,10", "x":10, "y":4, "w":1.5}, | ||
| 273 | {"label":"4,11", "x":11.5, "y":4, "w":1.5}, | ||
| 274 | {"label":"4,12", "x":13.25, "y":4.25}, | ||
| 275 | {"label":"4,13", "x":14.25, "y":4.25}, | ||
| 276 | {"label":"4,14", "x":15.25, "y":4.25}, | ||
| 277 | {"label":"4,15", "x":16.5, "y":4}, | ||
| 278 | {"label":"4,16", "x":17.5, "y":4}, | ||
| 279 | {"label":"4,17", "x":18.5, "y":4} | ||
| 280 | ] | ||
| 281 | } | ||
| 282 | } | ||
| 283 | } | ||
diff --git a/keyboards/barleycorn/keymaps/default/keymap.c b/keyboards/barleycorn/keymaps/default/keymap.c new file mode 100644 index 000000000..230b78e99 --- /dev/null +++ b/keyboards/barleycorn/keymaps/default/keymap.c | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | /* Copyright 2020 Yiancar | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | //This is the ANSI version of the PCB | ||
| 19 | |||
| 20 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 21 | [0] = LAYOUT_ansi( /* Base */ | ||
| 22 | KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, | ||
| 23 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PEQL, | ||
| 24 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, | ||
| 25 | 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_P1, KC_P2, KC_P3, KC_BSPC, | ||
| 26 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), | ||
| 27 | |||
| 28 | [1] = LAYOUT_ansi( /* FN */ | ||
| 29 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 30 | KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 31 | KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 32 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 33 | KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
| 34 | }; | ||
diff --git a/keyboards/barleycorn/keymaps/default/readme.md b/keyboards/barleycorn/keymaps/default/readme.md new file mode 100644 index 000000000..04903f8cc --- /dev/null +++ b/keyboards/barleycorn/keymaps/default/readme.md | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | # The default keymap for Barleycorn | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 |  | ||
| 6 | |||
| 7 | Default layer is normal ANSI and Fn layer is used for Volume control and arrow cluster. | ||
| 8 | |||
| 9 | Alternative ANSI layouts: | ||
| 10 | |||
| 11 |  | ||
diff --git a/keyboards/barleycorn/keymaps/iso/keymap.c b/keyboards/barleycorn/keymaps/iso/keymap.c new file mode 100644 index 000000000..7fd4d0696 --- /dev/null +++ b/keyboards/barleycorn/keymaps/iso/keymap.c | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | /* Copyright 2020 Yiancar | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | //This is the ISO version of the PCB | ||
| 19 | |||
| 20 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 21 | [0] = LAYOUT_iso( /* Base */ | ||
| 22 | KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, | ||
| 23 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_P7, KC_P8, KC_P9, KC_PEQL, | ||
| 24 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, | ||
| 25 | KC_LSFT, KC_NUBS, 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_P1, KC_P2, KC_P3, KC_BSPC, | ||
| 26 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), | ||
| 27 | |||
| 28 | [1] = LAYOUT_iso( /* FN */ | ||
| 29 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 30 | KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 31 | KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 32 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 33 | KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
| 34 | }; | ||
| 35 | |||
diff --git a/keyboards/barleycorn/keymaps/iso/readme.md b/keyboards/barleycorn/keymaps/iso/readme.md new file mode 100644 index 000000000..492abfcec --- /dev/null +++ b/keyboards/barleycorn/keymaps/iso/readme.md | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | # The default keymap for ISO Barleycorn | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 |  | ||
| 6 | |||
| 7 | Default layer is normal ISO and Fn layer is used for Volume control and arrow cluster | ||
| 8 | |||
| 9 | Alternative ISO layouts: | ||
| 10 | |||
| 11 |  | ||
diff --git a/keyboards/barleycorn/keymaps/via/keymap.c b/keyboards/barleycorn/keymaps/via/keymap.c new file mode 100644 index 000000000..90ce60d1e --- /dev/null +++ b/keyboards/barleycorn/keymaps/via/keymap.c | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | /* Copyright 2020 Yiancar | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | // This keymaps is used for VIA, it reflects the default keymap. | ||
| 19 | |||
| 20 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 21 | [0] = LAYOUT_all( /* Base */ | ||
| 22 | KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, | ||
| 23 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PEQL, | ||
| 24 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, | ||
| 25 | KC_LSFT, KC_NUBS, 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_P1, KC_P2, KC_P3, KC_BSPC, | ||
| 26 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), | ||
| 27 | |||
| 28 | [1] = LAYOUT_all( /* FN */ | ||
| 29 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 30 | KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 31 | KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 32 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 33 | KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
| 34 | |||
| 35 | [2] = LAYOUT_all( /* Empty for dynamic keymaps */ | ||
| 36 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 37 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 38 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 39 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 40 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
| 41 | |||
| 42 | [3] = LAYOUT_all( /* Empty for dynamic keymaps */ | ||
| 43 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 44 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 45 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 46 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 47 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
| 48 | }; | ||
diff --git a/keyboards/barleycorn/keymaps/via/readme.md b/keyboards/barleycorn/keymaps/via/readme.md new file mode 100644 index 000000000..a49e2c056 --- /dev/null +++ b/keyboards/barleycorn/keymaps/via/readme.md | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | # Compile with this keymap to use VIA | ||
| 2 | |||
| 3 | Sadly right now when using VIA, extrakeys is disabled. This means volume control will not work. | ||
diff --git a/keyboards/barleycorn/keymaps/via/rules.mk b/keyboards/barleycorn/keymaps/via/rules.mk new file mode 100644 index 000000000..930e3552a --- /dev/null +++ b/keyboards/barleycorn/keymaps/via/rules.mk | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | VIA_ENABLE = yes | ||
| 2 | MOUSEKEY_ENABLE = no | ||
| 3 | EXTRAKEY_ENABLE = no | ||
diff --git a/keyboards/barleycorn/matrix.c b/keyboards/barleycorn/matrix.c new file mode 100644 index 000000000..99366d609 --- /dev/null +++ b/keyboards/barleycorn/matrix.c | |||
| @@ -0,0 +1,138 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2012-2020 Jun Wako, Jack Humbert, Yiancar | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #include <stdint.h> | ||
| 18 | #include <stdbool.h> | ||
| 19 | #include "wait.h" | ||
| 20 | #include "quantum.h" | ||
| 21 | #include "i2c_master.h" | ||
| 22 | |||
| 23 | static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; | ||
| 24 | static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; | ||
| 25 | |||
| 26 | static void unselect_rows(void) { | ||
| 27 | for(uint8_t x = 0; x < MATRIX_ROWS; x++) { | ||
| 28 | setPinInputHigh(row_pins[x]); | ||
| 29 | } | ||
| 30 | } | ||
| 31 | |||
| 32 | static void select_row(uint8_t row) { | ||
| 33 | setPinOutput(row_pins[row]); | ||
| 34 | writePinLow(row_pins[row]); | ||
| 35 | } | ||
| 36 | |||
| 37 | static void unselect_row(uint8_t row) { | ||
| 38 | setPinInputHigh(row_pins[row]); | ||
| 39 | } | ||
| 40 | |||
| 41 | static void init_pins(void) { | ||
| 42 | unselect_rows(); | ||
| 43 | // Set I/O | ||
| 44 | uint8_t send_data[2] = { 0xFF, 0x03}; | ||
| 45 | i2c_writeReg((PORT_EXPANDER_ADDRESS << 1), 0x00, &send_data[0], 2, 20); | ||
| 46 | // Set Pull-up | ||
| 47 | i2c_writeReg((PORT_EXPANDER_ADDRESS << 1), 0x0C, &send_data[0], 2, 20); | ||
| 48 | |||
| 49 | for (uint8_t x = 0; x < MATRIX_COLS; x++) { | ||
| 50 | if ( x < 8 ) { | ||
| 51 | setPinInputHigh(col_pins[x]); | ||
| 52 | } | ||
| 53 | } | ||
| 54 | } | ||
| 55 | |||
| 56 | void matrix_init_custom(void) { | ||
| 57 | // TODO: initialize hardware here | ||
| 58 | // Initialize I2C | ||
| 59 | i2c_init(); | ||
| 60 | |||
| 61 | // initialize key pins | ||
| 62 | init_pins(); | ||
| 63 | wait_ms(50); | ||
| 64 | } | ||
| 65 | |||
| 66 | static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { | ||
| 67 | // Store last value of row prior to reading | ||
| 68 | matrix_row_t last_row_value = current_matrix[current_row]; | ||
| 69 | |||
| 70 | // Clear data in matrix row | ||
| 71 | current_matrix[current_row] = 0; | ||
| 72 | |||
| 73 | // Select row and wait for row selecton to stabilize | ||
| 74 | select_row(current_row); | ||
| 75 | matrix_io_delay(); | ||
| 76 | |||
| 77 | uint8_t port_expander_col_buffer[2]; | ||
| 78 | i2c_readReg((PORT_EXPANDER_ADDRESS << 1), 0x12, &port_expander_col_buffer[0], 2, 20); | ||
| 79 | |||
| 80 | // For each col... | ||
| 81 | for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { | ||
| 82 | uint8_t pin_state; | ||
| 83 | // Select the col pin to read (active low) | ||
| 84 | switch (col_index) { | ||
| 85 | case 8 : | ||
| 86 | pin_state = port_expander_col_buffer[0] & (1 << 0); | ||
| 87 | break; | ||
| 88 | case 9 : | ||
| 89 | pin_state = port_expander_col_buffer[0] & (1 << 1); | ||
| 90 | break; | ||
| 91 | case 10 : | ||
| 92 | pin_state = port_expander_col_buffer[0] & (1 << 2); | ||
| 93 | break; | ||
| 94 | case 11 : | ||
| 95 | pin_state = port_expander_col_buffer[0] & (1 << 3); | ||
| 96 | break; | ||
| 97 | case 12 : | ||
| 98 | pin_state = port_expander_col_buffer[0] & (1 << 4); | ||
| 99 | break; | ||
| 100 | case 13 : | ||
| 101 | pin_state = port_expander_col_buffer[0] & (1 << 5); | ||
| 102 | break; | ||
| 103 | case 14 : | ||
| 104 | pin_state = port_expander_col_buffer[0] & (1 << 6); | ||
| 105 | break; | ||
| 106 | case 15 : | ||
| 107 | pin_state = port_expander_col_buffer[0] & (1 << 7); | ||
| 108 | break; | ||
| 109 | case 16 : | ||
| 110 | pin_state = port_expander_col_buffer[1] & (1 << 0); | ||
| 111 | break; | ||
| 112 | case 17 : | ||
| 113 | pin_state = port_expander_col_buffer[1] & (1 << 1); | ||
| 114 | break; | ||
| 115 | default : | ||
| 116 | pin_state = readPin(col_pins[col_index]); | ||
| 117 | } | ||
| 118 | |||
| 119 | // Populate the matrix row with the state of the col pin | ||
| 120 | current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); | ||
| 121 | } | ||
| 122 | |||
| 123 | // Unselect row | ||
| 124 | unselect_row(current_row); | ||
| 125 | |||
| 126 | return (last_row_value != current_matrix[current_row]); | ||
| 127 | } | ||
| 128 | |||
| 129 | bool matrix_scan_custom(matrix_row_t current_matrix[]) { | ||
| 130 | bool matrix_has_changed = false; | ||
| 131 | |||
| 132 | // Set row, read cols | ||
| 133 | for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { | ||
| 134 | matrix_has_changed |= read_cols_on_row(current_matrix, current_row); | ||
| 135 | } | ||
| 136 | |||
| 137 | return matrix_has_changed; | ||
| 138 | } | ||
diff --git a/keyboards/barleycorn/readme.md b/keyboards/barleycorn/readme.md new file mode 100644 index 000000000..775d25968 --- /dev/null +++ b/keyboards/barleycorn/readme.md | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | # Barleycorn | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | An f-row less compact 1800 kit with only through hole components. | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) | ||
| 8 | * Hardware Supported: ATMEGA328p with vusb [PCB](https://github.com/yiancar/gingham_pcb) | ||
| 9 | * Hardware Availability: https://mykeyboard.eu/, https://novelkeys.xyz | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make barleycorn:default | ||
| 14 | |||
| 15 | Flashing example for this keyboard: | ||
| 16 | |||
| 17 | make barleycorn:default:flash | ||
| 18 | |||
| 19 | Bootloader: | ||
| 20 | use usbasploader from HSGW's repository. | ||
| 21 | https://github.com/hsgw/USBaspLoader/tree/plaid | ||
| 22 | |||
| 23 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | ||
diff --git a/keyboards/barleycorn/rules.mk b/keyboards/barleycorn/rules.mk new file mode 100644 index 000000000..be005ab29 --- /dev/null +++ b/keyboards/barleycorn/rules.mk | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega328p | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = USBasp | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 22 | AUDIO_ENABLE = no # Audio output | ||
| 23 | |||
| 24 | CUSTOM_MATRIX = lite | ||
| 25 | |||
| 26 | SRC += matrix.c | ||
| 27 | QUANTUM_LIB_SRC += i2c_master.c | ||
