diff options
| author | etiennelepagel <50152897+etiennelepagel@users.noreply.github.com> | 2021-10-11 22:42:14 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-11 19:42:14 -0700 |
| commit | a0b7c1618af74cc1e18a482ac79ed1ddedcda2df (patch) | |
| tree | 925cebf4470e7beee8531dc0b653adf3b9f99a74 /keyboards/machkeyboards | |
| parent | 2d8dcf08e8981a30f2430a8794ff5013c56cfdd4 (diff) | |
| download | qmk_firmware-a0b7c1618af74cc1e18a482ac79ed1ddedcda2df.tar.gz qmk_firmware-a0b7c1618af74cc1e18a482ac79ed1ddedcda2df.zip | |
[Keyboard] Add MachKeyboards Mach3 (#14791)
Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'keyboards/machkeyboards')
| -rw-r--r-- | keyboards/machkeyboards/mach3/config.h | 45 | ||||
| -rw-r--r-- | keyboards/machkeyboards/mach3/info.json | 47 | ||||
| -rw-r--r-- | keyboards/machkeyboards/mach3/keymaps/default/keymap.c | 24 | ||||
| -rw-r--r-- | keyboards/machkeyboards/mach3/keymaps/default/readme.md | 4 | ||||
| -rw-r--r-- | keyboards/machkeyboards/mach3/keymaps/via/keymap.c | 24 | ||||
| -rw-r--r-- | keyboards/machkeyboards/mach3/keymaps/via/rules.mk | 2 | ||||
| -rw-r--r-- | keyboards/machkeyboards/mach3/mach3.c | 42 | ||||
| -rw-r--r-- | keyboards/machkeyboards/mach3/mach3.h | 29 | ||||
| -rw-r--r-- | keyboards/machkeyboards/mach3/readme.md | 22 | ||||
| -rw-r--r-- | keyboards/machkeyboards/mach3/rules.mk | 23 | ||||
| -rw-r--r-- | keyboards/machkeyboards/readme.md | 7 |
11 files changed, 269 insertions, 0 deletions
diff --git a/keyboards/machkeyboards/mach3/config.h b/keyboards/machkeyboards/mach3/config.h new file mode 100644 index 000000000..d78f8dce9 --- /dev/null +++ b/keyboards/machkeyboards/mach3/config.h | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | /* Copyright 2021 Mach Keyboards | ||
| 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 | #include "config_common.h" | ||
| 20 | |||
| 21 | /* USB Device descriptor parameter */ | ||
| 22 | #define VENDOR_ID 0x4D41 | ||
| 23 | #define PRODUCT_ID 0x4D33 | ||
| 24 | #define DEVICE_VER 0x0001 | ||
| 25 | #define MANUFACTURER MachKeyboard | ||
| 26 | #define PRODUCT Mach33 | ||
| 27 | |||
| 28 | /* key matrix size */ | ||
| 29 | #define MATRIX_ROWS 3 | ||
| 30 | #define MATRIX_COLS 3 | ||
| 31 | |||
| 32 | /* key pins */ | ||
| 33 | #define MATRIX_ROW_PINS { D1, D0, D4 } | ||
| 34 | #define MATRIX_COL_PINS { E6, B4, B5 } | ||
| 35 | |||
| 36 | /* COL2ROW, ROW2COL*/ | ||
| 37 | #define DIODE_DIRECTION COL2ROW | ||
| 38 | |||
| 39 | /* backlight */ | ||
| 40 | #define BACKLIGHT_PIN B6 | ||
| 41 | #define BACKLIGHT_BREATHING | ||
| 42 | #define BACKLIGHT_LEVELS 5 | ||
| 43 | |||
| 44 | /* debounce */ | ||
| 45 | #define DEBOUNCE 5 \ No newline at end of file | ||
diff --git a/keyboards/machkeyboards/mach3/info.json b/keyboards/machkeyboards/mach3/info.json new file mode 100644 index 000000000..42f29a987 --- /dev/null +++ b/keyboards/machkeyboards/mach3/info.json | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "Mach 3", | ||
| 3 | "url": "https://machkeyboards.com", | ||
| 4 | "maintainer": "etiennelepagel", | ||
| 5 | "layouts": { | ||
| 6 | "LAYOUT_3x3": { | ||
| 7 | "layout": [ | ||
| 8 | { | ||
| 9 | "x": 0, | ||
| 10 | "y": 0 | ||
| 11 | }, | ||
| 12 | { | ||
| 13 | "x": 1, | ||
| 14 | "y": 0 | ||
| 15 | }, | ||
| 16 | { | ||
| 17 | "x": 2, | ||
| 18 | "y": 0 | ||
| 19 | }, | ||
| 20 | { | ||
| 21 | "x": 0, | ||
| 22 | "y": 1 | ||
| 23 | }, | ||
| 24 | { | ||
| 25 | "x": 1, | ||
| 26 | "y": 1 | ||
| 27 | }, | ||
| 28 | { | ||
| 29 | "x": 2, | ||
| 30 | "y": 1 | ||
| 31 | }, | ||
| 32 | { | ||
| 33 | "x": 0, | ||
| 34 | "y": 2 | ||
| 35 | }, | ||
| 36 | { | ||
| 37 | "x": 1, | ||
| 38 | "y": 2 | ||
| 39 | }, | ||
| 40 | { | ||
| 41 | "x": 2, | ||
| 42 | "y": 2 | ||
| 43 | } | ||
| 44 | ] | ||
| 45 | } | ||
| 46 | } | ||
| 47 | } \ No newline at end of file | ||
diff --git a/keyboards/machkeyboards/mach3/keymaps/default/keymap.c b/keyboards/machkeyboards/mach3/keymaps/default/keymap.c new file mode 100644 index 000000000..19133200e --- /dev/null +++ b/keyboards/machkeyboards/mach3/keymaps/default/keymap.c | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /* Copyright 2021 Mach Keyboards | ||
| 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 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 19 | [0] = LAYOUT_3x3( | ||
| 20 | BL_INC, BL_DEC, BL_BRTG, | ||
| 21 | BL_INC, BL_DEC, BL_BRTG, | ||
| 22 | BL_INC, BL_DEC, BL_BRTG | ||
| 23 | ) | ||
| 24 | }; \ No newline at end of file | ||
diff --git a/keyboards/machkeyboards/mach3/keymaps/default/readme.md b/keyboards/machkeyboards/mach3/keymaps/default/readme.md new file mode 100644 index 000000000..d12e48d49 --- /dev/null +++ b/keyboards/machkeyboards/mach3/keymaps/default/readme.md | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | # Default Mach 3 Keymap | ||
| 2 | |||
| 3 | This is the default layout that comes with the Mach 3. | ||
| 4 | The keys are set to only control the backlight. \ No newline at end of file | ||
diff --git a/keyboards/machkeyboards/mach3/keymaps/via/keymap.c b/keyboards/machkeyboards/mach3/keymaps/via/keymap.c new file mode 100644 index 000000000..19133200e --- /dev/null +++ b/keyboards/machkeyboards/mach3/keymaps/via/keymap.c | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /* Copyright 2021 Mach Keyboards | ||
| 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 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 19 | [0] = LAYOUT_3x3( | ||
| 20 | BL_INC, BL_DEC, BL_BRTG, | ||
| 21 | BL_INC, BL_DEC, BL_BRTG, | ||
| 22 | BL_INC, BL_DEC, BL_BRTG | ||
| 23 | ) | ||
| 24 | }; \ No newline at end of file | ||
diff --git a/keyboards/machkeyboards/mach3/keymaps/via/rules.mk b/keyboards/machkeyboards/mach3/keymaps/via/rules.mk new file mode 100644 index 000000000..36b7ba9cb --- /dev/null +++ b/keyboards/machkeyboards/mach3/keymaps/via/rules.mk | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | VIA_ENABLE = yes | ||
| 2 | LTO_ENABLE = yes | ||
diff --git a/keyboards/machkeyboards/mach3/mach3.c b/keyboards/machkeyboards/mach3/mach3.c new file mode 100644 index 000000000..9769d02a5 --- /dev/null +++ b/keyboards/machkeyboards/mach3/mach3.c | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | /* Copyright 2021 Mach Keyboards | ||
| 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 "mach3.h" | ||
| 17 | |||
| 18 | #ifdef RGB_MATRIX_ENABLE | ||
| 19 | led_config_t g_led_config = { { | ||
| 20 | // Key Matrix to LED Index | ||
| 21 | { 0, 1, 2 }, | ||
| 22 | { 7, 6, 5 }, | ||
| 23 | { 8, 9, 10 }, | ||
| 24 | }, { | ||
| 25 | // LED Index to Physical Position | ||
| 26 | { 0, 0 }, { 112, 0 }, { 224, 0 }, | ||
| 27 | { 0, 112 }, { 112, 112 }, { 224, 112 }, | ||
| 28 | { 0, 224 }, { 112, 224 }, { 224, 224 }, | ||
| 29 | }, { | ||
| 30 | // LED Index to Flag | ||
| 31 | 4, 4, 4, | ||
| 32 | 4, 4, 4, | ||
| 33 | 4, 4, 4 | ||
| 34 | } }; | ||
| 35 | #endif | ||
| 36 | |||
| 37 | void keyboard_pre_init_kb(void) { | ||
| 38 | setPinOutput(F5); | ||
| 39 | writePinHigh(F5); | ||
| 40 | |||
| 41 | keyboard_pre_init_user(); | ||
| 42 | } \ No newline at end of file | ||
diff --git a/keyboards/machkeyboards/mach3/mach3.h b/keyboards/machkeyboards/mach3/mach3.h new file mode 100644 index 000000000..2eeadb3fb --- /dev/null +++ b/keyboards/machkeyboards/mach3/mach3.h | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | /* Copyright 2021 Mach Keyboards | ||
| 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 | #pragma once | ||
| 17 | |||
| 18 | #include "quantum.h" | ||
| 19 | |||
| 20 | #define LAYOUT_3x3( \ | ||
| 21 | K00, K01, K02, \ | ||
| 22 | K10, K11, K12, \ | ||
| 23 | K20, K21, K22 \ | ||
| 24 | ) \ | ||
| 25 | { \ | ||
| 26 | { K00, K01, K02 }, \ | ||
| 27 | { K10, K11, K12 }, \ | ||
| 28 | { K20, K21, K22 } \ | ||
| 29 | } | ||
diff --git a/keyboards/machkeyboards/mach3/readme.md b/keyboards/machkeyboards/mach3/readme.md new file mode 100644 index 000000000..16c61511b --- /dev/null +++ b/keyboards/machkeyboards/mach3/readme.md | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | # Mach 3 | ||
| 2 | |||
| 3 | A 3x3 macropad with RGB underglow. | ||
| 4 | Note: It sets an output pin to high, which is the alimentation of the backlight circuit. | ||
| 5 | |||
| 6 | * Keyboard Maintainer: [etiennelepagel](https://github.com/etiennelepagel) | ||
| 7 | * Hardware Supported: Mach 3 from Mach Keyboards | ||
| 8 | * Hardware Availability: [Mach Keyboards Official Website](https://machkeyboards.com/) | ||
| 9 | |||
| 10 | ## Bootloader | ||
| 11 | |||
| 12 | Enter the bootloader in 3 ways: | ||
| 13 | |||
| 14 | * **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard | ||
| 15 | * **Physical reset button**: Briefly press the button on the back of the PCB | ||
| 16 | * **Keycode in layout**: Press the key mapped to `RESET` if it is available | ||
| 17 | |||
| 18 | Make example for this keyboard (after setting up your build environment): | ||
| 19 | |||
| 20 | make machkeyboards/mach3:default | ||
| 21 | |||
| 22 | 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/machkeyboards/mach3/rules.mk b/keyboards/machkeyboards/mach3/rules.mk new file mode 100644 index 000000000..e8f6fb403 --- /dev/null +++ b/keyboards/machkeyboards/mach3/rules.mk | |||
| @@ -0,0 +1,23 @@ | |||
| 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 = yes # Enable Bootmagic Lite | ||
| 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 = yes # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 21 | AUDIO_ENABLE = no # Audio output | ||
| 22 | UNICODE_ENABLE = yes | ||
| 23 | BACKLIGHT_DRIVER = pwm \ No newline at end of file | ||
diff --git a/keyboards/machkeyboards/readme.md b/keyboards/machkeyboards/readme.md new file mode 100644 index 000000000..ef2f8b159 --- /dev/null +++ b/keyboards/machkeyboards/readme.md | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | # Mach Keyboards | ||
| 2 | |||
| 3 | Mach Keyboards focus itself on selling the best macropad in the world. | ||
| 4 | |||
| 5 | [Mach Keyboards Official Website](https://machkeyboards.com) | ||
| 6 | [Discord](https://discord.gg/ukFKFc7eXy) | ||
| 7 | [Instagram](https://www.instagram.com/machkeyboards) \ No newline at end of file | ||
