Skip to content

Commit 3110a70

Browse files
jonylee1986zvecrwaffle87
authored
Add ac001 keyboard (#19868)
Co-authored-by: Joel Challis <[email protected]> Co-authored-by: jack <[email protected]>
1 parent 59f5889 commit 3110a70

File tree

11 files changed

+326
-0
lines changed

11 files changed

+326
-0
lines changed

keyboards/hfdkb/ac001/ac001.c

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/* Copyright (C) 2022 jonylee@hfd
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+
#include "ac001.h"
18+
/*
19+
3---------------2
20+
| | |
21+
| | |
22+
4-------0-------1
23+
*/
24+
#ifdef RGB_MATRIX_ENABLE
25+
led_config_t g_led_config = { {
26+
// Key Matrix to LED Index
27+
{ 0, 1, 2, 3, 4}
28+
}, {
29+
// LED Index to Physical Position
30+
{ 64, 112 }, { 64, 224 }, { 224, 0 }, { 0, 0 }, { 64, 0 },
31+
32+
}, {
33+
// LED Index to Flag
34+
4, 4, 4, 4, 4
35+
} };
36+
#endif

keyboards/hfdkb/ac001/ac001.h

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/* Copyright (C) 2022 jonylee@hfd
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 "quantum.h"
20+
21+
#define LAYOUT( \
22+
K000, K001, K002, K003, K004 \
23+
) { \
24+
{ K000, K001, K002, K003, K004 } \
25+
}
26+
// clang-format on

keyboards/hfdkb/ac001/config.h

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
/* Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
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 FORCE_NKRO
20+
21+
/* key matrix pins */
22+
#define MATRIX_ROW_PINS { B15}
23+
#define MATRIX_COL_PINS { A5, A6, A7, C4, C5}
24+
25+
/* COL2ROW or ROW2COL */
26+
#define DIODE_DIRECTION ROW2COL
27+
28+
#define TAP_CODE_DELAY 5
29+
30+
/* ws2812 RGB LED */
31+
#define RGB_DI_PIN A1
32+
#define RGB_MATRIX_LED_COUNT 5
33+
34+
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
35+
#define LOCKING_SUPPORT_ENABLE
36+
/* Locking resynchronize hack */
37+
#define LOCKING_RESYNC_ENABLE
38+
39+
/* SPI Config for spi flash*/
40+
#define SPI_DRIVER SPIDQ
41+
#define SPI_SCK_PIN B3
42+
#define SPI_MOSI_PIN B5
43+
#define SPI_MISO_PIN B4
44+
#define SPI_MOSI_PAL_MODE 5
45+
46+
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
47+
#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
48+
49+
#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
50+
51+
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
52+
#define RGB_MATRIX_KEYPRESSES
53+
#define RGB_MATRIX_KEYRELEASES
54+
55+
// RGB Matrix Animation modes. Explicitly enabled
56+
// For full list of effects, see:
57+
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
58+
// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
59+
// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
60+
// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
61+
#define ENABLE_RGB_MATRIX_BREATHING
62+
// #define ENABLE_RGB_MATRIX_BAND_SAT
63+
// #define ENABLE_RGB_MATRIX_BAND_VAL
64+
// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
65+
// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
66+
// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
67+
// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
68+
#define ENABLE_RGB_MATRIX_CYCLE_ALL
69+
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
70+
//#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
71+
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
72+
//#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
73+
//#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
74+
//#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
75+
//#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
76+
//#define ENABLE_RGB_MATRIX_DUAL_BEACON
77+
//#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
78+
// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
79+
//#define ENABLE_RGB_MATRIX_RAINDROPS
80+
// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
81+
// #define ENABLE_RGB_MATRIX_HUE_BREATHING
82+
// #define ENABLE_RGB_MATRIX_HUE_PENDULUM
83+
// #define ENABLE_RGB_MATRIX_HUE_WAVE
84+
// #define ENABLE_RGB_MATRIX_PIXEL_RAIN
85+
// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
86+
// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
87+
// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
88+
//#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
89+
//#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
90+
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
91+
//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
92+
//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
93+
//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
94+
//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
95+
//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
96+
//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
97+
//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
98+
//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
99+
//#define ENABLE_RGB_MATRIX_SPLASH
100+
#define ENABLE_RGB_MATRIX_MULTISPLASH
101+
//#define ENABLE_RGB_MATRIX_SOLID_SPLASH
102+
//#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
103+
104+
#define USB_SUSPEND_WAKEUP_DELAY 1500 //Wakeup host USB
105+

keyboards/hfdkb/ac001/halconf.h

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/* Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
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+
#define HAL_USE_SPI TRUE
19+
#define SPI_USE_WAIT TRUE
20+
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
21+
22+
#include_next <halconf.h>

keyboards/hfdkb/ac001/info.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"keyboard_name": "ac001",
3+
"manufacturer": "hfd",
4+
"url": "",
5+
"maintainer": "jonylee@hfd",
6+
"usb": {
7+
"vid": "0xFFFE",
8+
"pid": "0x0001",
9+
"device_version": "0.0.1"
10+
},
11+
"processor": "WB32FQ95",
12+
"bootloader": "wb32-dfu",
13+
"layouts": {
14+
"LAYOUT": {
15+
"layout": [
16+
{"label":"~", "x":0, "y":0},
17+
{"label":"!", "x":1, "y":0},
18+
{"label":"3", "x":2, "y":0},
19+
{"label":"4", "x":3, "y":0},
20+
{"label":"@", "x":4, "y":0}]
21+
}
22+
}
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/* Copyright (C) 2022 jonylee@hfd
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+
#include QMK_KEYBOARD_H
18+
19+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20+
[0] = LAYOUT( /* Base */
21+
RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO),
22+
};
23+
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/* Copyright (C) 2022 jonylee@hfd
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+
#include QMK_KEYBOARD_H
18+
19+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20+
[0] = LAYOUT( /* Base */
21+
RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO),
22+
[1] = LAYOUT(
23+
RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO),
24+
[2] = LAYOUT(
25+
RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO),
26+
[3] = LAYOUT(
27+
RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO)
28+
};
29+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VIA_ENABLE = yes

