aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormechlovin <57231893+mechlovin@users.noreply.github.com>2022-01-13 05:09:33 +0700
committerGitHub <noreply@github.com>2022-01-12 14:09:33 -0800
commit2c18dcc619017d2c8abe0cecbb168b84d48124e8 (patch)
tree2da714aa7821692c1a50e83fbf106cda02feb895
parented151979671b36cadb7cd3c0505205c44d3fba73 (diff)
downloadqmk_firmware-2c18dcc619017d2c8abe0cecbb168b84d48124e8.tar.gz
qmk_firmware-2c18dcc619017d2c8abe0cecbb168b84d48124e8.zip
[Keyboard] Add Hex4B rev.2 PCB (#15811)
Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Ryan <fauxpark@gmail.com>
-rw-r--r--keyboards/mechlovin/hex4b/config.h19
-rw-r--r--keyboards/mechlovin/hex4b/rev1/config.h53
-rw-r--r--keyboards/mechlovin/hex4b/rev1/readme.md21
-rw-r--r--keyboards/mechlovin/hex4b/rev1/rules.mk21
-rw-r--r--keyboards/mechlovin/hex4b/rev2/chconf.h24
-rw-r--r--keyboards/mechlovin/hex4b/rev2/config.h56
-rw-r--r--keyboards/mechlovin/hex4b/rev2/halconf.h22
-rw-r--r--keyboards/mechlovin/hex4b/rev2/mcuconf.h26
-rw-r--r--keyboards/mechlovin/hex4b/rev2/readme.md28
-rw-r--r--keyboards/mechlovin/hex4b/rev2/rules.mk18
10 files changed, 271 insertions, 17 deletions
diff --git a/keyboards/mechlovin/hex4b/config.h b/keyboards/mechlovin/hex4b/config.h
index 789e5517b..c8176d76b 100644
--- a/keyboards/mechlovin/hex4b/config.h
+++ b/keyboards/mechlovin/hex4b/config.h
@@ -20,11 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
20#include "config_common.h" 20#include "config_common.h"
21 21
22/* USB Device descriptor parameter */ 22/* USB Device descriptor parameter */
23#define VENDOR_ID 0x4D4C //MechLovin 23#define VENDOR_ID 0x4D4C
24#define PRODUCT_ID 0x0675 //Hex-75 24#define PRODUCT_ID 0x0675 //Hex-75
25#define DEVICE_VER 0x0001 25#define MANUFACTURER Mechlovin Studio
26#define MANUFACTURER Team Mechlovin
27#define PRODUCT Hex 4B
28 26
29/* key matrix size */ 27/* key matrix size */
30#define MATRIX_ROWS 6 28#define MATRIX_ROWS 6
@@ -41,23 +39,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
41 * 39 *
42 */ 40 */
43 41
44#define MATRIX_ROW_PINS { B7, A2, A1, A3, A4, A5 }
45#define MATRIX_COL_PINS { B6, B5, B3, B2, B1, B0, A0, A6, A7, C7, C6, C5, C4, D1, D0 }
46#define UNUSED_PINS
47
48/* COL2ROW, ROW2COL */ 42/* COL2ROW, ROW2COL */
49#define DIODE_DIRECTION COL2ROW 43#define DIODE_DIRECTION COL2ROW
50 44
51#define LED_NUM_LOCK_PIN D6
52#define LED_CAPS_LOCK_PIN D7
53#define LED_SCROLL_LOCK_PIN D5
54#define LED_PIN_ON_STATE 0 45#define LED_PIN_ON_STATE 0
55//#define LED_COMPOSE_PIN B3
56//#define LED_KANA_PIN B4
57
58#define BACKLIGHT_PIN D4
59#define BACKLIGHT_LEVELS 5
60#define BACKLIGHT_BREATHING
61 46
62/* Bootmagic Lite key configuration, Backspace */ 47/* Bootmagic Lite key configuration, Backspace */
63#define BOOTMAGIC_LITE_ROW 1 48#define BOOTMAGIC_LITE_ROW 1
diff --git a/keyboards/mechlovin/hex4b/rev1/config.h b/keyboards/mechlovin/hex4b/rev1/config.h
new file mode 100644
index 000000000..014209cef
--- /dev/null
+++ b/keyboards/mechlovin/hex4b/rev1/config.h
@@ -0,0 +1,53 @@
1/*
2Copyright 2020 Team Mechlovin
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along 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 DEVICE_VER 0x0001
24#define PRODUCT Hex-4B Rev.1
25
26/*
27 * Keyboard Matrix Assignments
28 *
29 * Change this to how you wired your keyboard
30 * COLS: AVR pins used for columns, left to right
31 * ROWS: AVR pins used for rows, top to bottom
32 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
33 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
34 *
35 */
36
37#define MATRIX_ROW_PINS { B7, A2, A1, A3, A4, A5 }
38#define MATRIX_COL_PINS { B6, B5, B3, B2, B1, B0, A0, A6, A7, C7, C6, C5, C4, D1, D0 }
39#define UNUSED_PINS
40
41#define LED_NUM_LOCK_PIN D6
42#define LED_CAPS_LOCK_PIN D7
43#define LED_SCROLL_LOCK_PIN D5
44//#define LED_COMPOSE_PIN B3
45//#define LED_KANA_PIN B4
46
47#define BACKLIGHT_PIN D4
48#define BACKLIGHT_LEVELS 5
49#define BACKLIGHT_BREATHING
50
51/* Bootmagic Lite key configuration, Backspace */
52#define BOOTMAGIC_LITE_ROW 1
53#define BOOTMAGIC_LITE_COLUMN 14
diff --git a/keyboards/mechlovin/hex4b/rev1/readme.md b/keyboards/mechlovin/hex4b/rev1/readme.md
new file mode 100644
index 000000000..e47dd78a9
--- /dev/null
+++ b/keyboards/mechlovin/hex4b/rev1/readme.md
@@ -0,0 +1,21 @@
1# hex4b
2
3![hex4b](https://i.imgur.com/lArfGgHh.jpeg)
4
5A PCB for HEX.4B 75% keyboard.
6
7* Keyboard Maintainer: [Mechlovin' Studio](https://github.com/mechlovin)
8* Hardware Supported: Hex.4B PCB, Atmega32A
9* Hardware Availability: [Hex Keyboard](https://hexkeyboards.com/)
10
11Make example for this keyboard (after setting up your build environment):
12
13 make mechlovin/hex4b/rev1:default
14
15Flashing example for this keyboard:
16
17 make mechlovin/hex4b/rev1:default:flash
18
19See 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).
20
21Reset Key: To put the Hex4B into bootloader, hold esc key while plugging in (bootloader), hold backspace while plugging in (bootmagic) and plug cable.
diff --git a/keyboards/mechlovin/hex4b/rev1/rules.mk b/keyboards/mechlovin/hex4b/rev1/rules.mk
new file mode 100644
index 000000000..c3a178503
--- /dev/null
+++ b/keyboards/mechlovin/hex4b/rev1/rules.mk
@@ -0,0 +1,21 @@
1# MCU name
2MCU = atmega32a
3
4# Bootloader selection
5BOOTLOADER = usbasploader
6
7# Processor frequency
8F_CPU = 16000000
9
10# Build Options
11# change yes to no to disable
12#
13BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
14MOUSEKEY_ENABLE = yes # Mouse keys
15EXTRAKEY_ENABLE = yes # Audio control and System control
16CONSOLE_ENABLE = no # Console for debug
17COMMAND_ENABLE = no # Commands for debug and configuration
18NKRO_ENABLE = no # Enable N-Key Rollover
19BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
20RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
21AUDIO_ENABLE = no # Audio output
diff --git a/keyboards/mechlovin/hex4b/rev2/chconf.h b/keyboards/mechlovin/hex4b/rev2/chconf.h
new file mode 100644
index 000000000..fe716d655
--- /dev/null
+++ b/keyboards/mechlovin/hex4b/rev2/chconf.h
@@ -0,0 +1,24 @@
1/* Copyright 2020 QMK
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 CH_CFG_ST_TIMEDELTA 0
20
21#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
22
23#include_next <chconf.h>
24
diff --git a/keyboards/mechlovin/hex4b/rev2/config.h b/keyboards/mechlovin/hex4b/rev2/config.h
new file mode 100644
index 000000000..af956f3ec
--- /dev/null
+++ b/keyboards/mechlovin/hex4b/rev2/config.h
@@ -0,0 +1,56 @@
1/*
2Copyright 2020 Team Mechlovin
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along 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 DEVICE_VER 0x0002
24#define PRODUCT Hex-4B Rev.2
25
26
27
28/*
29 * Keyboard Matrix Assignments
30 *
31 * Change this to how you wired your keyboard
32 * COLS: AVR pins used for columns, left to right
33 * ROWS: AVR pins used for rows, top to bottom
34 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
35 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
36 *
37 */
38
39#define MATRIX_ROW_PINS { A4, B12, B13, B14, B15, A1 }
40#define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, A6, A5, A3, C13, B7, B6, B5, B4, B3 }
41#define UNUSED_PINS
42
43#define LED_NUM_LOCK_PIN C15
44#define LED_CAPS_LOCK_PIN B9
45#define LED_SCROLL_LOCK_PIN A15
46//#define LED_COMPOSE_PIN B3
47//#define LED_KANA_PIN B4
48
49#define BACKLIGHT_PIN B8
50#define BACKLIGHT_LEVELS 5
51#define BACKLIGHT_PWM_DRIVER PWMD4
52#define BACKLIGHT_BREATHING
53
54/* Bootmagic Lite key configuration, Backspace */
55#define BOOTMAGIC_LITE_ROW 1
56#define BOOTMAGIC_LITE_COLUMN 14 \ No newline at end of file
diff --git a/keyboards/mechlovin/hex4b/rev2/halconf.h b/keyboards/mechlovin/hex4b/rev2/halconf.h
new file mode 100644
index 000000000..1f5149b1a
--- /dev/null
+++ b/keyboards/mechlovin/hex4b/rev2/halconf.h
@@ -0,0 +1,22 @@
1/* Copyright 2020 QMK
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 HAL_USE_PWM TRUE
20
21#include_next <halconf.h>
22
diff --git a/keyboards/mechlovin/hex4b/rev2/mcuconf.h b/keyboards/mechlovin/hex4b/rev2/mcuconf.h
new file mode 100644
index 000000000..10c578ca0
--- /dev/null
+++ b/keyboards/mechlovin/hex4b/rev2/mcuconf.h
@@ -0,0 +1,26 @@
1/* Copyright 2020 QMK
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
18#pragma once
19
20#include_next <mcuconf.h>
21
22#undef STM32_PWM_USE_TIM4
23#define STM32_PWM_USE_TIM4 TRUE
24
25
26
diff --git a/keyboards/mechlovin/hex4b/rev2/readme.md b/keyboards/mechlovin/hex4b/rev2/readme.md
new file mode 100644
index 000000000..328c86970
--- /dev/null
+++ b/keyboards/mechlovin/hex4b/rev2/readme.md
@@ -0,0 +1,28 @@
1# hex4b
2
3![hex4b](https://i.imgur.com/lArfGgHh.jpeg)
4
5A PCB for HEX.4B 75% keyboard.
6
7* Keyboard Maintainer: [Mechlovin' Studio](https://github.com/mechlovin)
8* Hardware Supported: Hex.4B Rev.2 PCB, APM32F103CBT6
9* Hardware Availability: [Hex Keyboard](https://hexkeyboards.com/)
10
11Make example for this keyboard (after setting up your build environment):
12
13 make mechlovin/hex4b/rev2:default
14
15Flashing example for this keyboard:
16
17 make mechlovin/hex4b/rev2:default:flash
18
19See 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).
20
21## Bootloader
22
23Enter the bootloader in 3 ways:
24
25* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
26* **Bootloader reset**: Hold down the key at (0,13) in the matrix (Backspace) and plug in the keyboard
27* **Keycode in layout**: Press the key mapped to `RESET` if it is available
28* **Hardware reset**: Press reset button (located on the top side of the PCB) \ No newline at end of file
diff --git a/keyboards/mechlovin/hex4b/rev2/rules.mk b/keyboards/mechlovin/hex4b/rev2/rules.mk
new file mode 100644
index 000000000..a61a25009
--- /dev/null
+++ b/keyboards/mechlovin/hex4b/rev2/rules.mk
@@ -0,0 +1,18 @@
1# MCU name
2MCU = STM32F103
3
4# Bootloader selection
5BOOTLOADER = stm32duino
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
11MOUSEKEY_ENABLE = yes # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = yes # Console for debug
14COMMAND_ENABLE = yes # Commands for debug and configuration
15NKRO_ENABLE = yes # Enable N-Key Rollover
16BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
17RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
18AUDIO_ENABLE = no # Audio output