mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-11-25 01:47:10 +06:00
Add ac001 keyboard (#19868)
Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: jack <0x6a73@protonmail.com>
This commit is contained in:
parent
59f5889e62
commit
3110a70f6f
36
keyboards/hfdkb/ac001/ac001.c
Normal file
36
keyboards/hfdkb/ac001/ac001.c
Normal file
|
@ -0,0 +1,36 @@
|
|||
/* Copyright (C) 2022 jonylee@hfd
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ac001.h"
|
||||
/*
|
||||
3---------------2
|
||||
| | |
|
||||
| | |
|
||||
4-------0-------1
|
||||
*/
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
led_config_t g_led_config = { {
|
||||
// Key Matrix to LED Index
|
||||
{ 0, 1, 2, 3, 4}
|
||||
}, {
|
||||
// LED Index to Physical Position
|
||||
{ 64, 112 }, { 64, 224 }, { 224, 0 }, { 0, 0 }, { 64, 0 },
|
||||
|
||||
}, {
|
||||
// LED Index to Flag
|
||||
4, 4, 4, 4, 4
|
||||
} };
|
||||
#endif
|
26
keyboards/hfdkb/ac001/ac001.h
Normal file
26
keyboards/hfdkb/ac001/ac001.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
/* Copyright (C) 2022 jonylee@hfd
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
K000, K001, K002, K003, K004 \
|
||||
) { \
|
||||
{ K000, K001, K002, K003, K004 } \
|
||||
}
|
||||
// clang-format on
|
105
keyboards/hfdkb/ac001/config.h
Normal file
105
keyboards/hfdkb/ac001/config.h
Normal file
|
@ -0,0 +1,105 @@
|
|||
/* Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define FORCE_NKRO
|
||||
|
||||
/* key matrix pins */
|
||||
#define MATRIX_ROW_PINS { B15}
|
||||
#define MATRIX_COL_PINS { A5, A6, A7, C4, C5}
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION ROW2COL
|
||||
|
||||
#define TAP_CODE_DELAY 5
|
||||
|
||||
/* ws2812 RGB LED */
|
||||
#define RGB_DI_PIN A1
|
||||
#define RGB_MATRIX_LED_COUNT 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* SPI Config for spi flash*/
|
||||
#define SPI_DRIVER SPIDQ
|
||||
#define SPI_SCK_PIN B3
|
||||
#define SPI_MOSI_PIN B5
|
||||
#define SPI_MISO_PIN B4
|
||||
#define SPI_MOSI_PAL_MODE 5
|
||||
|
||||
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
|
||||
#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
|
||||
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
|
||||
|
||||
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
#define RGB_MATRIX_KEYPRESSES
|
||||
#define RGB_MATRIX_KEYRELEASES
|
||||
|
||||
// RGB Matrix Animation modes. Explicitly enabled
|
||||
// For full list of effects, see:
|
||||
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
|
||||
// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
|
||||
// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||
// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
|
||||
#define ENABLE_RGB_MATRIX_BREATHING
|
||||
// #define ENABLE_RGB_MATRIX_BAND_SAT
|
||||
// #define ENABLE_RGB_MATRIX_BAND_VAL
|
||||
// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
|
||||
// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
|
||||
// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
|
||||
// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_ALL
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||
//#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||
//#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
|
||||
//#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
||||
//#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
|
||||
//#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
|
||||
//#define ENABLE_RGB_MATRIX_DUAL_BEACON
|
||||
//#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||
// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||
//#define ENABLE_RGB_MATRIX_RAINDROPS
|
||||
// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||
// #define ENABLE_RGB_MATRIX_HUE_BREATHING
|
||||
// #define ENABLE_RGB_MATRIX_HUE_PENDULUM
|
||||
// #define ENABLE_RGB_MATRIX_HUE_WAVE
|
||||
// #define ENABLE_RGB_MATRIX_PIXEL_RAIN
|
||||
// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
|
||||
// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
|
||||
// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
|
||||
//#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
|
||||
//#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
|
||||
//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||
//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||
//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||
//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||
//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||
//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||
//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||
//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||
//#define ENABLE_RGB_MATRIX_SPLASH
|
||||
#define ENABLE_RGB_MATRIX_MULTISPLASH
|
||||
//#define ENABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
//#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||
|
||||
#define USB_SUSPEND_WAKEUP_DELAY 1500 //Wakeup host USB
|
||||
|
22
keyboards/hfdkb/ac001/halconf.h
Normal file
22
keyboards/hfdkb/ac001/halconf.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
/* Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_SPI TRUE
|
||||
#define SPI_USE_WAIT TRUE
|
||||
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
|
||||
|
||||
#include_next <halconf.h>
|
23
keyboards/hfdkb/ac001/info.json
Normal file
23
keyboards/hfdkb/ac001/info.json
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"keyboard_name": "ac001",
|
||||
"manufacturer": "hfd",
|
||||
"url": "",
|
||||
"maintainer": "jonylee@hfd",
|
||||
"usb": {
|
||||
"vid": "0xFFFE",
|
||||
"pid": "0x0001",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"processor": "WB32FQ95",
|
||||
"bootloader": "wb32-dfu",
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"label":"~", "x":0, "y":0},
|
||||
{"label":"!", "x":1, "y":0},
|
||||
{"label":"3", "x":2, "y":0},
|
||||
{"label":"4", "x":3, "y":0},
|
||||
{"label":"@", "x":4, "y":0}]
|
||||
}
|
||||
}
|
||||
}
|
23
keyboards/hfdkb/ac001/keymaps/default/keymap.c
Normal file
23
keyboards/hfdkb/ac001/keymaps/default/keymap.c
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Copyright (C) 2022 jonylee@hfd
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT( /* Base */
|
||||
RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO),
|
||||
};
|
||||
|
29
keyboards/hfdkb/ac001/keymaps/via/keymap.c
Normal file
29
keyboards/hfdkb/ac001/keymaps/via/keymap.c
Normal file
|
@ -0,0 +1,29 @@
|
|||
/* Copyright (C) 2022 jonylee@hfd
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT( /* Base */
|
||||
RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO),
|
||||
[1] = LAYOUT(
|
||||
RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO),
|
||||
[2] = LAYOUT(
|
||||
RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO),
|
||||
[3] = LAYOUT(
|
||||
RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO)
|
||||
};
|
||||
|
1
keyboards/hfdkb/ac001/keymaps/via/rules.mk
Normal file
1
keyboards/hfdkb/ac001/keymaps/via/rules.mk
Normal file
|
@ -0,0 +1 @@
|
|||
VIA_ENABLE = yes
|
22
keyboards/hfdkb/ac001/mcuconf.h
Normal file
22
keyboards/hfdkb/ac001/mcuconf.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
/* Copyright (C) 2022 jonylee@hfd
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef WB32_SPI_USE_QSPI
|
||||
#define WB32_SPI_USE_QSPI TRUE
|
||||
|
24
keyboards/hfdkb/ac001/readme.md
Normal file
24
keyboards/hfdkb/ac001/readme.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
# ac001
|
||||
|
||||
This is an enter key with rgb .
|
||||
|
||||
* Keyboard Maintainer: [jonylee@hfd](https://github.com/jonylee1986)
|
||||
* Hardware Supported: ac001
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make hfdkb/ac001:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make hfdkb/ac001:default:flash
|
||||
|
||||
|
||||
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).
|
||||
|
||||
## Bootloader
|
||||
|
||||
Enter the bootloader:
|
||||
|
||||
* **Bootmagic reset**: Hold down the encoder and plug in the keyboard
|
||||
* **Physical reset button**: Briefly press the button on the back of the PCB
|
15
keyboards/hfdkb/ac001/rules.mk
Normal file
15
keyboards/hfdkb/ac001/rules.mk
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Enable N-Key Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
RGB_MATRIX_DRIVER = WS2812
|
||||
EEPROM_DRIVER = wear_leveling
|
||||
WEAR_LEVELING_DRIVER = spi_flash
|
Loading…
Reference in New Issue
Block a user