keyboards/hfdkb/ac001/mcuconf.h

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/* Copyright (C) 2022 jonylee@hfd
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_next <mcuconf.h>
19+
20+
#undef WB32_SPI_USE_QSPI
21+
#define WB32_SPI_USE_QSPI TRUE
22+

keyboards/hfdkb/ac001/readme.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# ac001
2+
3+
This is an enter key with rgb .
4+
5+
* Keyboard Maintainer: [jonylee@hfd](https://github.com/jonylee1986)
6+
* Hardware Supported: ac001
7+
8+
Make example for this keyboard (after setting up your build environment):
9+
10+
make hfdkb/ac001:default
11+
12+
Flashing example for this keyboard:
13+
14+
make hfdkb/ac001:default:flash
15+
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).
18+
19+
## Bootloader
20+
21+
Enter the bootloader:
22+
23+
* **Bootmagic reset**: Hold down the encoder and plug in the keyboard
24+
* **Physical reset button**: Briefly press the button on the back of the PCB

keyboards/hfdkb/ac001/rules.mk

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Build Options
2+
# change yes to no to disable
3+
#
4+
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
5+
MOUSEKEY_ENABLE = no # Mouse keys
6+
EXTRAKEY_ENABLE = yes # Audio control and System control
7+
CONSOLE_ENABLE = no # Console for debug
8+
COMMAND_ENABLE = no # Commands for debug and configuration
9+
NKRO_ENABLE = yes # Enable N-Key Rollover
10+
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
11+
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
12+
RGB_MATRIX_ENABLE = yes
13+
RGB_MATRIX_DRIVER = WS2812
14+
EEPROM_DRIVER = wear_leveling
15+
WEAR_LEVELING_DRIVER = spi_flash

0 commit comments

Comments
 (0)