diff options
author | jonylee@hfd <108282809+jonylee1986@users.noreply.github.com> | 2023-02-19 01:28:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-18 10:28:56 -0700 |
commit | 3110a70f6f208e20174056e8600830e767b911ff (patch) | |
tree | c195a756fd8381ba598475943104369de959781d | |
parent | 59f5889e627e67e659d8b15ce1acc4e0f8c65454 (diff) |
Add ac001 keyboard (#19868)
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: jack <0x6a73@protonmail.com>
-rw-r--r-- | keyboards/hfdkb/ac001/ac001.c | 36 | ||||
-rw-r--r-- | keyboards/hfdkb/ac001/ac001.h | 26 | ||||
-rw-r--r-- | keyboards/hfdkb/ac001/config.h | 105 | ||||
-rw-r--r-- | keyboards/hfdkb/ac001/halconf.h | 22 | ||||
-rw-r--r-- | keyboards/hfdkb/ac001/info.json | 23 | ||||
-rw-r--r-- | keyboards/hfdkb/ac001/keymaps/default/keymap.c | 23 | ||||
-rw-r--r-- | keyboards/hfdkb/ac001/keymaps/via/keymap.c | 29 | ||||
-rw-r--r-- | keyboards/hfdkb/ac001/keymaps/via/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/hfdkb/ac001/mcuconf.h | 22 | ||||
-rw-r--r-- | keyboards/hfdkb/ac001/readme.md | 24 | ||||
-rw-r--r-- | keyboards/hfdkb/ac001/rules.mk | 15 |
11 files changed, 326 insertions, 0 deletions
diff --git a/keyboards/hfdkb/ac001/ac001.c b/keyboards/hfdkb/ac001/ac001.c new file mode 100644 index 0000000000..a977f9c80d --- /dev/null +++ b/keyboards/hfdkb/ac001/ac001.c @@ -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 diff --git a/keyboards/hfdkb/ac001/ac001.h b/keyboards/hfdkb/ac001/ac001.h new file mode 100644 index 0000000000..0758584ee8 --- /dev/null +++ b/keyboards/hfdkb/ac001/ac001.h @@ -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 diff --git a/keyboards/hfdkb/ac001/config.h b/keyboards/hfdkb/ac001/config.h new file mode 100644 index 0000000000..a03f9066a9 --- /dev/null +++ b/keyboards/hfdkb/ac001/config.h @@ -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 + diff --git a/keyboards/hfdkb/ac001/halconf.h b/keyboards/hfdkb/ac001/halconf.h new file mode 100644 index 0000000000..7ad0a62d2e --- /dev/null +++ b/keyboards/hfdkb/ac001/halconf.h @@ -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> diff --git a/keyboards/hfdkb/ac001/info.json b/keyboards/hfdkb/ac001/info.json new file mode 100644 index 0000000000..2e1011b7f6 --- /dev/null +++ b/keyboards/hfdkb/ac001/info.json @@ -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}] + } + } +} diff --git a/keyboards/hfdkb/ac001/keymaps/default/keymap.c b/keyboards/hfdkb/ac001/keymaps/default/keymap.c new file mode 100644 index 0000000000..56c767503e --- /dev/null +++ b/keyboards/hfdkb/ac001/keymaps/default/keymap.c @@ -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), +}; + diff --git a/keyboards/hfdkb/ac001/keymaps/via/keymap.c b/keyboards/hfdkb/ac001/keymaps/via/keymap.c new file mode 100644 index 0000000000..72b9720d5c --- /dev/null +++ b/keyboards/hfdkb/ac001/keymaps/via/keymap.c @@ -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) +}; + diff --git a/keyboards/hfdkb/ac001/keymaps/via/rules.mk b/keyboards/hfdkb/ac001/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/hfdkb/ac001/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/hfdkb/ac001/mcuconf.h b/keyboards/hfdkb/ac001/mcuconf.h new file mode 100644 index 0000000000..bebb786824 --- /dev/null +++ b/keyboards/hfdkb/ac001/mcuconf.h @@ -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 + diff --git a/keyboards/hfdkb/ac001/readme.md b/keyboards/hfdkb/ac001/readme.md new file mode 100644 index 0000000000..8f88f0d3c3 --- /dev/null +++ b/keyboards/hfdkb/ac001/readme.md @@ -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 diff --git a/keyboards/hfdkb/ac001/rules.mk b/keyboards/hfdkb/ac001/rules.mk new file mode 100644 index 0000000000..cf3008c6e4 --- /dev/null +++ b/keyboards/hfdkb/ac001/rules.mk @@ -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 |