diff options
| author | Zach White <skullydazed@gmail.com> | 2021-01-08 11:21:27 -0800 |
|---|---|---|
| committer | Zach White <skullydazed@gmail.com> | 2021-01-08 11:21:27 -0800 |
| commit | 667161620a2c96c8b286f40f557f5722c7f58f8a (patch) | |
| tree | 86321f4d9e4c028c5cddc6a37fc4deaa83ca4887 | |
| parent | e2c7f893470465f986bd6849c18606be0f2b7842 (diff) | |
| parent | 6d9b4c7b4f5de5631955e57b9706f90072971bcb (diff) | |
| download | qmk_firmware-667161620a2c96c8b286f40f557f5722c7f58f8a.tar.gz qmk_firmware-667161620a2c96c8b286f40f557f5722c7f58f8a.zip | |
Merge remote-tracking branch 'origin/master' into develop
24 files changed, 735 insertions, 285 deletions
diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md index 4609275d0..e03562f00 100644 --- a/docs/newbs_getting_started.md +++ b/docs/newbs_getting_started.md | |||
| @@ -41,6 +41,19 @@ We've tried to make QMK as easy to set up as possible. You only have to prepare | |||
| 41 | 41 | ||
| 42 | ### ** Windows ** | 42 | ### ** Windows ** |
| 43 | 43 | ||
| 44 | QMK maintains a Bundle of MSYS2, the CLI and all necessary dependencies. It also provides a handy `QMK MSYS` terminal shortcut to boot you directly into the correct environment. | ||
| 45 | |||
| 46 | #### Prerequisites | ||
| 47 | |||
| 48 | You will need to install `QMK MSYS`. The latest release is available at https://msys.qmk.fm/. | ||
| 49 | |||
| 50 | Alternatively, if you'd like to manually install msys2, the following section will walk you through the process. | ||
| 51 | |||
| 52 | <details> | ||
| 53 | <summary>Manual Install</summary> | ||
| 54 | |||
| 55 | ?> Ignore the following steps if you use `QMK MSYS`. | ||
| 56 | |||
| 44 | #### Prerequisites | 57 | #### Prerequisites |
| 45 | 58 | ||
| 46 | You will need to install MSYS2, Git and Python. Follow the installation instructions on https://www.msys2.org. | 59 | You will need to install MSYS2, Git and Python. Follow the installation instructions on https://www.msys2.org. |
| @@ -59,6 +72,8 @@ Install the QMK CLI by running: | |||
| 59 | 72 | ||
| 60 | python3 -m pip install qmk | 73 | python3 -m pip install qmk |
| 61 | 74 | ||
| 75 | </details> | ||
| 76 | |||
| 62 | ### ** macOS ** | 77 | ### ** macOS ** |
| 63 | 78 | ||
| 64 | QMK maintains a Homebrew tap and formula which will automatically install the CLI and all necessary dependencies. | 79 | QMK maintains a Homebrew tap and formula which will automatically install the CLI and all necessary dependencies. |
diff --git a/keyboards/jm60/config.h b/keyboards/jm60/config.h index f490037f6..2409142e0 100644 --- a/keyboards/jm60/config.h +++ b/keyboards/jm60/config.h | |||
| @@ -15,39 +15,105 @@ 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #ifndef CONFIG_H | 18 | #pragma once |
| 19 | #define CONFIG_H | ||
| 20 | 19 | ||
| 21 | /* USB Device descriptor parameter */ | 20 | /* USB Device descriptor parameter */ |
| 22 | #define VENDOR_ID 0xFEED | 21 | #define VENDOR_ID 0xFEED |
| 23 | #define PRODUCT_ID 0x6464 | 22 | #define PRODUCT_ID 0x6464 |
| 24 | #define DEVICE_VER 0x0001 | 23 | #define DEVICE_VER 0x0001 |
| 25 | #define MANUFACTURER JMWS | 24 | #define MANUFACTURER JMWS |
| 26 | #define PRODUCT JM60 RGB Keyboard(QMK) | 25 | #define PRODUCT JM60 |
| 27 | #define DESCRIPTION QMK keyboard firmware for JM60 RGB Keyboard | ||
| 28 | 26 | ||
| 29 | /* key matrix size */ | 27 | /* key matrix size */ |
| 30 | #define MATRIX_ROWS 5 | 28 | #define MATRIX_ROWS 5 |
| 31 | #define MATRIX_COLS 14 | 29 | #define MATRIX_COLS 14 |
| 32 | 30 | ||
| 33 | /* number of backlight levels */ | 31 | /* |
| 34 | //#define BACKLIGHT_LEVELS 1 | 32 | * Keyboard Matrix Assignments |
| 35 | 33 | * | |
| 36 | //#define LED_BRIGHTNESS_LO 100 | 34 | * Change this to how you wired your keyboard |
| 37 | //#define LED_BRIGHTNESS_HI 255 | 35 | * COLS: AVR pins used for columns, left to right |
| 38 | 36 | * ROWS: AVR pins used for rows, top to bottom | |
| 39 | /* define if matrix has ghost */ | 37 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) |
| 38 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
| 39 | * | ||
| 40 | */ | ||
| 41 | #define MATRIX_ROW_PINS { B11, B10, B2, B1, B0 } | ||
| 42 | #define MATRIX_COL_PINS { A15, C10, C11, C12, D2, B3, B4, B5, B6, B7, B8, B9, A2, A3 } | ||
| 43 | #define UNUSED_PINS | ||
| 44 | |||
| 45 | /* COL2ROW, ROW2COL */ | ||
| 46 | #define DIODE_DIRECTION ROW2COL | ||
| 47 | |||
| 48 | //#define BACKLIGHT_PIN B7 | ||
| 49 | //#define BACKLIGHT_LEVELS 3 | ||
| 50 | //#define BACKLIGHT_BREATHING | ||
| 51 | |||
| 52 | //#define RGB_DI_PIN E2 | ||
| 53 | //#ifdef RGB_DI_PIN | ||
| 54 | //# define RGBLED_NUM 16 | ||
| 55 | //# define RGBLIGHT_HUE_STEP 8 | ||
| 56 | //# define RGBLIGHT_SAT_STEP 8 | ||
| 57 | //# define RGBLIGHT_VAL_STEP 8 | ||
| 58 | //# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
| 59 | //# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
| 60 | /*== all animations enable ==*/ | ||
| 61 | //# define RGBLIGHT_ANIMATIONS | ||
| 62 | /*== or choose animations ==*/ | ||
| 63 | //# define RGBLIGHT_EFFECT_BREATHING | ||
| 64 | //# define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
| 65 | //# define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
| 66 | //# define RGBLIGHT_EFFECT_SNAKE | ||
| 67 | //# define RGBLIGHT_EFFECT_KNIGHT | ||
| 68 | //# define RGBLIGHT_EFFECT_CHRISTMAS | ||
| 69 | //# define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
| 70 | //# define RGBLIGHT_EFFECT_RGB_TEST | ||
| 71 | //# define RGBLIGHT_EFFECT_ALTERNATING | ||
| 72 | /*== customize breathing effect ==*/ | ||
| 73 | /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ | ||
| 74 | //# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 | ||
| 75 | /*==== use exp() and sin() ====*/ | ||
| 76 | //# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 | ||
| 77 | //# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 | ||
| 78 | //#endif | ||
| 79 | |||
| 80 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 81 | #define DEBOUNCE 5 | ||
| 82 | |||
| 83 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
| 40 | //#define MATRIX_HAS_GHOST | 84 | //#define MATRIX_HAS_GHOST |
| 41 | 85 | ||
| 42 | /* Set 0 if debouncing isn't needed */ | ||
| 43 | #define DEBOUNCE 5 | ||
| 44 | |||
| 45 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | 86 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ |
| 46 | //#define LOCKING_SUPPORT_ENABLE | 87 | #define LOCKING_SUPPORT_ENABLE |
| 47 | |||
| 48 | /* Locking resynchronize hack */ | 88 | /* Locking resynchronize hack */ |
| 49 | #define LOCKING_RESYNC_ENABLE | 89 | #define LOCKING_RESYNC_ENABLE |
| 50 | 90 | ||
| 91 | /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | ||
| 92 | * This is useful for the Windows task manager shortcut (ctrl+shift+esc). | ||
| 93 | */ | ||
| 94 | //#define GRAVE_ESC_CTRL_OVERRIDE | ||
| 95 | |||
| 96 | /* | ||
| 97 | * Force NKRO | ||
| 98 | * | ||
| 99 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 100 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 101 | * makefile for this to work.) | ||
| 102 | * | ||
| 103 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 104 | * until the next keyboard reset. | ||
| 105 | * | ||
| 106 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 107 | * fully operational during normal computer usage. | ||
| 108 | * | ||
| 109 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 110 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 111 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 112 | * power-up. | ||
| 113 | * | ||
| 114 | */ | ||
| 115 | //#define FORCE_NKRO | ||
| 116 | |||
| 51 | /* | 117 | /* |
| 52 | * Feature disable options | 118 | * Feature disable options |
| 53 | * These options are also useful to firmware size reduction. | 119 | * These options are also useful to firmware size reduction. |
| @@ -63,7 +129,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 63 | //#define NO_ACTION_LAYER | 129 | //#define NO_ACTION_LAYER |
| 64 | //#define NO_ACTION_TAPPING | 130 | //#define NO_ACTION_TAPPING |
| 65 | //#define NO_ACTION_ONESHOT | 131 | //#define NO_ACTION_ONESHOT |
| 66 | //#define NO_ACTION_MACRO | ||
| 67 | //#define NO_ACTION_FUNCTION | ||
| 68 | 132 | ||
| 69 | #endif | 133 | /* disable these deprecated features by default */ |
| 134 | #define NO_ACTION_MACRO | ||
| 135 | #define NO_ACTION_FUNCTION | ||
| 136 | |||
| 137 | /* Bootmagic Lite key configuration */ | ||
| 138 | //#define BOOTMAGIC_LITE_ROW 0 | ||
| 139 | //#define BOOTMAGIC_LITE_COLUMN 0 | ||
diff --git a/keyboards/jm60/info.json b/keyboards/jm60/info.json new file mode 100644 index 000000000..2cc2ce4e3 --- /dev/null +++ b/keyboards/jm60/info.json | |||
| @@ -0,0 +1,78 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "JM60", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "qmk", | ||
| 5 | "width": 15, | ||
| 6 | "height": 5, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT_60_ansi": { | ||
| 9 | "layout": [ | ||
| 10 | {"x": 0, "y": 0}, | ||
| 11 | {"x": 1, "y": 0}, | ||
| 12 | {"x": 2, "y": 0}, | ||
| 13 | {"x": 3, "y": 0}, | ||
| 14 | {"x": 4, "y": 0}, | ||
| 15 | {"x": 5, "y": 0}, | ||
| 16 | {"x": 6, "y": 0}, | ||
| 17 | {"x": 7, "y": 0}, | ||
| 18 | {"x": 8, "y": 0}, | ||
| 19 | {"x": 9, "y": 0}, | ||
| 20 | {"x": 10, "y": 0}, | ||
| 21 | {"x": 11, "y": 0}, | ||
| 22 | {"x": 12, "y": 0}, | ||
| 23 | {"x": 13, "y": 0, "w": 2}, | ||
| 24 | |||
| 25 | {"x": 0, "y": 1, "w": 1.5}, | ||
| 26 | {"x": 1.5, "y": 1}, | ||
| 27 | {"x": 2.5, "y": 1}, | ||
| 28 | {"x": 3.5, "y": 1}, | ||
| 29 | {"x": 4.5, "y": 1}, | ||
| 30 | {"x": 5.5, "y": 1}, | ||
| 31 | {"x": 6.5, "y": 1}, | ||
| 32 | {"x": 7.5, "y": 1}, | ||
| 33 | {"x": 8.5, "y": 1}, | ||
| 34 | {"x": 9.5, "y": 1}, | ||
| 35 | {"x": 10.5, "y": 1}, | ||
| 36 | {"x": 11.5, "y": 1}, | ||
| 37 | {"x": 12.5, "y": 1}, | ||
| 38 | {"x": 13.5, "y": 1, "w": 1.5}, | ||
| 39 | |||
| 40 | {"x": 0, "y": 2, "w": 1.75}, | ||
| 41 | {"x": 1.75, "y": 2}, | ||
| 42 | {"x": 2.75, "y": 2}, | ||
| 43 | {"x": 3.75, "y": 2}, | ||
| 44 | {"x": 4.75, "y": 2}, | ||
| 45 | {"x": 5.75, "y": 2}, | ||
| 46 | {"x": 6.75, "y": 2}, | ||
| 47 | {"x": 7.75, "y": 2}, | ||
| 48 | {"x": 8.75, "y": 2}, | ||
| 49 | {"x": 9.75, "y": 2}, | ||
| 50 | {"x": 10.75, "y": 2}, | ||
| 51 | {"x": 11.75, "y": 2}, | ||
| 52 | {"x": 12.75, "y": 2, "w": 2.25}, | ||
| 53 | |||
| 54 | {"x": 0, "y": 3, "w": 2.25}, | ||
| 55 | {"x": 2.25, "y": 3}, | ||
| 56 | {"x": 3.25, "y": 3}, | ||
| 57 | {"x": 4.25, "y": 3}, | ||
| 58 | {"x": 5.25, "y": 3}, | ||
| 59 | {"x": 6.25, "y": 3}, | ||
| 60 | {"x": 7.25, "y": 3}, | ||
| 61 | {"x": 8.25, "y": 3}, | ||
| 62 | {"x": 9.25, "y": 3}, | ||
| 63 | {"x": 10.25, "y": 3}, | ||
| 64 | {"x": 11.25, "y": 3}, | ||
| 65 | {"x": 12.25, "y": 3, "w": 2.75}, | ||
| 66 | |||
| 67 | {"x": 0, "y": 4, "w": 1.25}, | ||
| 68 | {"x": 1.25, "y": 4, "w": 1.25}, | ||
| 69 | {"x": 2.5, "y": 4, "w": 1.25}, | ||
| 70 | {"x": 3.75, "y": 4, "w": 6.25}, | ||
| 71 | {"x": 10, "y": 4, "w": 1.25}, | ||
| 72 | {"x": 11.25, "y": 4, "w": 1.25}, | ||
| 73 | {"x": 12.5, "y": 4, "w": 1.25}, | ||
| 74 | {"x": 13.75, "y": 4, "w": 1.25} | ||
| 75 | ] | ||
| 76 | } | ||
| 77 | } | ||
| 78 | } | ||
diff --git a/keyboards/jm60/jm60.c b/keyboards/jm60/jm60.c index 3c8b43db9..d8fe9cecc 100644 --- a/keyboards/jm60/jm60.c +++ b/keyboards/jm60/jm60.c | |||
| @@ -14,4 +14,5 @@ GNU General Public License for more details. | |||
| 14 | You should have received a copy of the GNU General Public License | 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ | 16 | */ |
| 17 | #include QMK_KEYBOARD_H | 17 | |
| 18 | #include "jm60.h" | ||
diff --git a/keyboards/jm60/jm60.h b/keyboards/jm60/jm60.h index 34ca4d3d6..c0af36298 100644 --- a/keyboards/jm60/jm60.h +++ b/keyboards/jm60/jm60.h | |||
| @@ -14,42 +14,25 @@ GNU General Public License for more details. | |||
| 14 | You should have received a copy of the GNU General Public License | 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ | 16 | */ |
| 17 | #ifndef JM60_H | 17 | |
| 18 | #define JM60_H | 18 | #pragma once |
| 19 | 19 | ||
| 20 | #include "quantum.h" | 20 | #include "quantum.h" |
| 21 | 21 | ||
| 22 | // readability | ||
| 23 | #define XXX KC_NO | 22 | #define XXX KC_NO |
| 24 | 23 | ||
| 25 | /* Satan GH60 ANSI layout | 24 | #define LAYOUT_60_ansi( \ |
| 26 | * ,-----------------------------------------------------------. | 25 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ |
| 27 | * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | | 26 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ |
| 28 | * |-----------------------------------------------------------| | 27 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2C, k2D, \ |
| 29 | * | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d | | 28 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3B, k3D, \ |
| 30 | * |-----------------------------------------------------------| | 29 | k40, k41, k42, k46, k4A, k4B, k4C, k4D \ |
| 31 | * | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2c| 2d | | 30 | ) { \ |
| 32 | * |-----------------------------------------------------------| | 31 | { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ |
| 33 | * | 30 | 31| 32| 33| 34| 35| 36| 37| 38| 39| 3b| 3d | | 32 | { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ |
| 34 | * |-----------------------------------------------------------| | 33 | { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, XXX, k2C, k2D }, \ |
| 35 | * | 40 | 41 | 42 | 46 | 4a | 4b | 4c | 4d | | 34 | { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, XXX, k3B, XXX, k3D }, \ |
| 36 | * `-----------------------------------------------------------' | 35 | { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, k4C, k4D } \ |
| 37 | */ | ||
| 38 | #define LAYOUT_ansi( \ | ||
| 39 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ | ||
| 40 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ | ||
| 41 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2c, k2d, \ | ||
| 42 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3b, k3d, \ | ||
| 43 | k40, k41, k42, k46, k4a, k4b, k4c, k4d \ | ||
| 44 | ) \ | ||
| 45 | { \ | ||
| 46 | {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \ | ||
| 47 | {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \ | ||
| 48 | {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, XXX, k2c, k2d}, \ | ||
| 49 | {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, XXX, k3b, XXX, k3d}, \ | ||
| 50 | {k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d} \ | ||
| 51 | } | 36 | } |
| 52 | 37 | ||
| 53 | #endif | 38 | #define KEYMAP_ANSI LAYOUT_60_ansi |
| 54 | |||
| 55 | #define KEYMAP_ANSI LAYOUT_ansi | ||
diff --git a/keyboards/jm60/keymaps/default/keymap.c b/keyboards/jm60/keymaps/default/keymap.c index 6ca04c505..0940d7efc 100644 --- a/keyboards/jm60/keymaps/default/keymap.c +++ b/keyboards/jm60/keymaps/default/keymap.c | |||
| @@ -1,44 +1,39 @@ | |||
| 1 | #include QMK_KEYBOARD_H | 1 | #include QMK_KEYBOARD_H |
| 2 | 2 | ||
| 3 | 3 | enum layer_names { | |
| 4 | // Used for SHIFT_ESC | 4 | _BL, |
| 5 | #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) | 5 | _FL |
| 6 | 6 | }; | |
| 7 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
| 8 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
| 9 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
| 10 | // entirely and just use numbers. | ||
| 11 | #define _BL 0 | ||
| 12 | #define _FL 1 | ||
| 13 | 7 | ||
| 14 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 8 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 15 | /* Keymap _BL: (Base Layer) Default Layer | 9 | /* Keymap _BL: (Base Layer) Default Layer |
| 16 | * ,-----------------------------------------------------------. | 10 | * ,-----------------------------------------------------------. |
| 17 | * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | | 11 | * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |
| 18 | * |-----------------------------------------------------------| | 12 | * |-----------------------------------------------------------| |
| 19 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 13 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |
| 20 | * |-----------------------------------------------------------| | 14 | * |-----------------------------------------------------------| |
| 21 | * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 15 | * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | |
| 22 | * |-----------------------------------------------------------| | 16 | * |-----------------------------------------------------------| |
| 23 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | 17 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | |
| 24 | * |-----------------------------------------------------------| | 18 | * |-----------------------------------------------------------| |
| 25 | * |Ctrl|Gui |Alt | Space |Alt |Gui |FN |Ctrl | | 19 | * |Ctrl|Gui |Alt | Space |Alt |Gui |FN |Ctrl | |
| 26 | * `-----------------------------------------------------------' | 20 | * `-----------------------------------------------------------' |
| 27 | */ | 21 | */ |
| 28 | [_BL] = KEYMAP_ANSI( | 22 | [_BL] = LAYOUT_60_ansi( |
| 29 | 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, \ | 23 | 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, |
| 30 | 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, \ | 24 | 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, |
| 31 | 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, \ | 25 | 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, |
| 32 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ | 26 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, |
| 33 | KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, MO(_FL),KC_RCTL), | 27 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL |
| 28 | ), | ||
| 34 | 29 | ||
| 35 | /* Keymap _FL: Function Layer | 30 | /* Keymap _FL: Function Layer |
| 36 | */ | 31 | */ |
| 37 | [_FL] = KEYMAP_ANSI( | 32 | [_FL] = LAYOUT_60_ansi( |
| 38 | KC_GRV, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET, \ | 33 | KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, |
| 39 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC, BL_INC,BL_TOGG, \ | 34 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, BL_TOGG, |
| 40 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ | 35 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, |
| 41 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ | 36 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, |
| 42 | _______,_______,_______, _______, _______,_______,_______,_______), | 37 | _______, _______, _______, _______, _______, _______, _______, _______ |
| 38 | ) | ||
| 43 | }; | 39 | }; |
| 44 | |||
diff --git a/keyboards/jm60/keymaps/poker3/keymap.c b/keyboards/jm60/keymaps/poker3/keymap.c index 07f432dcd..72e64bbcc 100644 --- a/keyboards/jm60/keymaps/poker3/keymap.c +++ b/keyboards/jm60/keymaps/poker3/keymap.c | |||
| @@ -1,31 +1,24 @@ | |||
| 1 | #include QMK_KEYBOARD_H | 1 | #include QMK_KEYBOARD_H |
| 2 | 2 | ||
| 3 | // Used for SHIFT_ESC | 3 | enum layer_names { |
| 4 | #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) | 4 | _BL, |
| 5 | 5 | _FL | |
| 6 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | 6 | }; |
| 7 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
| 8 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
| 9 | // entirely and just use numbers. | ||
| 10 | #define _BL 0 | ||
| 11 | #define _FL 1 | ||
| 12 | 7 | ||
| 13 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 8 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 14 | /* Keymap _BL: (Base Layer) Default Layer | 9 | [_BL] = LAYOUT_60_ansi( |
| 15 | */ | 10 | 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, |
| 16 | [_BL] = KEYMAP_ANSI( | 11 | 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, |
| 17 | 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, \ | 12 | MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, |
| 18 | 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, \ | 13 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, |
| 19 | MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \ | 14 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL |
| 20 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ | 15 | ), |
| 21 | KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, MO(_FL),KC_RCTL), | ||
| 22 | 16 | ||
| 23 | /* Keymap _FL: Function Layer | 17 | [_FL] = LAYOUT_60_ansi( |
| 24 | */ | 18 | 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_DEL, |
| 25 | [_FL] = KEYMAP_ANSI( | 19 | _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, |
| 26 | 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_DEL, \ | 20 | KC_CAPS, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_DEL, _______, |
| 27 | _______,KC_MPRV,KC_MPLY,KC_MNXT,_______,_______,_______,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR, KC_SLCK, KC_PAUS,_______, \ | 21 | _______, KC_APP, _______, _______, _______, _______, KC_END, _______, _______, _______, _______, _______, |
| 28 | KC_CAPS,_______,KC_VOLD,KC_VOLU,KC_MUTE,_______,KC_HOME,KC_LEFT,KC_DOWN,KC_RGHT,KC_INS,KC_DEL,_______, \ | 22 | _______, _______, _______, _______, _______, _______, _______, _______ |
| 29 | _______,KC_APP,_______,_______,_______,_______,KC_END,_______,_______,_______,_______,_______, \ | 23 | ) |
| 30 | _______,_______,_______, _______, _______,_______,_______,_______), | ||
| 31 | }; | 24 | }; |
diff --git a/keyboards/jm60/matrix.c b/keyboards/jm60/matrix.c deleted file mode 100644 index e19d4f02b..000000000 --- a/keyboards/jm60/matrix.c +++ /dev/null | |||
| @@ -1,128 +0,0 @@ | |||
| 1 | #include <stdint.h> | ||
| 2 | #include <stdbool.h> | ||
| 3 | #include <string.h> | ||
| 4 | #include <hal.h> | ||
| 5 | #include "timer.h" | ||
| 6 | #include "wait.h" | ||
| 7 | #include "print.h" | ||
| 8 | #include "matrix.h" | ||
| 9 | |||
| 10 | |||
| 11 | /* | ||
| 12 | * JM60 | ||
| 13 | * Column pins are input with internal pull-down. Row pins are output and strobe with high. | ||
| 14 | * Key is high or 1 when it turns on. | ||
| 15 | * | ||
| 16 | * col: { PTA15, PTC10, PTC11, PTC12, PTD2, PTB3, PTB4, PTB5, PTB6, PTB7, PTB8, PTB9, PTA2, PTA3 } | ||
| 17 | * row: { PTB11, PTB10, PTB2, PTB1, PTB0} | ||
| 18 | */ | ||
| 19 | /* matrix state(1:on, 0:off) */ | ||
| 20 | static matrix_row_t matrix[MATRIX_ROWS]; | ||
| 21 | static matrix_row_t matrix_debouncing[MATRIX_ROWS]; | ||
| 22 | static bool debouncing = false; | ||
| 23 | static uint16_t debouncing_time = 0; | ||
| 24 | |||
| 25 | |||
| 26 | void matrix_init(void) | ||
| 27 | { | ||
| 28 | //debug_matrix = true; | ||
| 29 | /* Column(sense) */ | ||
| 30 | palSetPadMode(GPIOA, 15, PAL_MODE_INPUT_PULLDOWN); | ||
| 31 | palSetPadMode(GPIOC, 10, PAL_MODE_INPUT_PULLDOWN); | ||
| 32 | palSetPadMode(GPIOC, 11, PAL_MODE_INPUT_PULLDOWN); | ||
| 33 | palSetPadMode(GPIOC, 12, PAL_MODE_INPUT_PULLDOWN); | ||
| 34 | palSetPadMode(GPIOD, 2, PAL_MODE_INPUT_PULLDOWN); | ||
| 35 | palSetPadMode(GPIOB, 3, PAL_MODE_INPUT_PULLDOWN); | ||
| 36 | palSetPadMode(GPIOB, 4, PAL_MODE_INPUT_PULLDOWN); | ||
| 37 | palSetPadMode(GPIOB, 5, PAL_MODE_INPUT_PULLDOWN); | ||
| 38 | palSetPadMode(GPIOB, 6, PAL_MODE_INPUT_PULLDOWN); | ||
| 39 | palSetPadMode(GPIOB, 7, PAL_MODE_INPUT_PULLDOWN); | ||
| 40 | palSetPadMode(GPIOB, 8, PAL_MODE_INPUT_PULLDOWN); | ||
| 41 | palSetPadMode(GPIOB, 9, PAL_MODE_INPUT_PULLDOWN); | ||
| 42 | palSetPadMode(GPIOA, 2, PAL_MODE_INPUT_PULLDOWN); | ||
| 43 | palSetPadMode(GPIOA, 3, PAL_MODE_INPUT_PULLDOWN); | ||
| 44 | |||
| 45 | /* Row(strobe) */ | ||
| 46 | palSetPadMode(GPIOB, 11, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 47 | palSetPadMode(GPIOB, 10, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 48 | palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 49 | palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 50 | palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 51 | |||
| 52 | memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); | ||
| 53 | memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t)); | ||
| 54 | } | ||
| 55 | |||
| 56 | uint8_t matrix_scan(void) | ||
| 57 | { | ||
| 58 | for (int row = 0; row < MATRIX_ROWS; row++) { | ||
| 59 | matrix_row_t data = 0; | ||
| 60 | |||
| 61 | // strobe row | ||
| 62 | switch (row) { | ||
| 63 | case 0: palSetPad(GPIOB, 11); break; | ||
| 64 | case 1: palSetPad(GPIOB, 10); break; | ||
| 65 | case 2: palSetPad(GPIOB, 2); break; | ||
| 66 | case 3: palSetPad(GPIOB, 1); break; | ||
| 67 | case 4: palSetPad(GPIOB, 0); break; | ||
| 68 | } | ||
| 69 | |||
| 70 | wait_us(20); // need wait to settle pin state | ||
| 71 | |||
| 72 | // read col data: { PTA15, PTC10, PTC11, PTC12, PTD2, PTB3, PTB4, PTB5, PTB6, PTB7, PTB8, PTB9, PTA2, PTA3 } | ||
| 73 | data = ((palReadPort(GPIOA) & 0x8000UL) >> 15) | // 0 | ||
| 74 | ((palReadPort(GPIOC) & 0x1C00UL) >> 9) | // 1, 2, 3 | ||
| 75 | ((palReadPort(GPIOD) & 0x0004UL) << 2) | // 4 | ||
| 76 | ((palReadPort(GPIOB) & 0x03F8UL) << 2) | // 5, 6, 7, 8, 9, 10, 11 | ||
| 77 | ((palReadPort(GPIOA) & 0x000CUL) << 10); // 12, 13 | ||
| 78 | |||
| 79 | // un-strobe row | ||
| 80 | switch (row) { | ||
| 81 | case 0: palClearPad(GPIOB, 11); break; | ||
| 82 | case 1: palClearPad(GPIOB, 10); break; | ||
| 83 | case 2: palClearPad(GPIOB, 2); break; | ||
| 84 | case 3: palClearPad(GPIOB, 1); break; | ||
| 85 | case 4: palClearPad(GPIOB, 0); break; | ||
| 86 | } | ||
| 87 | |||
| 88 | if (matrix_debouncing[row] != data) { | ||
| 89 | matrix_debouncing[row] = data; | ||
| 90 | debouncing = true; | ||
| 91 | debouncing_time = timer_read(); | ||
| 92 | } | ||
| 93 | } | ||
| 94 | |||
| 95 | if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { | ||
| 96 | for (int row = 0; row < MATRIX_ROWS; row++) { | ||
| 97 | matrix[row] = matrix_debouncing[row]; | ||
| 98 | } | ||
| 99 | debouncing = false; | ||
| 100 | } | ||
| 101 | return 1; | ||
| 102 | } | ||
| 103 | |||
| 104 | bool matrix_is_on(uint8_t row, uint8_t col) | ||
| 105 | { | ||
| 106 | return (matrix[row] & (1<<col)); | ||
| 107 | } | ||
| 108 | |||
| 109 | matrix_row_t matrix_get_row(uint8_t row) | ||
| 110 | { | ||
| 111 | return matrix[row]; | ||
| 112 | } | ||
| 113 | |||
| 114 | void matrix_print(void) | ||
| 115 | { | ||
| 116 | xprintf("\nr/c 01234567\n"); | ||
| 117 | for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | ||
| 118 | xprintf("%X0: ", row); | ||
| 119 | matrix_row_t data = matrix_get_row(row); | ||
| 120 | for (int col = 0; col < MATRIX_COLS; col++) { | ||
| 121 | if (data & (1<<col)) | ||
| 122 | xprintf("1"); | ||
| 123 | else | ||
| 124 | xprintf("0"); | ||
| 125 | } | ||
| 126 | xprintf("\n"); | ||
| 127 | } | ||
| 128 | } | ||
diff --git a/keyboards/jm60/readme.md b/keyboards/jm60/readme.md index 51473fc09..bb790d6d0 100644 --- a/keyboards/jm60/readme.md +++ b/keyboards/jm60/readme.md | |||
| @@ -1,27 +1,21 @@ | |||
| 1 | JM60 | 1 | # JM60 |
| 2 | ======== | ||
| 3 | 2 | ||
| 4 | A compact 60% keyboard with full RGB led support. | 3 | A compact 60% keyboard with full RGB led support. |
| 5 | 4 | ||
| 6 | Keyboard Maintainer: QMK Community | 5 | * Keyboard Maintainer: QMK Community |
| 7 | Hardware Supported: JM60 | 6 | * Hardware Supported: JM60 |
| 8 | Hardware Availability: https://kbdfans.myshopify.com/ (is no longer sold) | 7 | * Hardware Availability: https://kbdfans.myshopify.com/ (is no longer sold) |
| 9 | 8 | ||
| 10 | Make example for this keyboard (after setting up your build environment): | 9 | Make example for this keyboard (after setting up your build environment): |
| 11 | 10 | ||
| 12 | make jm60:default:bin | 11 | make jm60:default |
| 13 | 12 | ||
| 14 | See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. | 13 | 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). |
| 15 | 14 | ||
| 16 | ## Flashing Instructions | 15 | ## Flashing Instructions |
| 17 | 16 | ||
| 18 | 1) from the `qmk_firmware` directory run: | 17 | 1) rename 'jm60_default.bin' to 'jm60_default.firmware' |
| 19 | ``` | ||
| 20 | $ make jm60:default:bin | ||
| 21 | ``` | ||
| 22 | 18 | ||
| 23 | 2) rename 'jm60_default.bin' to 'jm60_default.firmware' | 19 | 2) Press 'R' and reconnect the keyboard. |
| 24 | 20 | ||
| 25 | 3) Press 'R' and reconnect the keyboard. | 21 | 3) Start the original Configuration Tool and flash 'jm60_default.bin' |
| 26 | |||
| 27 | 4) Start the original Configuration Tool and flash 'jm60_default.bin' | ||
diff --git a/keyboards/jm60/rules.mk b/keyboards/jm60/rules.mk index 2a2a080b7..5992cc055 100644 --- a/keyboards/jm60/rules.mk +++ b/keyboards/jm60/rules.mk | |||
| @@ -5,22 +5,23 @@ MCU_LDSCRIPT = jm60_bootloader | |||
| 5 | BOARD = JM60_BOARD | 5 | BOARD = JM60_BOARD |
| 6 | 6 | ||
| 7 | # Build Options | 7 | # Build Options |
| 8 | # comment out to disable the options. | 8 | # change yes to no to disable |
| 9 | # | 9 | # |
| 10 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration | 10 | BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration |
| 11 | MOUSEKEY_ENABLE = no # Mouse keys | 11 | MOUSEKEY_ENABLE = no # Mouse keys |
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | 12 | EXTRAKEY_ENABLE = yes # Audio control and System control |
| 13 | CONSOLE_ENABLE = no # Console for debug | 13 | CONSOLE_ENABLE = no # Console for debug |
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | 14 | COMMAND_ENABLE = no # Commands for debug and configuration |
| 15 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
| 16 | NKRO_ENABLE = yes # USB Nkey Rollover | 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 17 | CUSTOM_MATRIX = yes # Custom matrix file | 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
| 18 | BACKLIGHT_ENABLE = no | 18 | NKRO_ENABLE = yes # USB Nkey Rollover |
| 19 | VISUALIZER_ENABLE = no | 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 | ||
| 20 | 23 | ||
| 21 | # Enter lower-power sleep mode when on the ChibiOS idle thread | 24 | # Enter lower-power sleep mode when on the ChibiOS idle thread |
| 22 | OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE | 25 | OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE |
| 23 | 26 | ||
| 24 | # project specific files | 27 | LAYOUTS = 60_ansi |
| 25 | SRC = matrix.c \ | ||
| 26 | led.c | ||
diff --git a/keyboards/massdrop/alt/matrix.c b/keyboards/massdrop/alt/matrix.c index 314115571..f635f37f2 100644 --- a/keyboards/massdrop/alt/matrix.c +++ b/keyboards/massdrop/alt/matrix.c | |||
| @@ -22,6 +22,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 22 | #include "clks.h" | 22 | #include "clks.h" |
| 23 | #include <string.h> | 23 | #include <string.h> |
| 24 | 24 | ||
| 25 | #ifndef MATRIX_IO_DELAY | ||
| 26 | # define MATRIX_IO_DELAY 1 | ||
| 27 | #endif | ||
| 28 | |||
| 25 | matrix_row_t mlatest[MATRIX_ROWS]; | 29 | matrix_row_t mlatest[MATRIX_ROWS]; |
| 26 | matrix_row_t mlast[MATRIX_ROWS]; | 30 | matrix_row_t mlast[MATRIX_ROWS]; |
| 27 | matrix_row_t mdebounced[MATRIX_ROWS]; | 31 | matrix_row_t mdebounced[MATRIX_ROWS]; |
| @@ -32,6 +36,8 @@ uint8_t col_ports[] = { MATRIX_COL_PORTS }; | |||
| 32 | uint8_t col_pins[] = { MATRIX_COL_PINS }; | 36 | uint8_t col_pins[] = { MATRIX_COL_PINS }; |
| 33 | uint32_t row_masks[2]; //NOTE: If more than PA PB used in the future, adjust code to accomodate | 37 | uint32_t row_masks[2]; //NOTE: If more than PA PB used in the future, adjust code to accomodate |
| 34 | 38 | ||
| 39 | __attribute__((weak)) void matrix_io_delay(void) { wait_us(MATRIX_IO_DELAY); } | ||
| 40 | |||
| 35 | __attribute__ ((weak)) | 41 | __attribute__ ((weak)) |
| 36 | void matrix_init_kb(void) { | 42 | void matrix_init_kb(void) { |
| 37 | matrix_init_user(); | 43 | matrix_init_user(); |
| @@ -95,7 +101,7 @@ uint8_t matrix_scan(void) | |||
| 95 | { | 101 | { |
| 96 | PORT->Group[col_ports[col]].OUTSET.reg = 1 << col_pins[col]; //Set col output | 102 | PORT->Group[col_ports[col]].OUTSET.reg = 1 << col_pins[col]; //Set col output |
| 97 | 103 | ||
| 98 | wait_us(1); //Delay for output | 104 | matrix_io_delay(); //Delay for output |
| 99 | 105 | ||
| 100 | scans[PA] = PORT->Group[PA].IN.reg & row_masks[PA]; //Read PA row pins data | 106 | scans[PA] = PORT->Group[PA].IN.reg & row_masks[PA]; //Read PA row pins data |
| 101 | scans[PB] = PORT->Group[PB].IN.reg & row_masks[PB]; //Read PB row pins data | 107 | scans[PB] = PORT->Group[PB].IN.reg & row_masks[PB]; //Read PB row pins data |
diff --git a/keyboards/massdrop/ctrl/matrix.c b/keyboards/massdrop/ctrl/matrix.c index f3529fe72..713fb89f6 100644 --- a/keyboards/massdrop/ctrl/matrix.c +++ b/keyboards/massdrop/ctrl/matrix.c | |||
| @@ -22,6 +22,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 22 | #include "clks.h" | 22 | #include "clks.h" |
| 23 | #include <string.h> | 23 | #include <string.h> |
| 24 | 24 | ||
| 25 | #ifndef MATRIX_IO_DELAY | ||
| 26 | # define MATRIX_IO_DELAY 1 | ||
| 27 | #endif | ||
| 28 | |||
| 25 | matrix_row_t mlatest[MATRIX_ROWS]; | 29 | matrix_row_t mlatest[MATRIX_ROWS]; |
| 26 | matrix_row_t mlast[MATRIX_ROWS]; | 30 | matrix_row_t mlast[MATRIX_ROWS]; |
| 27 | matrix_row_t mdebounced[MATRIX_ROWS]; | 31 | matrix_row_t mdebounced[MATRIX_ROWS]; |
| @@ -32,6 +36,8 @@ uint8_t col_ports[] = { MATRIX_COL_PORTS }; | |||
| 32 | uint8_t col_pins[] = { MATRIX_COL_PINS }; | 36 | uint8_t col_pins[] = { MATRIX_COL_PINS }; |
| 33 | uint32_t row_masks[2]; //NOTE: If more than PA PB used in the future, adjust code to accomodate | 37 | uint32_t row_masks[2]; //NOTE: If more than PA PB used in the future, adjust code to accomodate |
| 34 | 38 | ||
| 39 | __attribute__((weak)) void matrix_io_delay(void) { wait_us(MATRIX_IO_DELAY); } | ||
| 40 | |||
| 35 | __attribute__ ((weak)) | 41 | __attribute__ ((weak)) |
| 36 | void matrix_init_kb(void) { | 42 | void matrix_init_kb(void) { |
| 37 | matrix_init_user(); | 43 | matrix_init_user(); |
| @@ -95,7 +101,7 @@ uint8_t matrix_scan(void) | |||
| 95 | { | 101 | { |
| 96 | PORT->Group[col_ports[col]].OUTSET.reg = 1 << col_pins[col]; //Set col output | 102 | PORT->Group[col_ports[col]].OUTSET.reg = 1 << col_pins[col]; //Set col output |
| 97 | 103 | ||
| 98 | wait_us(1); //Delay for output | 104 | matrix_io_delay(); //Delay for output |
| 99 | 105 | ||
| 100 | scans[PA] = PORT->Group[PA].IN.reg & row_masks[PA]; //Read PA row pins data | 106 | scans[PA] = PORT->Group[PA].IN.reg & row_masks[PA]; //Read PA row pins data |
| 101 | scans[PB] = PORT->Group[PB].IN.reg & row_masks[PB]; //Read PB row pins data | 107 | scans[PB] = PORT->Group[PB].IN.reg & row_masks[PB]; //Read PB row pins data |
diff --git a/keyboards/sparrow62/config.h b/keyboards/sparrow62/config.h new file mode 100644 index 000000000..4b8460c2f --- /dev/null +++ b/keyboards/sparrow62/config.h | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2020 Atsushi Morimoto @74th | ||
| 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 | /* USB Device descriptor parameter */ | ||
| 23 | #define VENDOR_ID 0xDA74 | ||
| 24 | #define PRODUCT_ID 0x7461 | ||
| 25 | #define DEVICE_VER 0x0001 | ||
| 26 | #define MANUFACTURER Atsushi_Morimoto_74th | ||
| 27 | #define PRODUCT sparrow62 | ||
| 28 | |||
| 29 | /* key matrix size */ | ||
| 30 | #define MATRIX_ROWS 10 | ||
| 31 | #define MATRIX_COLS 7 | ||
| 32 | |||
| 33 | // wiring of each half | ||
| 34 | #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } | ||
| 35 | #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } | ||
| 36 | |||
| 37 | #define DIODE_DIRECTION COL2ROW | ||
| 38 | |||
| 39 | /* Set 0 if debouncing isn't needed */ | ||
| 40 | #define DEBOUNCE 5 | ||
| 41 | |||
| 42 | /* serial.c configuration for split keyboard */ | ||
| 43 | #define SOFT_SERIAL_PIN D2 | ||
| 44 | #define SPLIT_HAND_PIN F4 | ||
| 45 | |||
| 46 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 47 | #define LOCKING_SUPPORT_ENABLE | ||
| 48 | /* Locking resynchronize hack */ | ||
| 49 | #define LOCKING_RESYNC_ENABLE | ||
diff --git a/keyboards/sparrow62/keymaps/74th/config.h b/keyboards/sparrow62/keymaps/74th/config.h new file mode 100644 index 000000000..15eb08ed7 --- /dev/null +++ b/keyboards/sparrow62/keymaps/74th/config.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2020 Atsushi Morimoto @74th | ||
| 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 | /* Select hand configuration */ | ||
| 21 | |||
| 22 | #define TAPPING_FORCE_HOLD | ||
| 23 | #define TAPPING_TERM 180 | ||
diff --git a/keyboards/sparrow62/keymaps/74th/keymap.c b/keyboards/sparrow62/keymaps/74th/keymap.c new file mode 100644 index 000000000..baf44fdee --- /dev/null +++ b/keyboards/sparrow62/keymaps/74th/keymap.c | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2020 Atsushi Morimoto @74th | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 19 | |||
| 20 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
| 21 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
| 22 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
| 23 | // entirely and just use numbers. | ||
| 24 | enum layer_number { | ||
| 25 | _QWERTY = 0, | ||
| 26 | _FN, | ||
| 27 | }; | ||
| 28 | |||
| 29 | enum custom_keycodes { | ||
| 30 | QWERTY = SAFE_RANGE, | ||
| 31 | LOCK, | ||
| 32 | ESC_MHEN | ||
| 33 | }; | ||
| 34 | |||
| 35 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 36 | [_QWERTY] = LAYOUT( | ||
| 37 | // /-------+-------+-------+-------+-------+-------\ /-------+-------+-------+-------+-------+-------. | ||
| 38 | // | ` | 1 | 2 | 3 | 4 | 5 | | 7 | 8 | 9 | 0 | - | = | | ||
| 39 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, | ||
| 40 | // |-------+-------+-------+-------+-------+-------+-------\ /-------+-------+-------+-------+-------+-------+-------| | ||
| 41 | // | ` | Q | W | E | R | T | 6 | | 6 | Y | U | I | O | P | = | | ||
| 42 | KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_6, KC_6, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL, | ||
| 43 | // |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| | ||
| 44 | // |Ctr(TAB| A | S | D | F | G | [ | | ] | H | J | K | L | ; : | ' " | | ||
| 45 | CTL_T(KC_TAB),KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, | ||
| 46 | // |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| | ||
| 47 | // |Sft(ESC| Z | X | C | V | B | [ | | ] | N | M | , < | . > | / ? | \ | | | ||
| 48 | SFT_T(KC_ESC),KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_BSLS, | ||
| 49 | // |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| | ||
| 50 | // | ESC |Alt(TAB|Sf(Eisu|Ctl(SPC| |Ctl(ENT| FN |GU(Kana| BS | | ||
| 51 | ESC_MHEN, ALT_T(KC_TAB), SFT_T(KC_MHEN), CTL_T(KC_SPC), CTL_T(KC_ENT), MO(_FN), GUI_T(KC_HENK), KC_BSPC | ||
| 52 | // \-------+-------+-------+-------/ \-------+-------+-------+-------/ | ||
| 53 | ), | ||
| 54 | |||
| 55 | [_FN] = LAYOUT( | ||
| 56 | // /-------+-------+-------+-------+-------+-------\ /-------+-------+-------+-------+-------+-------. | ||
| 57 | // | Lock |CMD+F1 |Sft+F2 |CMD+F3 |CMD+F4 |CMD+F5 | |CMD+F6 |CMD+F7 |CMD+F8 |CMD+F9 | | | | ||
| 58 | C(G(KC_Q)),LCMD(KC_F1),SCMD(KC_F2),LCMD(KC_F3),LCMD(KC_F4),LCMD(KC_F5),LCMD(KC_F6),LCMD(KC_F7),LCMD(KC_F8),LCMD(KC_F9),_______,_______, | ||
| 59 | // |-------+-------+-------+-------+-------+-------+-------\ /-------+-------+-------+-------+-------+-------+-------| | ||
| 60 | // | ESC | F1 | F2 | F3 | F4 | F5 | F6 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | ||
| 61 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, | ||
| 62 | // |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| | ||
| 63 | // | ~ | ! | @ | # | $ | % | ^ | | ^ | & | * | | PrSC | PrSC2 | PrSC3 | | ||
| 64 | KC_GRV, KC_EXLM, KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC, KC_CIRC,KC_AMPR,KC_ASTR,_______,KC_PSCREEN,LALT(KC_PSCREEN),LSFT(KC_PSCREEN), | ||
| 65 | // |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| | ||
| 66 | // | | | | | | | | | | ← | ↓ | ↑ | → | HOME | END | | ||
| 67 | _______,_______,_______,_______,_______,_______,_______, _______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME,KC_END, | ||
| 68 | // |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| | ||
| 69 | // | ESC |Alt(TAB|Sf(Eisu|Ctl(SPC| | | FN | RAlt | DEL | | ||
| 70 | _______,_______,_______,_______, _______,_______,_______,KC_DEL | ||
| 71 | // \-------+-------+-------+-------/ \-------+-------+-------+-------/ | ||
| 72 | ) | ||
| 73 | }; | ||
| 74 | |||
| 75 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 76 | if (record->event.pressed) { | ||
| 77 | switch (keycode) { | ||
| 78 | case ESC_MHEN: | ||
| 79 | tap_code(KC_INT5); | ||
| 80 | tap_code(KC_ESC); | ||
| 81 | return false; | ||
| 82 | } | ||
| 83 | } | ||
| 84 | return true; | ||
| 85 | } | ||
diff --git a/keyboards/sparrow62/keymaps/default/config.h b/keyboards/sparrow62/keymaps/default/config.h new file mode 100644 index 000000000..15eb08ed7 --- /dev/null +++ b/keyboards/sparrow62/keymaps/default/config.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2020 Atsushi Morimoto @74th | ||
| 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 | /* Select hand configuration */ | ||
| 21 | |||
| 22 | #define TAPPING_FORCE_HOLD | ||
| 23 | #define TAPPING_TERM 180 | ||
diff --git a/keyboards/sparrow62/keymaps/default/keymap.c b/keyboards/sparrow62/keymaps/default/keymap.c new file mode 100644 index 000000000..af3deee49 --- /dev/null +++ b/keyboards/sparrow62/keymaps/default/keymap.c | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2020 Atsushi Morimoto @74th | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 19 | |||
| 20 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
| 21 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
| 22 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
| 23 | // entirely and just use numbers. | ||
| 24 | enum layer_number { | ||
| 25 | _QWERTY = 0, | ||
| 26 | _FN, | ||
| 27 | }; | ||
| 28 | |||
| 29 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 30 | [_QWERTY] = LAYOUT( | ||
| 31 | // /-------+-------+-------+-------+-------+-------\ /-------+-------+-------+-------+-------+-------. | ||
| 32 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, | ||
| 33 | // |-------+-------+-------+-------+-------+-------+-------\ /-------+-------+-------+-------+-------+-------+-------| | ||
| 34 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_6, KC_6, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC, | ||
| 35 | // |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| | ||
| 36 | KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_Y, KC_Y, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, | ||
| 37 | // |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| | ||
| 38 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT,KC_SLSH,KC_BSLS, | ||
| 39 | // \-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------/ | ||
| 40 | KC_ESC, KC_LALT,KC_LGUI, KC_SPC, KC_ENT, MO(_FN),KC_RALT,KC_BSPC | ||
| 41 | // \-------+-------+-------+-------/ \-------+-------+-------+-------/ | ||
| 42 | ), | ||
| 43 | |||
| 44 | [_FN] = LAYOUT( | ||
| 45 | // /-------+-------+-------+-------+-------+-------\ /-------+-------+-------+-------+-------+-------. | ||
| 46 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, | ||
| 47 | // |-------+-------+-------+-------+-------+-------+-------\ /-------+-------+-------+-------+-------+-------+-------| | ||
| 48 | _______,_______,_______,_______,_______,_______, KC_F6, KC_F6, _______,_______,_______,_______,_______,_______, | ||
| 49 | // |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| | ||
| 50 | _______,_______,_______,_______,_______,_______,_______, _______,KC_PGDN,KC_PGUP,_______,_______,_______,KC_PSCR, | ||
| 51 | // |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| | ||
| 52 | _______,_______,_______,_______,_______,_______,_______, _______,KC_LEFT,KC_DOWN, KC_UP, KC_RGHT,KC_HOME, KC_END, | ||
| 53 | // \-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------/ | ||
| 54 | _______,_______,_______,_______, _______,_______,_______, KC_DEL | ||
| 55 | // \-------+-------+-------+-------/ \-------+-------+-------+-------/ | ||
| 56 | ) | ||
| 57 | }; | ||
diff --git a/keyboards/sparrow62/keymaps/via/config.h b/keyboards/sparrow62/keymaps/via/config.h new file mode 100644 index 000000000..15eb08ed7 --- /dev/null +++ b/keyboards/sparrow62/keymaps/via/config.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2020 Atsushi Morimoto @74th | ||
| 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 | /* Select hand configuration */ | ||
| 21 | |||
| 22 | #define TAPPING_FORCE_HOLD | ||
| 23 | #define TAPPING_TERM 180 | ||
diff --git a/keyboards/sparrow62/keymaps/via/keymap.c b/keyboards/sparrow62/keymaps/via/keymap.c new file mode 100644 index 000000000..ca39ada24 --- /dev/null +++ b/keyboards/sparrow62/keymaps/via/keymap.c | |||
| @@ -0,0 +1,88 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2020 Atsushi Morimoto @74th | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 19 | |||
| 20 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
| 21 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
| 22 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
| 23 | // entirely and just use numbers. | ||
| 24 | enum layer_number { | ||
| 25 | _QWERTY = 0, | ||
| 26 | _FN, | ||
| 27 | _L2, | ||
| 28 | _L3 | ||
| 29 | }; | ||
| 30 | |||
| 31 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 32 | [_QWERTY] = LAYOUT( | ||
| 33 | // /-------+-------+-------+-------+-------+-------\ /-------+-------+-------+-------+-------+-------. | ||
| 34 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, | ||
| 35 | // |-------+-------+-------+-------+-------+-------+-------\ /-------+-------+-------+-------+-------+-------+-------| | ||
| 36 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_6, KC_6, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC, | ||
| 37 | // |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| | ||
| 38 | KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_Y, KC_Y, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, | ||
| 39 | // |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| | ||
| 40 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT,KC_SLSH,KC_BSLS, | ||
| 41 | // \-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------/ | ||
| 42 | KC_ESC, KC_LALT,KC_LGUI, KC_SPC, KC_ENT, MO(_FN),KC_RALT,KC_BSPC | ||
| 43 | // \-------+-------+-------+-------/ \-------+-------+-------+-------/ | ||
| 44 | ), | ||
| 45 | |||
| 46 | [_FN] = LAYOUT( | ||
| 47 | // /-------+-------+-------+-------+-------+-------\ /-------+-------+-------+-------+-------+-------. | ||
| 48 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, | ||
| 49 | // |-------+-------+-------+-------+-------+-------+-------\ /-------+-------+-------+-------+-------+-------+-------| | ||
| 50 | _______,_______,_______,_______,_______,_______, KC_F6, KC_F6, _______,_______,_______,_______,_______,_______, | ||
| 51 | // |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| | ||
| 52 | _______,_______,_______,_______,_______,_______,_______, _______,KC_PGDN,KC_PGUP,_______,_______,_______,KC_PSCR, | ||
| 53 | // |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| | ||
| 54 | _______,_______,_______,_______,_______,_______,_______, _______,KC_LEFT,KC_DOWN, KC_UP, KC_RGHT,KC_HOME, KC_END, | ||
| 55 | // \-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------/ | ||
| 56 | _______,_______,_______,_______, _______,_______,_______, KC_DEL | ||
| 57 | // \-------+-------+-------+-------/ \-------+-------+-------+-------/ | ||
| 58 | ), | ||
| 59 | |||
| 60 | [_L2] = LAYOUT( | ||
| 61 | // /-------+-------+-------+-------+-------+-------\ /-------+-------+-------+-------+-------+-------. | ||
| 62 | _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, | ||
| 63 | // |-------+-------+-------+-------+-------+-------+-------\ /-------+-------+-------+-------+-------+-------+-------| | ||
| 64 | _______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______, | ||
| 65 | // |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| | ||
| 66 | _______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______, | ||
| 67 | // |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| | ||
| 68 | _______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______, | ||
| 69 | // \-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------/ | ||
| 70 | _______,_______,_______,_______, _______,_______,_______,_______ | ||
| 71 | // \-------+-------+-------+-------/ \-------+-------+-------+-------/ | ||
| 72 | ), | ||
| 73 | |||
| 74 | [_L3] = LAYOUT( | ||
| 75 | // /-------+-------+-------+-------+-------+-------\ /-------+-------+-------+-------+-------+-------. | ||
| 76 | _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, | ||
| 77 | // |-------+-------+-------+-------+-------+-------+-------\ /-------+-------+-------+-------+-------+-------+-------| | ||
| 78 | _______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______, | ||
| 79 | // |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| | ||
| 80 | _______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______, | ||
| 81 | // |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| | ||
| 82 | _______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______, | ||
| 83 | // \-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------/ | ||
| 84 | _______,_______,_______,_______, _______,_______,_______,_______ | ||
| 85 | // \-------+-------+-------+-------/ \-------+-------+-------+-------/ | ||
| 86 | ), | ||
| 87 | |||
| 88 | }; | ||
diff --git a/keyboards/sparrow62/keymaps/via/rules.mk b/keyboards/sparrow62/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/sparrow62/keymaps/via/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| VIA_ENABLE = yes | |||
diff --git a/keyboards/sparrow62/readme.md b/keyboards/sparrow62/readme.md new file mode 100644 index 000000000..ff1a8988d --- /dev/null +++ b/keyboards/sparrow62/readme.md | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | # Sparrow62 | ||
| 2 | |||
| 3 | Sparrow62 inspired from Lily58. | ||
| 4 | |||
| 5 | * Keyboard Maintainer: [Atsushi Morimoto](https://github.com/74th) | ||
| 6 | * Hardware Availability: https://booth.pm/ja/items/2525427 | ||
| 7 | * Build Guide: https://github.com/74th/sparrow62-buildguide | ||
| 8 | |||
| 9 | Make example for this keyboard (after setting up your build environment): | ||
| 10 | |||
| 11 | make sparrow62:default | ||
| 12 | |||
| 13 | Flashing example for this keyboard: | ||
| 14 | |||
| 15 | make sparrow62:default:flash | ||
| 16 | |||
| 17 | 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/sparrow62/rules.mk b/keyboards/sparrow62/rules.mk new file mode 100644 index 000000000..9f762382b --- /dev/null +++ b/keyboards/sparrow62/rules.mk | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = caterina | ||
| 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 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 16 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 17 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 18 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 19 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 20 | AUDIO_ENABLE = no # Audio output | ||
| 21 | |||
| 22 | SPLIT_KEYBOARD = yes | ||
diff --git a/keyboards/jm60/led.c b/keyboards/sparrow62/sparrow62.c index 4ce0b3e26..3fc7f62bd 100644 --- a/keyboards/jm60/led.c +++ b/keyboards/sparrow62/sparrow62.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | 2 | Copyright 2020 Atsushi Morimoto @74th |
| 3 | 3 | ||
| 4 | This program is free software: you can redistribute it and/or modify | 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 | 5 | it under the terms of the GNU General Public License as published by |
| @@ -15,10 +15,4 @@ 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #include <hal.h> | 18 | #include "sparrow62.h" |
| 19 | |||
| 20 | #include "led.h" | ||
| 21 | |||
| 22 | |||
| 23 | void led_set(uint8_t usb_led) { | ||
| 24 | } | ||
diff --git a/keyboards/sparrow62/sparrow62.h b/keyboards/sparrow62/sparrow62.h new file mode 100644 index 000000000..15722f1da --- /dev/null +++ b/keyboards/sparrow62/sparrow62.h | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2020 Atsushi Morimoto @74th | ||
| 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 "quantum.h" | ||
| 21 | |||
| 22 | /* | ||
| 23 | * /-----+-----+-----+-----+-----+-----\ /-----+-----+-----+-----+-----+-----\ | ||
| 24 | * | L06 | L05 | L04 | L03 | L02 | L01 | | R01 | R02 | R03 | R04 | R05 | R06 | | ||
| 25 | * |-----+-----+-----+-----+-----+-----+-----\ /-----+-----+-----+-----+-----+-----+-----| | ||
| 26 | * | L16 | L15 | L14 | L13 | L12 | L11 | L00 | | R00 | R11 | R12 | R13 | R14 | R15 | R16 | | ||
| 27 | * |-----+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+-----| | ||
| 28 | * | L26 | L25 | L24 | L23 | L22 | L21 | L10 | | R10 | R21 | R22 | R23 | R24 | R25 | R26 | | ||
| 29 | * |-----+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+-----| | ||
| 30 | * | L36 | L35 | L34 | L33 | L32 | L31 | L20 | | R20 | R31 | R32 | R33 | R34 | R35 | R36 | | ||
| 31 | * \-----+-----+---+-----+-----+-----+-----+-/ \-+-----+-----+-----+-----+---+-----+-----/ | ||
| 32 | * | L43 | L42 | L41 | L30 | | R30 | R41 | R42 | R43 | | ||
| 33 | * \-----+-----+-----+-----/ \-----+-----+-----+-----/ | ||
| 34 | */ | ||
| 35 | |||
| 36 | #define LAYOUT( \ | ||
| 37 | L06, L05, L04, L03, L02, L01, R01, R02, R03, R04, R05, R06, \ | ||
| 38 | L16, L15, L14, L13, L12, L11, L00, R00, R11, R12, R13, R14, R15, R16, \ | ||
| 39 | L26, L25, L24, L23, L22, L21, L10, R10, R21, R22, R23, R24, R25, R26, \ | ||
| 40 | L36, L35, L34, L33, L32, L31, L20, R20, R31, R32, R33, R34, R35, R36, \ | ||
| 41 | L43, L42, L41, L30, R30, R41, R42, R43 \ | ||
| 42 | ) \ | ||
| 43 | { \ | ||
| 44 | { L00, L01, L02, L03, L04, L05, L06 }, \ | ||
| 45 | { L10, L11, L12, L13, L14, L15, L16 }, \ | ||
| 46 | { L20, L21, L22, L23, L24, L25, L26 }, \ | ||
| 47 | { L30, L31, L32, L33, L34, L35, L36 }, \ | ||
| 48 | { KC_NO, L41, L42, L43, KC_NO, KC_NO, KC_NO }, \ | ||
| 49 | { R00, R01, R02, R03, R04, R05, R06 }, \ | ||
| 50 | { R10, R11, R12, R13, R14, R15, R16 }, \ | ||
| 51 | { R20, R21, R22, R23, R24, R25, R26 }, \ | ||
| 52 | { R30, R31, R32, R33, R34, R35, R36 }, \ | ||
| 53 | { KC_NO, R41, R42, R43, KC_NO, KC_NO, KC_NO } \ | ||
| 54 | } | ||
